tkagg: raise each new window; partially addresses #596 #5951

Merged
merged 1 commit into from Feb 3, 2016

Conversation

Projects
None yet
5 participants
Owner

efiring commented Jan 31, 2016

This uses the method suggested by @gsonnenf in a comment on #596.

@efiring efiring tkagg: raise each new window; partially addresses #596
This uses the method suggested by @gsonnenf in a comment on #596.
68f86b3

@pelson pelson commented on the diff Feb 1, 2016

lib/matplotlib/backends/backend_tkagg.py
@@ -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)
@pelson

pelson Feb 1, 2016

Member

I wonder if we should make this a method on the FigureManager[TkAgg] - that way we can re-use in code too.

@efiring

efiring Feb 1, 2016

Owner

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.

Owner

tacaswell commented Feb 1, 2016

This may be addressed by the GUI class structure overhaul which we need to review.

Owner

tacaswell commented Feb 1, 2016

I am 👍 on merging this, but use a very strange window manager so can not meaningfully test it.

@pelson pelson added a commit that referenced this pull request Feb 3, 2016

@pelson pelson Merge pull request #5951 from efiring/tk_raise
tkagg: raise each new window; partially addresses #596
600464d

@pelson pelson merged commit 600464d into matplotlib:master Feb 3, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

mdboom removed the needs_review label Feb 3, 2016

QuLogic added the GUI/tk label Feb 3, 2016

efiring deleted the efiring:tk_raise branch Jun 23, 2016

@QuLogic QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Oct 16, 2016

@pelson @QuLogic pelson + QuLogic Merge pull request #5951 from efiring/tk_raise
tkagg: raise each new window; partially addresses #596
07d17ba
Member

QuLogic commented Oct 18, 2016

Backported to v2.x via 07d17ba.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment