nanogui: GR_EVENT_MASK_BUTTON_DOWN sent to parent and child ???


Previous by date: 10 Mar 2006 01:52:47 +0000 Re: NanoX+FLTK+UTF-8, Greg Haerr
Next by date: 10 Mar 2006 01:52:47 +0000 Re: compile error when enabling freetype on arm processor, tj
Previous in thread: 10 Mar 2006 01:52:47 +0000 GR_EVENT_MASK_BUTTON_DOWN sent to parent and child ???, Stan Soukhanov
Next in thread:

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


Previous by date: 10 Mar 2006 01:52:47 +0000 Re: NanoX+FLTK+UTF-8, Greg Haerr
Next by date: 10 Mar 2006 01:52:47 +0000 Re: compile error when enabling freetype on arm processor, tj
Previous in thread: 10 Mar 2006 01:52:47 +0000 GR_EVENT_MASK_BUTTON_DOWN sent to parent and child ???, Stan Soukhanov
Next in thread:


Powered by ezmlm-browse 0.20.