Commit 52709dff authored by Richard Hult's avatar Richard Hult Committed by Richard Hult
Browse files

Don't traverse beyond the toplevel of the passed in window.

2007-05-28  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c
	(find_window_interested_in_event_mask): Don't traverse beyond the
	toplevel of the passed in window.

svn path=/trunk/; revision=17967
parent 63228c67
2007-05-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c
(find_window_interested_in_event_mask): Don't traverse beyond the
toplevel of the passed in window.
2007-05-28 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c: (_gdk_windowing_window_init): Set
......
......@@ -300,26 +300,32 @@ apply_filters (GdkWindow *window,
return result;
}
/* This function checks if the passed in window is interested in the
* event mask. If so, it's returned. If not, the event can be propagated
* to its parent.
/* Checks if the passed in window is interested in the event mask, and
* if so, it's returned. If not, the event can be propagated through
* its ancestors until one with the right event mask is found, up to
* the nearest toplevel.
*/
static GdkWindow *
find_window_interested_in_event_mask (GdkWindow *window,
GdkEventMask event_mask,
gboolean propagate)
find_window_interested_in_event_mask (GdkWindow *window,
GdkEventMask event_mask,
gboolean propagate)
{
while (window)
{
GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
GdkWindowObject *private;
private = GDK_WINDOW_OBJECT (window);
while (private)
{
if (private->event_mask & event_mask)
return window;
return (GdkWindow *)private;
if (!propagate)
return NULL;
else
window = GDK_WINDOW (private->parent);
/* Don't traverse beyond toplevels. */
if (GDK_WINDOW_TYPE (private) != GDK_WINDOW_CHILD)
break;
private = private->parent;
}
return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment