Skip to content

ENH: Figure.show() raises figure with qt backends #6384

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

Merged
merged 1 commit into from
Aug 13, 2017

Conversation

efiring
Copy link
Member

@efiring efiring commented May 8, 2016

This is an increment of progress addressing #6378, which follows on a long discussion in #596. The intention is to make Figure.show() activate and raise the figure, if it is managed by pyplot. It is presently specific to the qt*agg backends. I think that the Tkagg backend already behaves this way. If so, that leaves the gtk* and wxagg backends needing similar modifications.

Ideally we would also have the option of separate control over focus and stack position, but this seems to be more difficult. For example, with qt, using the window.raise_() method without activation (focus) doesn't work, at least on OSX. It flashes the raised window, and then puts it right back behind the one that was on top.

I suspect we are faced here with a fundamental conflict between "perfect", or even "very good", and "a little better". This PR is taking the latter approach because in the years since the issue was raised, we seem to have made little progress in arriving at the wonderful universal window management API we would all like.

@efiring efiring added this to the 2.1 (next point release) milestone May 8, 2016
@efiring efiring added the GUI: Qt label May 8, 2016
@tacaswell
Copy link
Member

👍 but I do not have a traditional windowing window manager installed to test this.

attn @mfitzp

@anntzer
Copy link
Contributor

anntzer commented Mar 19, 2017

FWIW this PR does not work for me in a vanilla KDE + ipython.

@ccordoba12
Copy link

Any chance to have this merged? It'd be really helpful for Spyder users.

@efiring
Copy link
Member Author

efiring commented May 26, 2017

@ccordoba12, might you be able to clarify the conditions under which it works, and those under which it doesn't? Do you know why @anntzer found it didn't work for him with KDE? Is it because the window manager has ultimate control, and the qt activate and raise functions only provide requests?
@anntzer, when it doesn't work in your configuration, does it do anything at all, or is it just behaving the same as without the change?
It would be good to reach a decision on this, and either merge it or close it.

@ccordoba12
Copy link

@efiring, I'll try it on my end and let you know what I find.

@anntzer
Copy link
Contributor

anntzer commented May 27, 2017

I see no difference in behavior. But if it works for others it should go in -- it probably depends on the specifics of the DE setup...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants