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

Skip to content

Commit 68f86b3

Browse files
committed
tkagg: raise each new window; partially addresses #596
This uses the method suggested by @gsonnenf in a comment on #596.
1 parent 1943acc commit 68f86b3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,9 @@ def destroy(*args):
609609
self.window.update()
610610
else:
611611
self.canvas.draw_idle()
612+
# Raise the new window.
613+
self.canvas.manager.window.attributes('-topmost', 1)
614+
self.canvas.manager.window.attributes('-topmost', 0)
612615
self._shown = True
613616

614617
def destroy(self, *args):

0 commit comments

Comments
 (0)