A toplevel window with overrideredirect set takes the input focus
when raised in Aqua Tk 8.4.1. This kind of window is used for
implementing balloon help. It should not take keyboard and pointer
events when raised. The raise command is intended to change
stacking order -- the window manager then determines whether it
gets the focus. Overrideredirect windows are not supposed to be
managed by the window manager and so should never be given
the focus unless explicitly done so by a Tk command. The X11
and Windows Tk implementations do not give an overrideredirect
window the focus when it is raised.
The consequence of the current Aqua Tk 8.4.1 behaviour is that
balloon help windows steal the focus. For example, in the Python
shell (IDLE) after typing a function name and an open parenthesis
a balloon shows the expected arguments to the function. Since
this balloon window takes the keyboard focus when you continue
to type the function arguments they go to the balloon window
instead of the shell window.
Here are wish8.4 commands that demonstrates the problem.
toplevel .t ; wm withdraw .t ; wm overrideredirect .t 1
wm deiconify .t
wm raise .t
After the deiconify the toplevel (without a window frame) has the
keyboard focus. Clicking on another window and then invoking
the "wm raise .t" command gives the focus back to the
overrideredirect window .t.