nanogui: Thread: GR_EVENT_MASK_BUTTON_DOWN sent to parent and child ???


[<<] [<] Page 1 of 1 [>] [>>]
Subject: GR_EVENT_MASK_BUTTON_DOWN sent to parent and child ???
From: Stan Soukhanov ####@####.####
Date: 9 Mar 2006 22:17:45 +0000
Message-Id: <1141942664.4410a98824c20@courrier.privatedns.com>

The way I undesrtood the documentation is that if both the parent and the child
register for GR_EVENT_TYPE_BUTTON_DOWN and a mouse is clicked in the child,
while both are displayed, then the event is only sent to the upper window, the
child.

Is this how it's supposed to work? After a mouse click what I'm getting is one
event sent to the child first, and then to the parent. Is this right?

I'm trying to do a modal dialog, so the parent shouldn't care about mouse events
received in the child. I'm using nano-X 0.91

Thanks in advance,

Stan


Subject: Re: [nanogui] GR_EVENT_MASK_BUTTON_DOWN sent to parent and child ???
From: "Greg Haerr" ####@####.####
Date: 10 Mar 2006 01:52:47 +0000
Message-Id: <0fa701c643e5$533f0a90$6401a8c0@winXP>

: The way I undesrtood the documentation is that if both the parent and the
child
: register for GR_EVENT_TYPE_BUTTON_DOWN and a mouse is clicked in the
child,
: while both are displayed, then the event is only sent to the upper window,
the
: child.
:
: Is this how it's supposed to work? After a mouse click what I'm getting is
one
: event sent to the child first, and then to the parent. Is this right?
:
: I'm trying to do a modal dialog, so the parent shouldn't care about mouse
events
: received in the child. I'm using nano-X 0.91

In nano-X, mouse events are sent to all windows the mouse is in, unlike
win32, where only the top window receives the event.  This was done
to be compatible with X11, which operates the same way.  You'll need
to unselect button down events in the parent window, or just ignore them
in your event loop, in order to get the functionality you're looking for.

In the X11 world, (unlike win32), this is usually accomplished by
comparing every event with a wid (window id) and then doing
something specific for that window.

Regards,

Greg

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.