Tkinter: modal ok in windows, but not in Linux

DoubleM mmoum-xxxspam at
Sat Jan 17 00:46:05 CET 2004

Eric Brunel wrote:

<much snipped here>

> This won't however solve the OP's problem, which is that the main window
> can still be closed when the second window is running.
> We've had the same problem, and I finally ended up thinking this problem's
> is not Python's fault, nor Tkinter's one, nor even tk's one: with X11, the
> controls on the window frame are actually managed not by the client
> application (from the X11 server point of view), but by the window
> manager. If the window manager decides to ignore the grab set on one of
> your windows and to continue to treat events for the other windows, you're
> stuck. The only thing you can do is treating the window deletion event to
> explicitely ignore it via a root.protocol('WM_DELETE_WINDOW', ...). There
> may be a way of doing it automatically at tk's level, but it would
> certainly be a big work, not to mention that there may be some window
> managers that *do* take the grab_set into account, and so where this work
> would be unnecessary.

Thanks for the replies.  I rather suspected as much, given that it works
find in Windows XP, but was hoping I was wrong.


More information about the Python-list mailing list