nanogui: windows and focus in nano-X
Subject:
Re: [nanogui] windows and focus in nano-X
From:
"Greg Haerr" ####@####.####
Date:
18 Sep 2004 18:48:19 +0100
Message-Id: <15bc01c49da7$f42aa030$3eba46a6@winXP>
: How does the input focus work in nano-X as windows are created and
: destroyed? Especially without a pointing device.
Focus isn't changed with window creation. Without a pointing
device, window focus is changed through the GrSetFocus() API,
which is used by the window manager.
:
: ILets say you map you first window and an action causes another window
: to be mapped, and it maps another window. How does nano-X decide which
: of the remaining windows gets the focus when a window is destroyed?
If you destroy a window with the focus, GsCheckFocusWindow
is called, which will set the focus by walking upwards from the
current window looking for the first window which would accept
a keyboard event (that is, GR_EVENT_MASK_KEY_DOWN
set in the window event mask). See nanox/srvutil.c::GsCheckFocusWindow()
for more details.
Regards,
Greg