quartz: always send GDK_NOTIFY_NONLINEAR crossing events

so GtkMenu works properly. This is not right, but not more
wrong than always sending GDK_NOTIFY_ANCESTOR either.
(cherry picked from commit 35a9322e45)
This commit is contained in:
Michael Natterer 2012-11-09 17:12:30 +01:00
parent 2d5ad5f54e
commit 455a0ecc1c

View File

@ -1121,8 +1121,9 @@ synthesize_crossing_event (GdkWindow *window,
switch ([nsevent type]) switch ([nsevent type])
{ {
case NSMouseEntered: case NSMouseEntered:
/* Enter events are considered always to be from the root window as we /* Enter events are considered always to be from another toplevel
* can't know for sure from what window we enter. * window, this shouldn't negatively affect any app or gtk code,
* and is the only way to make GtkMenu work. EEK EEK EEK.
*/ */
if (!(window->event_mask & GDK_ENTER_NOTIFY_MASK)) if (!(window->event_mask & GDK_ENTER_NOTIFY_MASK))
return FALSE; return FALSE;
@ -1132,14 +1133,11 @@ synthesize_crossing_event (GdkWindow *window,
x_root, y_root, x_root, y_root,
GDK_ENTER_NOTIFY, GDK_ENTER_NOTIFY,
GDK_CROSSING_NORMAL, GDK_CROSSING_NORMAL,
GDK_NOTIFY_ANCESTOR); GDK_NOTIFY_NONLINEAR);
return TRUE; return TRUE;
case NSMouseExited: case NSMouseExited:
/* Exited always is to the root window as far as we are concerned, /* See above */
* since there is no way to reliably get information about what new
* window is entered when exiting one.
*/
if (!(window->event_mask & GDK_LEAVE_NOTIFY_MASK)) if (!(window->event_mask & GDK_LEAVE_NOTIFY_MASK))
return FALSE; return FALSE;
@ -1148,7 +1146,7 @@ synthesize_crossing_event (GdkWindow *window,
x_root, y_root, x_root, y_root,
GDK_LEAVE_NOTIFY, GDK_LEAVE_NOTIFY,
GDK_CROSSING_NORMAL, GDK_CROSSING_NORMAL,
GDK_NOTIFY_ANCESTOR); GDK_NOTIFY_NONLINEAR);
return TRUE; return TRUE;
default: default: