Skip to content
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

Fix show command for Qt backend to raise window to top #1043

Closed
wants to merge 1 commit into from
Closed

Fix show command for Qt backend to raise window to top #1043

wants to merge 1 commit into from

Conversation

nmichaud
Copy link

When running ipython in pylab mode using the Qt4 backend (either from qtconsole or the ipython notebook), calling show() does not raise the window to the front.

@mdboom
Copy link
Member

mdboom commented Jul 30, 2012

Related to #596

@pelson
Copy link
Member

pelson commented Aug 19, 2012

Agreed. The feature request is in #596. If there is a specific ipython issue, it should go into the ipython issues tracker.

@pelson pelson closed this Aug 19, 2012
@pelson
Copy link
Member

pelson commented Sep 2, 2012

Apologies @nmichaud. I wonder if I closed this issue too soon (I'm not sure I had seen it was a PR rather than a repeat feature request). The implementation would need a bit of a review, but the functionality is definitely desirable.

@mdboom feel free to re-open if you think necessary.

@efiring
Copy link
Member

efiring commented Sep 2, 2012

As I noted in #596, I don't think that it is always desirable to have the figure window pop up, potentially on top of whatever else one is working on, and/or potentially stealing focus.
My reading of http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwidget.html#raise is that the PR here is more limited than what is requested in #596, in that it involves only the Qt application, not the OS window manager. Perhaps addressing #596 will require two levels, one like this at the Gui toolkit level, and another at the OS window manager level--though presumably implemented via facilities provided by the toolkit.

@dmcdougall
Copy link
Member

@efiring I think the correct method to use is this one.

@efiring
Copy link
Member

efiring commented Sep 3, 2012

@pelson, I think that depends on what one is trying to accomplish; it might be what raise_ does, or it might be what activateWindow does, or it might be both. I would be strongly opposed to having show always call activateWindow, but having it always call raise_ might be acceptable. In any case, I think the right way to approach this is by seeing to what extent all the gui toolkits have methods like these that mpl might be able to wrap in a gui-neutral fashion. I am not a fan of tacking little behavior tweaks (or additional toolbar buttons) onto individual toolkits. qt4 seems to invite this, and is already the oddball of the bunch. I am not opposed to all such attempts at optimization, but I think a conservative approach is advisable.

@dmcdougall
Copy link
Member

Wait, did you mean @pelson or did you mean me? I think you meant me.

Yes, my suggestion was purely a behavioural one. I did not mean to imply it should always be called by show. In fact, I find it quite inconvenient to always steal focus. It should be up to the user to decide. Sorry for the confusion.

@efiring
Copy link
Member

efiring commented Sep 3, 2012

@dmcdougall, yes, I was confused as to who I was replying to; I see we are in agreement as to the evils of forced focus stealing!

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

Successfully merging this pull request may close these issues.

None yet

5 participants