[aseprite] 177/308: Fix slow scroll/selection movement with Alleg4 port (fix #929)

Tobias Hansen thansen at moszumanska.debian.org
Tue Mar 8 02:45:08 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 eba8de03063aa95996e1f65e27b4692f0a38c521
Author: David Capello <davidcapello at gmail.com>
Date:   Mon Jan 4 12:15:23 2016 -0300

    Fix slow scroll/selection movement with Alleg4 port (fix #929)
---
 src/ui/manager.cpp | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/ui/manager.cpp b/src/ui/manager.cpp
index c57e0d7..0f2015c 100644
--- a/src/ui/manager.cpp
+++ b/src/ui/manager.cpp
@@ -1,5 +1,5 @@
 // Aseprite UI Library
-// Copyright (C) 2001-2013, 2015  David Capello
+// Copyright (C) 2001-2016  David Capello
 //
 // This file is released under the terms of the MIT license.
 // Read LICENSE.txt for more information.
@@ -336,11 +336,12 @@ void Manager::generateMessagesFromSheEvents()
       }
 
       case she::Event::MouseMove: {
+#ifndef USE_ALLEG4_BACKEND
         _internal_set_mouse_position(sheEvent.position());
 
         handleMouseMove(sheEvent.position(), m_mouseButtons,
                         sheEvent.modifiers());
-
+#endif
         lastMouseMoveEvent = sheEvent;
         break;
       }
@@ -384,8 +385,17 @@ void Manager::generateMessagesFromSheEvents()
 
   // Generate just one kSetCursorMessage for the last mouse position
   if (lastMouseMoveEvent.type() != she::Event::None) {
-    generateSetCursorMessage(lastMouseMoveEvent.position(),
-                             lastMouseMoveEvent.modifiers());
+    sheEvent = lastMouseMoveEvent;
+
+#ifdef USE_ALLEG4_BACKEND
+    _internal_set_mouse_position(sheEvent.position());
+
+    handleMouseMove(sheEvent.position(), m_mouseButtons,
+                    sheEvent.modifiers());
+#endif
+
+    generateSetCursorMessage(sheEvent.position(),
+                             sheEvent.modifiers());
   }
 }
 

-- 
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