Take grabs into account.

2006-04-13  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkevents-quartz.c:
        (synthesize_enter_event):
        (synthesize_leave_event):
        (synthesize_crossing_events):
        Take grabs into account.

        (find_window_for_event):
        Only return grabbed window when owner_events is FALSE.
This commit is contained in:
Anders Carlsson 2006-04-13 08:51:33 +00:00 committed by Anders Carlsson
parent 7b19dcbe79
commit a62b7cdc9a
3 changed files with 35 additions and 3 deletions

View File

@ -1,3 +1,14 @@
2006-04-13 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
(synthesize_enter_event):
(synthesize_leave_event):
(synthesize_crossing_events):
Take grabs into account.
(find_window_for_event):
Only return grabbed window when owner_events is FALSE.
2006-04-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_header_focus): Reorganize slightly

View File

@ -1,3 +1,14 @@
2006-04-13 Anders Carlsson <andersca@imendio.com>
* gdk/quartz/gdkevents-quartz.c:
(synthesize_enter_event):
(synthesize_leave_event):
(synthesize_crossing_events):
Take grabs into account.
(find_window_for_event):
Only return grabbed window when owner_events is FALSE.
2006-04-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_header_focus): Reorganize slightly

View File

@ -798,6 +798,11 @@ synthesize_enter_event (GdkWindow *window,
{
GdkEvent *event;
if (_gdk_quartz_pointer_grab_window != NULL &&
!pointer_grab_owner_events &&
!(pointer_grab_event_mask & GDK_ENTER_NOTIFY_MASK))
return;
if (!(GDK_WINDOW_OBJECT (window)->event_mask & GDK_ENTER_NOTIFY_MASK))
return;
@ -829,6 +834,11 @@ synthesize_leave_event (GdkWindow *window,
{
GdkEvent *event;
if (_gdk_quartz_pointer_grab_window != NULL &&
!pointer_grab_owner_events &&
!(pointer_grab_event_mask & GDK_LEAVE_NOTIFY_MASK))
return;
if (!(GDK_WINDOW_OBJECT (window)->event_mask & GDK_LEAVE_NOTIFY_MASK))
return;
@ -926,7 +936,7 @@ synthesize_crossing_events (GdkWindow *window,
/* Dunno where we are coming from */
synthesize_enter_event (window, nsevent, mode, GDK_NOTIFY_UNKNOWN);
}
_gdk_quartz_update_mouse_window (window);
}
@ -1060,9 +1070,9 @@ find_window_for_event (NSEvent *nsevent, gint *x, gint *y)
GdkEventMask event_mask;
GdkWindow *real_window;
if (_gdk_quartz_pointer_grab_window)
if (_gdk_quartz_pointer_grab_window && !pointer_grab_owner_events)
{
if (pointer_grab_event_mask & get_event_mask_from_ns_event (nsevent))
if (pointer_grab_event_mask & get_event_mask_from_ns_event (nsevent))
{
int tempx, tempy;
GdkWindowObject *w = GDK_WINDOW_OBJECT (_gdk_quartz_pointer_grab_window);