nanogui: what about the nanowm


Previous by date: 25 Oct 2000 09:43:09 -0000 what about the nanowm, Tony Hoo
Next by date: 25 Oct 2000 09:43:09 -0000 microwin for the motorola coldfire processor?, Casey Ballentine
Previous in thread: 25 Oct 2000 09:43:09 -0000 what about the nanowm, Tony Hoo
Next in thread: 25 Oct 2000 09:43:09 -0000 Re: what about the nanowm, Amit Kulkarni

Subject: Re: what about the nanowm
From: Alex Holden ####@####.####
Date: 25 Oct 2000 09:43:09 -0000
Message-Id: <Pine.LNX.4.04.10010251023000.1041-100000@hyperspace.linuxhacker.org>

On Wed, 25 Oct 2000, Tony Hoo wrote:
> I cannot understand why nanowm can recognise different application's
> wondows, because when nanowm received a event, it always handle the
> windows identfied by  "wid" of event ,but applications can has the same
> "wid" ? (as I known ,in the main() of the nanowm.c file,
> GR_ROOT_WINDOW_ID had be add to windowlist , but two application can
> produce two GR_ROOT_WINDOW_ID ) 

No, windows always have a unique window ID. Two applications can
manipulate the root window via GR_ROOT_WINDOW_ID, but there is only ever
one root window.

> another question is , why ordinary clients can get only their own
> events( I known that it used by unix socket) , but nanowm can get all
> the events ?

The window manager is an ordinary client. It selects for events on
the root window so that it is told whenever a window is created or
destroyed.

> I will add a application to work like nanowm , but if some client
> program press a special key, my program (I call it XIM server, for
> chinese input purpose) will respond to pop a input window, and hold up
> it's keyevent .and after processing ,return back another keycode to
> instead of initial key event. so , do I must update the nano-X? 

You need to have the keyboard focus to receive keyboard events. What you
probably will have to do is a GrGetFocus() to find the window with the
current focus, then a GrSetFocus() to give yourself the focus, do whatever
magic you want when you get keyboard events, then send the new key code on
to the window which originally had the focus using
GrInjectKeyboardEvent(). You'll need to select for GR_EVENT_TYPE_FOCUS_OUT
on your input window so that if an application gives the focus to a
window, you can find out which window it was set to, then grab the focus
again. Of course this will break if the application you grab the focus
from notices that it has lost the focus and does something special (like
ceasing to flash the input cursor or worse, ignoring any more input it
gets to that window or grabbing the focus back again).

-- 
--------------- Linux- the choice of a GNU generation. --------------
: Alex Holden (M1CJD)- Caver, Programmer, Land Rover nut, Radio Ham :
-------------------- http://www.linuxhacker.org/ --------------------


Previous by date: 25 Oct 2000 09:43:09 -0000 what about the nanowm, Tony Hoo
Next by date: 25 Oct 2000 09:43:09 -0000 microwin for the motorola coldfire processor?, Casey Ballentine
Previous in thread: 25 Oct 2000 09:43:09 -0000 what about the nanowm, Tony Hoo
Next in thread: 25 Oct 2000 09:43:09 -0000 Re: what about the nanowm, Amit Kulkarni


Powered by ezmlm-browse 0.20.