nanogui: why have two buttondown events


Previous by date: 4 Oct 2001 19:04:21 -0000 Re: Complete documentation posted for Microwindows, Greg Haerr
Next by date: 4 Oct 2001 19:04:21 -0000 Nano-X on Sparc Linux, Roland Dittel
Previous in thread: 4 Oct 2001 19:04:21 -0000 Re: why have two buttondown events, Greg Haerr
Next in thread:

Subject: Re: [nanogui] why have two buttondown events
From: "Greg Haerr" ####@####.####
Date: 4 Oct 2001 19:04:21 -0000
Message-Id: <048e01c14d09$1928c030$6817dbd0@censoft.com>

: : Hi,I create two windows, and one is the other's parent.
: : I find if I click the mouse on the region of child window, the parent
windown
: and the child windown both
: : gain the buttondonw event.Who can tell me why?
:
: [Greg wrote]
: This is the way Nano-X (and X11) works.  Instead of
: giving the event to the topmost window, like win32
: does, X and Nano-X give the event to all windows that
: have selected for it and intersect the point.

I was not quite correct in this response.
The exact behaviour of mouse-down events
with Nano-X has to do with something called
"implicit button grab."

When a button-down event occurs, Nano-X
will send the event to the topmost window
containing the current mouse point.  However,
if that window has selected for BOTH button
down AND button up events, then the server
will perform an implicit button grab, and
not send the button down event to any other windows.
If the window has NOT selected for BOTH
up and down button events, then Nano-X will
continue searching the window list and send the
button down event to windows underneath the
current one, repeating the above process.
[It sounds like your window has not selected for
both up and down events.]

An implicit button grab causes the server to
send the subsequence button-up event to the
original window, even if the mouse location has
moved outside it when the button-up occurs.

Clear as mud?

Regards,

Greg



Previous by date: 4 Oct 2001 19:04:21 -0000 Re: Complete documentation posted for Microwindows, Greg Haerr
Next by date: 4 Oct 2001 19:04:21 -0000 Nano-X on Sparc Linux, Roland Dittel
Previous in thread: 4 Oct 2001 19:04:21 -0000 Re: why have two buttondown events, Greg Haerr
Next in thread:


Powered by ezmlm-browse 0.20.