Skip to content

Commit ac12552

Browse files
committed
Make a super call more explicit in GTK Agg backends
1 parent 43044d9 commit ac12552

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/matplotlib/backends/backend_gtk3agg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ def blit(self, bbox=None):
7070
self.queue_draw_area(x, y, width, height)
7171

7272
def draw(self):
73+
# Call these explicitly because GTK's draw is a GObject method which
74+
# isn't cooperative with Python class methods.
7375
backend_agg.FigureCanvasAgg.draw(self)
74-
super().draw()
76+
backend_gtk3.FigureCanvasGTK3.draw(self)
7577

7678

7779
class FigureManagerGTK3Agg(backend_gtk3.FigureManagerGTK3):

lib/matplotlib/backends/backend_gtk4agg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ def on_draw_event(self, widget, ctx):
3838
return False
3939

4040
def draw(self):
41+
# Call these explicitly because GTK's draw is a GObject method which
42+
# isn't cooperative with Python class methods.
4143
backend_agg.FigureCanvasAgg.draw(self)
42-
super().draw()
44+
backend_gtk4.FigureCanvasGTK4.draw(self)
4345

4446

4547
class FigureManagerGTK4Agg(backend_gtk4.FigureManagerGTK4):

0 commit comments

Comments
 (0)