-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
tkagg: raise each new window; partially addresses #596 #5951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This uses the method suggested by @gsonnenf in a comment on matplotlib#596.
@@ -609,6 +609,9 @@ def destroy(*args): | |||
self.window.update() | |||
else: | |||
self.canvas.draw_idle() | |||
# Raise the new window. | |||
self.canvas.manager.window.attributes('-topmost', 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should make this a method on the FigureManager[TkAgg]
- that way we can re-use in code too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long-term, it might make sense to have a standard API for requests to the window manager. (We can't do more than make requests; each particular window manager has the final say.) I'm reluctant to try to design this now, though, so I'm not sure it would be a good idea to add to our public API by putting this (and the raise() in qt) into methods. It's debatable, and I have been on the fence about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be addressed by the GUI class structure overhaul which we need to review. |
I am 👍 on merging this, but use a very strange window manager so can not meaningfully test it. |
tkagg: raise each new window; partially addresses #596
tkagg: raise each new window; partially addresses matplotlib#596
Backported to v2.x via 07d17ba. |
This uses the method suggested by @gsonnenf in a comment on #596.