Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Hide Tk root window until later#1285

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdboom merged 1 commit intomatplotlib:masterfromcgohlke:patch-12
Sep 24, 2012
Merged

Hide Tk root window until later#1285

mdboom merged 1 commit intomatplotlib:masterfromcgohlke:patch-12
Sep 24, 2012

Conversation

cgohlke
Copy link
Contributor

On Windows, when using the tkagg backend with mpl 1.2.0rc2, before a figure window is displayed, a small, empty window is shown for a short amount of time.
This becomes annoying.
I'm not sure this is the correct fix, but it works for me on Python 2.6 to 3.3.

On Windows, when using the tkagg backend with mpl 1.2.0rc2, before a figure window is displayed, a small, empty window is shown for a short amount of time.
@pelson
Copy link
Member

I'm not sure this is the correct fix either. It is definitely something we should fix though.

Is this a regression from 1.1.1? Are you able togit bisect to identify the commit that caused the problem?

@mdboom
Copy link
Member

This sort of thing often has interesting interactions with IPython, so we should make sure to test it both there and in the regular Python console.

@cgohlke
Copy link
ContributorAuthor

I think this behavior was always present. It is not a regression. It is just that the loading of the icon from disk in mpl 1.2 takes long enough such that the root window becomes visible. I can reproduce this with mpl 1.1.1 if I add a small delay right after the creation of the Tk window.

@pelson
Copy link
Member

It is just that the loading of the icon from disk in mpl 1.2 takes long enough such that the root window becomes visible.

Ah, ok.That could be a "regression" (introduced by me presumably). On this basis, I probably think your proposed changeis the right thing to do (seehttp://stackoverflow.com/questions/1406145/how-do-i-get-rid-of-python-tkinter-root-window).

@fperez it would be great to test this simple fix with IPython, are you able to try it out for us? (the only thing to look out for is that the standardTkAgg behaviour still functions as it always has)

@mdboom
Copy link
Member

This seems to have no adverse effects on Linux with IPython git master or IPython 0.13. Of course, the real test needs to happen on Windows where the initial bug that this solves happens in the first place.

@cgohlke
Copy link
ContributorAuthor

I tried it on Windows with IPython 0.13 (plain, pylab, and qtconsole) and did not notice anything wrong.

@pelson
Copy link
Member

Lets go for it then.@mdboom : I plan on cherry picking this into 1.2 (or@cgohlke can rebase to the 1.2 branch) - do you agree?

@dmcdougall
Copy link
Member

Forgive me if I'm wrong, but is the 'root' window here one of the 'extra' windows that was popping up in#1212?

@efiring
Copy link
Member

Yes it is, and your "withdraw" call in this PR is the right way to handle it--but this is independent of the fundamental problem with PR#1125 (reverted by PR#1221).

@cgohlke
Copy link
ContributorAuthor

Please cherry pick this into 1.2.

mdboom added a commit that referenced this pull requestSep 24, 2012
Hide Tk root window until later
@mdboommdboom merged commitafd4977 intomatplotlib:masterSep 24, 2012
@mdboom
Copy link
Member

This has been merged and cherry-picked to v1.2.x

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v1.2.x
Development

Successfully merging this pull request may close these issues.

5 participants
@cgohlke@pelson@mdboom@dmcdougall@efiring

[8]ページ先頭

©2009-2025 Movatter.jp