gdk: Let implicit touch grabs coexist with an implicit pointer grab

Create the backing GdkTouchGrabInfo for touches even if the pointer
emulating touch sequence is already holding an implicit grab on a
window that didn't select for touch events.
This commit is contained in:
Carlos Garnacho
2012-02-21 03:27:51 +01:00
committed by Matthias Clasen
parent f12f0b3e3a
commit 688a974570

View File

@@ -9481,6 +9481,7 @@ proxy_button_event (GdkEvent *source_event,
GdkWindow *parent;
GdkEvent *event;
GdkPointerWindowInfo *pointer_info;
GdkDeviceGrabInfo *pointer_grab;
guint state;
guint32 time_;
GdkEventType type;
@@ -9506,11 +9507,14 @@ proxy_button_event (GdkEvent *source_event,
sequence = gdk_event_get_event_sequence (source_event);
pointer_info = _gdk_display_get_pointer_info (display, device);
pointer_grab = _gdk_display_has_device_grab (display, device, serial);
if ((type == GDK_BUTTON_PRESS ||
type == GDK_TOUCH_BEGIN) &&
!source_event->any.send_event &&
_gdk_display_has_device_grab (display, device, serial) == NULL)
(!pointer_grab ||
(type == GDK_TOUCH_BEGIN && pointer_grab->implicit &&
!_gdk_event_get_pointer_emulated (source_event))))
{
pointer_window =
_gdk_window_find_descendant_at (toplevel_window,