mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
gdk: Have touch grabs behave like the implicit grab wrt crossing events
These are equivalent to an implicit grab (with !owner_events), so if the touch leaves or enters the grab window, the other window won't receive the corresponding counter-event.
This commit is contained in:
parent
c72a77b04c
commit
2f2774b7a9
@ -8340,14 +8340,27 @@ send_crossing_event (GdkDisplay *display,
|
||||
GdkEvent *event;
|
||||
guint32 window_event_mask, type_event_mask;
|
||||
GdkDeviceGrabInfo *grab;
|
||||
GdkTouchGrabInfo *touch_grab = NULL;
|
||||
GdkPointerWindowInfo *pointer_info;
|
||||
gboolean block_event = FALSE;
|
||||
GdkEventSequence *sequence;
|
||||
|
||||
grab = _gdk_display_has_device_grab (display, device, serial);
|
||||
pointer_info = _gdk_display_get_pointer_info (display, device);
|
||||
|
||||
if (grab != NULL &&
|
||||
!grab->owner_events)
|
||||
sequence = gdk_event_get_event_sequence (event_in_queue);
|
||||
if (sequence)
|
||||
touch_grab = _gdk_display_has_touch_grab (display, device, sequence, serial);
|
||||
|
||||
if (touch_grab)
|
||||
{
|
||||
if (window != touch_grab->window)
|
||||
return;
|
||||
|
||||
window_event_mask = touch_grab->event_mask;
|
||||
}
|
||||
else if (grab != NULL &&
|
||||
!grab->owner_events)
|
||||
{
|
||||
/* !owner_event => only report events wrt grab window, ignore rest */
|
||||
if ((GdkWindow *)window != grab->window)
|
||||
|
Loading…
Reference in New Issue
Block a user