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

Skip to content
Prev Previous commit
Next Next commit
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.
  • Loading branch information
anntzer committed Jan 9, 2018
commit d96d1048cdf24357a2a599f23b635e317e5e47a5
5 changes: 1 addition & 4 deletions lib/matplotlib/backends/backend_gtk3.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,8 @@ def on_draw_event(self, widget, ctx):
pass

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

def draw_idle(self):
if self._idle_draw_id != 0:
Expand Down