Ensure visible flags correct, and display if single screen works on Windows

This commit is contained in:
Jonathan Corwin 2011-12-22 20:11:52 +00:00
parent 1f6be045f5
commit 69490c8f2c
2 changed files with 11 additions and 1 deletions

View File

@ -405,6 +405,11 @@ class MainDisplay(Display):
Store the images so they can be replaced when required
"""
log.debug(u'hideDisplay mode = %d', mode)
if self.screens.display_count == 1:
# Only make visible if setting enabled
if not QtCore.QSettings().value(u'general/display on monitor',
QtCore.QVariant(True)).toBool():
return
if mode == HideMode.Screen:
self.frame.evaluateJavaScript(u'show_blank("desktop");')
self.setVisible(False)
@ -425,6 +430,11 @@ class MainDisplay(Display):
Make the stored images None to release memory.
"""
log.debug(u'showDisplay')
if self.screens.display_count == 1:
# Only make visible if setting enabled
if not QtCore.QSettings().value(u'general/display on monitor',
QtCore.QVariant(True)).toBool():
return
self.frame.evaluateJavaScript('show_blank("show");')
if self.isHidden():
self.setVisible(True)

View File

@ -967,7 +967,7 @@ class SlideController(Controller):
else:
Receiver.send_message(u'live_display_show')
else:
Receiver.send_message(u'live_display_hide', HideMode.Screen)
self.liveEscape()
def onSlideBlank(self):
"""