From 5037ff35ca6bc21fa2b8dcddec7f5df50c2b2c29 Mon Sep 17 00:00:00 2001 From: Massimo Valentini Date: Thu, 22 Sep 2016 18:18:40 +0200 Subject: [PATCH] Bug 771444: Tablet stylus misbehaves when crossing... the edge of a dock in multi-window-mode when the pointer is grabbed do not process a motion-notify-event having the wrong 'device' member. This avoids a harmful device change. --- app/display/gimpdisplayshell-tool-events.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c index 16ad93222d..234d43da18 100644 --- a/app/display/gimpdisplayshell-tool-events.c +++ b/app/display/gimpdisplayshell-tool-events.c @@ -338,6 +338,19 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas, GIMP_LOG (TOOL_EVENTS, "event (display %p): %s", display, gimp_print_event (event)); + /* See bug 771444 */ + if (shell->pointer_grabbed && + event->type == GDK_MOTION_NOTIFY) + { + GimpDeviceManager *manager = gimp_devices_get_manager (gimp); + GimpDeviceInfo *info; + + info = gimp_device_manager_get_current_device (manager); + + if (info->device != event->motion.device) + return FALSE; + } + /* Find out what device the event occurred upon */ if (! gimp->busy && ! shell->inferior_ignore_mode &&