forked from openlp/openlp
Fixed bug #1049036 where on osx openlp exited incorrectly with modified service.
This commit is contained in:
parent
0a65493ce0
commit
c0a165d818
@ -138,11 +138,16 @@ class MainDisplay(Display):
|
|||||||
if Settings().value(u'advanced/x11 bypass wm',
|
if Settings().value(u'advanced/x11 bypass wm',
|
||||||
QtCore.QVariant(True)).toBool():
|
QtCore.QVariant(True)).toBool():
|
||||||
windowFlags |= QtCore.Qt.X11BypassWindowManagerHint
|
windowFlags |= QtCore.Qt.X11BypassWindowManagerHint
|
||||||
# FIXME: QtCore.Qt.SplashScreen is workaround to make display screen
|
# TODO: The following combination of windowFlags works correctly
|
||||||
# stay always on top on Mac OS X. For details see bug 906926.
|
# on Mac OS X. For next OpenLP version we should test it on other
|
||||||
# It needs more investigation to fix it properly.
|
# platforms. For OpenLP 2.0 keep it only for OS X to not cause any
|
||||||
|
# regressions on other platforms.
|
||||||
if sys.platform == 'darwin':
|
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.setWindowFlags(windowFlags)
|
||||||
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
|
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
|
||||||
self.setTransparency(False)
|
self.setTransparency(False)
|
||||||
|
Loading…
Reference in New Issue
Block a user