Skip to content

Commit 3d9a0cd

Browse files
authored
Move resizing out of Window.focus, and into Window.init_for_scene (#2274)
1 parent 33dbf04 commit 3d9a0cd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

manimlib/window.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def init_for_scene(self, scene: Scene):
6969
mglw.activate_context(window=self, ctx=self.ctx)
7070
self.timer.start()
7171

72-
self.focus()
72+
# This line seems to resync the viewport
73+
self.on_resize(*self.size)
7374

7475
def get_monitor(self, index):
7576
try:
@@ -106,8 +107,6 @@ def focus(self):
106107
"""
107108
self._window.set_visible(False)
108109
self._window.set_visible(True)
109-
# This line seems to resync the viewport
110-
self.on_resize(*self.size)
111110

112111
def to_default_position(self):
113112
self.position = self.default_position

0 commit comments

Comments
 (0)