mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
Merge branch 'synthetic-motion-grab' into 'master'
gdk: Avoid synthetic motion confusion Closes #3439 See merge request GNOME/gtk!3471
This commit is contained in:
commit
4e66e782ea
@ -2443,6 +2443,7 @@ gdk_surface_ensure_motion (GdkSurface *surface)
|
||||
GdkEvent *event;
|
||||
double x, y;
|
||||
GdkModifierType state;
|
||||
GdkSurface *grab_surface;
|
||||
|
||||
if (!surface->request_motion)
|
||||
return;
|
||||
@ -2459,6 +2460,12 @@ gdk_surface_ensure_motion (GdkSurface *surface)
|
||||
if (!gdk_surface_get_device_position (surface, device, &x, &y, &state))
|
||||
return;
|
||||
|
||||
if (gdk_device_grab_info (display, device, &grab_surface, NULL))
|
||||
{
|
||||
if (grab_surface != surface)
|
||||
return;
|
||||
}
|
||||
|
||||
event = gdk_motion_event_new (surface,
|
||||
device,
|
||||
NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user