[aseprite] 01/196: Fix clicks on X11 (fix #971)

Tobias Hansen thansen at moszumanska.debian.org
Wed Apr 20 18:49:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit fb4fc576bc201d5141482d8e7d2236bc435020b9
Author: David Capello <davidcapello at gmail.com>
Date:   Mon Feb 29 22:13:23 2016 -0300

    Fix clicks on X11 (fix #971)
---
 src/allegro/src/x/xwin.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/allegro/src/x/xwin.c b/src/allegro/src/x/xwin.c
index bc195db..dd0aa8d 100644
--- a/src/allegro/src/x/xwin.c
+++ b/src/allegro/src/x/xwin.c
@@ -2426,6 +2426,11 @@ static void _xwin_private_process_event(XEvent *event)
          }
          break;
       case EnterNotify:
+        /* Do not generate Enter/Leave notifications when
+           XGrabPointer/XUngrabPointer() are called
+           (NotifyGrab/NotifyUngrab modes). */
+        if (event->xcrossing.mode != NotifyNormal)
+           break;
          /* Mouse entered window.  */
          _mouse_on = TRUE;
          mouse_savedx = event->xcrossing.x;
@@ -2442,6 +2447,8 @@ static void _xwin_private_process_event(XEvent *event)
             (*_xwin_mouse_interrupt)(0, 0, 0, 0, mouse_buttons);
          break;
       case LeaveNotify:
+        if (event->xcrossing.mode != NotifyNormal)
+           break;
          _mouse_on = FALSE;
          if (_xwin_mouse_interrupt)
             (*_xwin_mouse_interrupt)(0, 0, 0, 0, mouse_buttons);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list