macos: dont send crossing events during grab
Fixes an issue where we can't drag scrollbars or text selections while outside of the application window.
This commit is contained in:
@@ -1120,10 +1120,21 @@ _gdk_macos_display_translate (GdkMacosDisplay *self,
|
||||
break;
|
||||
|
||||
case NSEventTypeMouseExited:
|
||||
[[NSCursor arrowCursor] set];
|
||||
/* fallthrough */
|
||||
case NSEventTypeMouseEntered:
|
||||
ret = synthesize_crossing_event (self, surface, nsevent, x, y);
|
||||
{
|
||||
GdkSeat *seat = gdk_display_get_default_seat (GDK_DISPLAY (self));
|
||||
GdkDevice *pointer = gdk_seat_get_pointer (seat);
|
||||
GdkDeviceGrabInfo *grab = _gdk_display_get_last_device_grab (GDK_DISPLAY (self), pointer);
|
||||
|
||||
if (grab == NULL)
|
||||
{
|
||||
if (event_type == NSEventTypeMouseExited)
|
||||
[[NSCursor arrowCursor] set];
|
||||
|
||||
ret = synthesize_crossing_event (self, surface, nsevent, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case NSEventTypeKeyDown:
|
||||
|
||||
Reference in New Issue
Block a user