Fixed bug #1049036 where on osx openlp exited incorrectly with modified service.

This commit is contained in:
Martin Zibricky 2012-09-12 23:06:26 +02:00
parent 0a65493ce0
commit c0a165d818

View File

@ -138,11 +138,16 @@ class MainDisplay(Display):
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']:
windowFlags |= QtCore.Qt.WindowStaysOnTopHint
self.setWindowFlags(windowFlags)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.setTransparency(False)