From d357698c04a5cac917fb5515a7d76e70f770166e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Mon, 21 Jun 2010 00:13:28 +0200 Subject: [PATCH] Qt: Do not try to move when going to fullscreen if you have only 1 screen. --- modules/gui/qt4/main_interface.cpp | 4 ++++ modules/gui/qt4/qt4.hpp | 1 + 2 files changed, 5 insertions(+) diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 9e8a93c173..5c36be7ff1 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -614,7 +614,11 @@ void MainInterface::setVideoFullScreen( bool fs ) QRect screenres = QApplication::desktop()->screenGeometry( numscreen ); /* To be sure window is on proper-screen in xinerama */ +#if HAS_QT46 + if( !screenres.contains( pos() ) && QApplication::desktop()->screenCount() > 1 ) +#else if( !screenres.contains( pos() ) ) +#endif { msg_Dbg( p_intf, "Moving video to correct screen"); move( QPoint( screenres.x(), screenres.y() ) ); diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp index 64f58212b7..47407d5685 100644 --- a/modules/gui/qt4/qt4.hpp +++ b/modules/gui/qt4/qt4.hpp @@ -44,6 +44,7 @@ #endif #define HAS_QT45 ( QT_VERSION >= 0x040500 ) +#define HAS_QT46 ( QT_VERSION >= 0x040600 ) enum { DialogEventType = 0, -- 2.11.4.GIT