[vlc-devel] commit: qt4: add option --qt-fullscreen-screennumber to allow define screen where fullscreen goes (Ilkka Ollakka )
git version control
git at videolan.org
Tue Aug 25 08:22:54 CEST 2009
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Aug 25 09:13:47 2009 +0300| [a75b65e740965f7df9043cfd66c21e7dbcbddb28] | committer: Ilkka Ollakka
qt4: add option --qt-fullscreen-screennumber to allow define screen where fullscreen goes
screennumbers starts from 1 onward, this allows user again to define if
he wants fullscreen window on particular screen instead of the one where
interface is.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a75b65e740965f7df9043cfd66c21e7dbcbddb28
---
modules/gui/qt4/components/controller.cpp | 4 +++-
modules/gui/qt4/components/interface_widgets.cpp | 9 ++++++++-
modules/gui/qt4/qt4.cpp | 7 +++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index 3189d71..2c6af5e 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -711,7 +711,9 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWi
/* First Move */
QPoint pos1 = getSettings()->value( "FullScreen/pos" ).toPoint();
- int number = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
+ int number = config_GetInt( p_intf, "qt-fullscreen-screennumber" );
+ if( number == -1 || number > QApplication::desktop()->numScreens() )
+ number = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
if( QApplication::desktop()->screenGeometry( number ).contains( pos1, true ) )
{
move( pos1 );
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 05f8e2d..2aa9731 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -205,7 +205,14 @@ void VideoWidget::SetFullScreen( bool b_fs )
if( b_fs )
{ /* Go full-screen */
- int numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
+ int numscreen = config_GetInt( p_intf, "qt-fullscreen-screennumber" );
+ /* if user hasn't defined screennumber, or screennumber that is bigger
+ * than current number of screens, take screennumber where current interface
+ * is
+ */
+ if( numscreen == -1 || numscreen > QApplication::desktop()->numScreens() )
+ numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
+
QRect screenres = QApplication::desktop()->screenGeometry( numscreen );
reparentable->setWindowState( newstate );
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index e1128ac..1f30b3a 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -161,6 +161,10 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define QT_FULLSCREEN_TEXT N_( "Show a controller in fullscreen mode" )
#define QT_NATIVEOPEN_TEXT N_( "Embed the file browser in open dialog" )
+#define FULLSCREEN_NUMBER_TEXT N_( "Define which screen fullscreen goes" )
+#define FULLSCREEN_NUMBER_LONGTEXT N_( "Screennumber of fullscreen, instead of" \
+ "same screen where interface is" )
+
/* Various modes definition */
static const int i_mode_list[] =
{ QT_NORMAL_MODE, QT_ALWAYS_VIDEO_MODE, QT_MINIMAL_MODE };
@@ -233,6 +237,9 @@ vlc_module_begin ()
false )
change_internal ()
+ add_integer( "qt-fullscreen-screennumber", -1, NULL, FULLSCREEN_NUMBER_TEXT,
+ FULLSCREEN_NUMBER_LONGTEXT, false );
+
add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */
add_submodule ()
More information about the vlc-devel
mailing list