← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~mzibricky/openlp/bug_1049036 into lp:openlp

 

matysek has proposed merging lp:~mzibricky/openlp/bug_1049036 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1049036 in OpenLP: "osx - openlp not quitting properly with modified service"
  https://bugs.launchpad.net/openlp/+bug/1049036

For more details, see:
https://code.launchpad.net/~mzibricky/openlp/bug_1049036/+merge/124064

This fixes the related bug. For OSX should be now set proper windowflags.
-- 
https://code.launchpad.net/~mzibricky/openlp/bug_1049036/+merge/124064
Your team OpenLP Core is requested to review the proposed merge of lp:~mzibricky/openlp/bug_1049036 into lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py	2012-08-27 20:00:09 +0000
+++ openlp/core/ui/maindisplay.py	2012-09-12 21:48:19 +0000
@@ -138,11 +138,16 @@
         if Settings().value(u'advanced/x11 bypass wm',
             QtCore.QVariant(True)).toBool():
             windowFlags |= QtCore.Qt.X11BypassWindowManagerHint
-        # FIXME: QtCore.Qt.SplashScreen is workaround to make display screen
-        # stay always on top on Mac OS X. For details see bug 906926.
-        # It needs more investigation to fix it properly.
+        # TODO: The following combination of windowFlags works correctly
+        # on Mac OS X. For next OpenLP version we should test it on other
+        # platforms. For OpenLP 2.0 keep it only for OS X to not cause any
+        # regressions on other platforms.
         if sys.platform == 'darwin':
-            windowFlags |= QtCore.Qt.SplashScreen
+            windowFlags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Window
+            # For primary screen ensure it stays above the OS X dock
+            # and menu bar
+            if self.screens.current[u'primary']:
+                self.setWindowState(QtCore.Qt.WindowFullScreen)
         self.setWindowFlags(windowFlags)
         self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
         self.setTransparency(False)


Follow ups