Move resizing out of Window.focus, and into Window.init_for_scene (#2274)
Some checks are pending
docs / build up document and deploy (push) Waiting to run

This commit is contained in:
Grant Sanderson 2024-12-12 16:16:45 -06:00 committed by GitHub
parent 33dbf04985
commit 3d9a0cd25e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,7 +69,8 @@ class Window(PygletWindow):
mglw.activate_context(window=self, ctx=self.ctx)
self.timer.start()
self.focus()
# This line seems to resync the viewport
self.on_resize(*self.size)
def get_monitor(self, index):
try:
@ -106,8 +107,6 @@ class Window(PygletWindow):
"""
self._window.set_visible(False)
self._window.set_visible(True)
# This line seems to resync the viewport
self.on_resize(*self.size)
def to_default_position(self):
self.position = self.default_position