[gimp] Bug 771444: Tablet stylus misbehaves when crossing...



commit 5037ff35ca6bc21fa2b8dcddec7f5df50c2b2c29
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Thu Sep 22 18:18:40 2016 +0200

    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 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-tool-events.c b/app/display/gimpdisplayshell-tool-events.c
index 16ad932..234d43d 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 &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]