Commit a75b65e7 authored by Ilkka Ollakka's avatar 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.
parent 3293fa77
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment