[Idle-dev] Slow close?

Stephen M. Gava elguavas@users.sourceforge.net
26 Feb 2002 13:25:38 +1100


Ok, I tested my bugfix candidate for the pause on closing problem under
windows (windows 2000 only, I don't have any other windows here) and it
works just fine there too. I can't find any way to test for a toplevel's
place in the windowmanager's stacking order in tkinter, it's not in any
of the zillions of winfo_*() methods or in any other method or attribute
I can discover, so I guess the q&d call to lower() stays as it works
fine. The only other thing I can think of to check is, Bruce Sherwood,
if you're reading this can you try the fix under your rootless X on Aqua
setup to see if it works there too, although I can't see why it
wouldn't.

So the fix is to edit the maybesave() method in EditorWindow.py so that
it looks like the following:

def maybesave(self):
    if self.io:
        if not self.get_saved():
            if self.top.state()!='normal': 
                self.top.deiconify()
            self.top.lower()
            self.top.lift()
        return self.io.maybesave()

and remove these (first two) lines from the close() method:

self.top.wm_deiconify()
self.top.tkraise()


I guess that's a bugfix candidate for python idle too if anyone with
write access to the python tree wants to put it in cvs with a nice
explanatory comment. Or do I need to submit it as a patch?

Stephen.
-- 
Stephen M. Gava  <elguavas@users.sourceforge.net>
IDLEfork ( http://idlefork.sourceforge.net )  " just like IDLE, only
crunchy "