8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2a796ed + 1335c6c commit ff3a0e4Copy full SHA for ff3a0e4
lib/matplotlib/backends/backend_gtk3.py
@@ -392,7 +392,14 @@ def show(self):
392
self.window.show()
393
self.canvas.draw()
394
if mpl.rcParams['figure.raise_window']:
395
- self.window.present()
+ if self.window.get_window():
396
+ self.window.present()
397
+ else:
398
+ # If this is called by a callback early during init,
399
+ # self.window (a GtkWindow) may not have an associated
400
+ # low-level GdkWindow (self.window.get_window()) yet, and
401
+ # present() would crash.
402
+ _api.warn_external("Cannot raise window yet to be setup")
403
404
def full_screen_toggle(self):
405
self._full_screen_flag = not self._full_screen_flag
0 commit comments