Skip to content

Commit

Permalink
Move resizing out of Window.focus, and into Window.init_for_scene (#2274
Browse files Browse the repository at this point in the history
)
  • Loading branch information
3b1b authored Dec 12, 2024
1 parent 33dbf04 commit 3d9a0cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions manimlib/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def init_for_scene(self, scene: Scene):
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:
Expand Down Expand Up @@ -106,8 +107,6 @@ def focus(self):
"""
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
Expand Down

0 comments on commit 3d9a0cd

Please sign in to comment.