vlc | branch: master | Adrien Maglo <mags...@videolan.org> | Thu Nov 23 17:40:13 2017 +0100| [cd6598579be9e5e0cf4c6d38ff31fdffb2cf5e79] | committer: Jean-Baptiste Kempf
Qt: fix a wrong logic for the check of the fullscreen screen number Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd6598579be9e5e0cf4c6d38ff31fdffb2cf5e79 --- modules/gui/qt/components/controller.cpp | 2 +- modules/gui/qt/main_interface.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp index 08a08d2212..2a732d1f12 100644 --- a/modules/gui/qt/components/controller.cpp +++ b/modules/gui/qt/components/controller.cpp @@ -986,7 +986,7 @@ void FullscreenControllerWidget::toggleFullwidth() int FullscreenControllerWidget::targetScreen() { - if( i_screennumber < 0 || i_screennumber > QApplication::desktop()->screenCount() ) + if( i_screennumber < 0 || i_screennumber >= QApplication::desktop()->screenCount() ) return QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); return i_screennumber; } diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp index 787abbf81f..3fbd58e5eb 100644 --- a/modules/gui/qt/main_interface.cpp +++ b/modules/gui/qt/main_interface.cpp @@ -860,7 +860,7 @@ void MainInterface::setVideoFullScreen( bool fs ) * than current number of screens, take screennumber where current interface * is */ - if( numscreen == -1 || numscreen > QApplication::desktop()->screenCount() ) + if( numscreen < 0 || numscreen >= QApplication::desktop()->screenCount() ) numscreen = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ); QRect screenres = QApplication::desktop()->screenGeometry( numscreen ); _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits