return false;
}
+bool InputManager::hasVisualisation()
+{
+ if( !p_input )
+ return false;
+
+ aout_instance_t *aout = input_GetAout( p_input );
+ if( !aout )
+ return false;
+
+ char *visual = var_InheritString( aout, "visual" );
+ if( !visual )
+ return false;
+
+ free( visual );
+ return true;
+}
+
void InputManager::UpdateTeletext()
{
if( hasInput() )
int playingStatus();
bool hasAudio();
bool hasVideo() { return hasInput() && b_video; }
+ bool hasVisualisation();
void requestArtUpdate();
QString getName() { return oldName; }
/* Switch to minimal view if needed, must be called after the show() */
if( b_minimalView )
toggleMinimalView( true );
+
+ b_hasPausedWhenMinimized = false;
}
MainInterface::~MainInterface()
}
#endif
+void MainInterface::changeEvent(QEvent *event)
+{
+ if( event->type() == QEvent::WindowStateChange )
+ {
+ QWindowStateChangeEvent *windowStateChangeEvent = static_cast<QWindowStateChangeEvent*>(event);
+ Qt::WindowStates newState = windowState();
+ Qt::WindowStates oldState = windowStateChangeEvent->oldState();
+
+ if( newState & Qt::WindowMinimized )
+ {
+ b_hasPausedWhenMinimized = false;
+
+ if( THEMIM->getIM()->playingStatus() == PLAYING_S &&
+ THEMIM->getIM()->hasVideo() &&
+ !THEMIM->getIM()->hasVisualisation() &&
+ var_InheritBool( p_intf, "qt-pause-minimized" ) )
+ {
+ b_hasPausedWhenMinimized = true;
+ THEMIM->pause();
+ }
+ }
+ else if( oldState & Qt::WindowMinimized && !( newState & Qt::WindowMinimized ) )
+ {
+ if( b_hasPausedWhenMinimized )
+ {
+ THEMIM->play();
+ }
+ }
+ }
+
+ QWidget::changeEvent(event);
+}
+
/************************************************************************
* D&D Events
************************************************************************/
#ifdef WIN32
virtual bool winEvent( MSG *, long * );
#endif
+ virtual void changeEvent( QEvent * );
virtual void dropEvent( QDropEvent *);
virtual void dragEnterEvent( QDragEnterEvent * );
virtual void dragMoveEvent( QDragMoveEvent * );
// bool b_visualSelectorEnabled;
bool b_plDocked; ///< Is the playlist docked ?
+ bool b_hasPausedWhenMinimized;
#ifdef WIN32
HIMAGELIST himl;
"keyboard will always change your system volume. With this option unchecked, the " \
"volume buttons will change VLC's volume when VLC is selected and change the " \
"system volume when VLC is not selected." )
+
+#define QT_PAUSE_MINIMIZED_TEXT N_( "Pause the video playback when minimized" )
+#define QT_PAUSE_MINIMIZED_LONGTEXT N_( \
+ "With this option enabled, the playback will be automatically paused when minimizing the window." )
+
/**********************************************************************/
vlc_module_begin ()
set_shortname( "Qt" )
false /* advanced mode only */)
#endif
+ add_bool( "qt-pause-minimized", true, QT_PAUSE_MINIMIZED_TEXT,
+ QT_PAUSE_MINIMIZED_LONGTEXT, false )
+
add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */
add_obsolete_integer( "qt-display-mode" ) /* Suppressed since 1.1.0 */