forked from openlp/openlp
Merge branch 'fix-windows-issue' into 'master'
Default to the first screen if there is no display screen See merge request openlp/openlp!375
This commit is contained in:
commit
e891cc066d
@ -855,11 +855,17 @@ class Renderer(RegistryBase, ThemePreviewRenderer):
|
|||||||
"""
|
"""
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.force_page = False
|
self.force_page = False
|
||||||
for screen in ScreenList():
|
screen_list = ScreenList()
|
||||||
|
for screen in screen_list:
|
||||||
if screen.is_display:
|
if screen.is_display:
|
||||||
self.setGeometry(screen.display_geometry.x(), screen.display_geometry.y(),
|
self.setGeometry(screen.display_geometry.x(), screen.display_geometry.y(),
|
||||||
screen.display_geometry.width(), screen.display_geometry.height())
|
screen.display_geometry.width(), screen.display_geometry.height())
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
# If there is no display screen, use the first screen as a fallback
|
||||||
|
screen = screen_list[0]
|
||||||
|
self.setGeometry(screen.display_geometry.x(), screen.display_geometry.y(),
|
||||||
|
screen.display_geometry.width(), screen.display_geometry.height())
|
||||||
# If the display is not show'ed and hidden like this webegine will not render
|
# If the display is not show'ed and hidden like this webegine will not render
|
||||||
self.show()
|
self.show()
|
||||||
self.hide()
|
self.hide()
|
||||||
|
Loading…
Reference in New Issue
Block a user