[aseprite] 160/308: Handle several UI mouse movement events at once if they are in the she layer queue

Tobias Hansen thansen at moszumanska.debian.org
Tue Mar 8 02:45:06 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 5074ef2d6857e4ef28478ec59d0ff4cbea2c4826
Author: David Capello <davidcapello at gmail.com>
Date:   Mon Dec 28 13:02:45 2015 -0300

    Handle several UI mouse movement events at once if they are in the she layer queue
---
 src/ui/manager.cpp | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/src/ui/manager.cpp b/src/ui/manager.cpp
index b5ac30f..bf9d1ce 100644
--- a/src/ui/manager.cpp
+++ b/src/ui/manager.cpp
@@ -272,8 +272,6 @@ static MouseButtons mouse_buttons_from_she_to_ui(const she::Event& sheEvent)
 
 void Manager::generateMessagesFromSheEvents()
 {
-  she::Event lastMouseMoveEvent;
-
   // Events from "she" layer.
   she::Event sheEvent;
   for (;;) {
@@ -336,12 +334,10 @@ void Manager::generateMessagesFromSheEvents()
       }
 
       case she::Event::MouseMove: {
-        // TODO Currently we cannot handleMouseMove() for each
-        // she::Event::MouseMove as the UI library is not prepared yet
-        // to process more than one kMouseMoveMessage message for
-        // loop-cycle. The main problem are the functions to control
-        // scroll (Window::moveWindow() and Widget::scrollRegion()).
-        lastMouseMoveEvent = sheEvent;
+        _internal_set_mouse_position(sheEvent.position());
+
+        handleMouseMove(sheEvent.position(), m_mouseButtons,
+                        sheEvent.modifiers());
         break;
       }
 
@@ -381,13 +377,6 @@ void Manager::generateMessagesFromSheEvents()
       }
     }
   }
-
-  if (lastMouseMoveEvent.type() != she::Event::None) {
-    _internal_set_mouse_position(lastMouseMoveEvent.position());
-
-    handleMouseMove(lastMouseMoveEvent.position(), m_mouseButtons,
-                    lastMouseMoveEvent.modifiers());
-  }
 }
 
 void Manager::handleMouseMove(const gfx::Point& mousePos,

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