-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
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 to |
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. |
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. |
Ah, ok. That could be a "regression" (introduced by me presumably). On this basis, I probably think your proposed change is the right thing to do (see http://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 standard |
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. |
I tried it on Windows with IPython 0.13 (plain, pylab, and qtconsole) and did not notice anything wrong. |
Forgive me if I'm wrong, but is the 'root' window here one of the 'extra' windows that was popping up in #1212? |
Please cherry pick this into 1.2. |
Hide Tk root window until later
This has been merged and cherry-picked to v1.2.x |
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.