Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d96d104

Browse files
committed
No need to process_updates in gtk3.
gdk_window_process_updates is deprecated since GDK 3.22. Agg animations run fine without it, and removing it makes mpl_cairo animations faster. Being drawable is synonym to being mapped and visible.
1 parent 138ba58 commit d96d104

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/matplotlib/backends/backend_gtk3.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,8 @@ def on_draw_event(self, widget, ctx):
275275
pass
276276

277277
def draw(self):
278-
if self.get_visible() and self.get_mapped():
278+
if self.is_drawable():
279279
self.queue_draw()
280-
# do a synchronous draw (its less efficient than an async draw,
281-
# but is required if/when animation is used)
282-
self.get_property("window").process_updates (False)
283280

284281
def draw_idle(self):
285282
if self._idle_draw_id != 0:

0 commit comments

Comments
 (0)