forked from openlp/openlp
divergences
This commit is contained in:
commit
5600946e0e
@ -222,6 +222,20 @@ class ScreenList(object):
|
||||
log.debug(u'reset_current_display')
|
||||
self.set_current_display(self.current[u'number'])
|
||||
|
||||
def which_screen(self, window):
|
||||
"""
|
||||
Return the Screen number that the centre of the passed window is in
|
||||
Window is a QWidget
|
||||
"""
|
||||
x = window.x() + (window.width() / 2)
|
||||
y = window.y() + (window.height() / 2)
|
||||
for screen in self.screen_list:
|
||||
size = screen[u'size']
|
||||
if x >= size.x() and x <= (size.x() + size.width()) \
|
||||
and y >= size.y() and y <= (size.y() + size.height()):
|
||||
return screen[u'number']
|
||||
return None
|
||||
|
||||
def _load_screen_settings(self):
|
||||
"""
|
||||
Loads the screen size and the monitor number from the settings.
|
||||
|
@ -956,7 +956,8 @@ class SlideController(Controller):
|
||||
display_type = QtCore.QSettings().value(
|
||||
self.parent().generalSettingsSection + u'/screen blank',
|
||||
QtCore.QVariant(u'')).toString()
|
||||
if not self.display.primary:
|
||||
if self.screens.which_screen(self.window()) != \
|
||||
self.screens.which_screen(self.display):
|
||||
# Order done to handle initial conversion
|
||||
if display_type == u'themed':
|
||||
self.onThemeDisplay(True)
|
||||
|
Loading…
Reference in New Issue
Block a user