ENH: Figure.show() raises figure with qt backends #6384
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.