[vlmc-devel] MainWindow.cpp: Bugfix #240, Fixes VLMC crashes on Mac when switched from fullscreen to normal window mode .

Rohit Yadav git at videolan.org
Wed Jul 27 00:08:43 CEST 2011


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Wed Jul 27 09:21:18 2011 +0530| [193439ed064260238c272f7358a4d02075b30d2c] | committer: Rohit Yadav

MainWindow.cpp: Bugfix #240, Fixes VLMC crashes on Mac when switched from fullscreen to normal window mode.
Because of a bug in Qt 4.7.x for mac, we're required to turn off UnifiedTitleAndToolbarOnMac before making MainWindow fullscreen and re-enable it when toggling to normal window. For more information pl. refer: https://bugreports.qt.nokia.com//browse/QTBUG-16274

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=193439ed064260238c272f7358a4d02075b30d2c
---

 src/Gui/MainWindow.cpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 9164964..03331f6 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -727,10 +727,16 @@ MainWindow::zoomOut()
 void
 MainWindow::on_actionFullscreen_triggered( bool checked )
 {
-    if ( checked )
+    if ( checked && !isFullScreen() )
+    {
+        setUnifiedTitleAndToolBarOnMac( false );
         showFullScreen();
+    }
     else
+    {
+        setUnifiedTitleAndToolBarOnMac( true );
         showNormal();
+    }
 }
 
 void



More information about the Vlmc-devel mailing list