]> git.sesse.net Git - vlc/commitdiff
[Qt] use screenGeometry instead of screen.
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 15 Oct 2008 15:41:41 +0000 (17:41 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 15 Oct 2008 15:43:37 +0000 (17:43 +0200)
modules/gui/qt4/components/controller.cpp

index c3bad6205c7272c1c15286656e1c19ae72d9328a..e6d8f9adb04f747e19f83140fc446551007ad8af 100644 (file)
@@ -819,11 +819,11 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
     adjustSize ();  /* need to get real width and height for moving */
 
     /* center down */
-    QWidget * p_desktop = QApplication::desktop()->screen(
-                QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi ) );
+    QRect desktopRect = QApplication::desktop()->
+        screenGeometry( p_intf->p_sys->p_mi );
 
-    QPoint pos = QPoint( p_desktop->width() / 2 - width() / 2,
-          p_desktop->height() - height() );
+    QPoint pos = QPoint( desktopRect.width() / 2 - width() / 2,
+          desktopRect.height() - height() );
 
     getSettings()->beginGroup( "FullScreen" );
     move( getSettings()->value( "pos", pos ).toPoint() );