Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1395 Overrideredirect window takes focus, Aqua

obsolete: 8.4.1
closed-out-of-date
5
2005-09-20
2003-01-28
Anonymous
No

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.

Discussion

  • Logged In: NO

    Submitted by Tom Goddard
    goddard@cgl.ucsf.edu

     
  • Al Larson
    Al Larson
    2003-07-30

    Logged In: YES
    user_id=243036

    I have the exact same problem with my bubble help. Very
    annoying.

     
  • Logged In: NO

    In the example, the "wm raise .t" should be just "raise .t".

     
  • Logged In: NO

    In the example, the "wm raise .t" should be just "raise .t".

     
  • Logged In: NO

    Bug still present in 8.4.4. Tom Goddard

     
  • Don Porter
    Don Porter
    2003-10-03

    • summary: Overrideredirect window takes focus, Aqua Tk 8.4.1 --> Overrideredirect window takes focus, Aqua
     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2005-09-05

    • status: open --> pending-out-of-date
     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2005-09-05

    Logged In: YES
    user_id=72656

    Can this please be tried with 8.4.11? I made corrections to
    the way toplevel overrideredirect is handled as well that
    should correct this problem. Specifically for help windows,
    you should use the special window style (OS X window class
    mgmt) command:

    # Valid in Tk 8.4+
    if {[tk windowingsystem] eq "aqua"} {
    ::tk::unsupported::MacWindowStyle style $_top help none
    } else {
    wm overrideredirect $_top 1
    }

    The issue being that OS X has many variant window classes.
    Currently there doesn't appear to be a way to switch between
    them without recreating the whole window either.

     
    • status: pending-out-of-date --> closed-out-of-date
     
  • Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).