[aseprite] 02/196: Don't generate a kSetCursorMessage when the mouse is outside the window
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 5798c896e219113298840bf71757e69d78d7acc9
Author: David Capello <davidcapello at gmail.com>
Date: Mon Feb 29 22:18:36 2016 -0300
Don't generate a kSetCursorMessage when the mouse is outside the window
Should finally fix #948
---
src/ui/manager.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/ui/manager.cpp b/src/ui/manager.cpp
index 1d585c5..ea745bc 100644
--- a/src/ui/manager.cpp
+++ b/src/ui/manager.cpp
@@ -249,6 +249,9 @@ bool Manager::generateMessages()
void Manager::generateSetCursorMessage(const gfx::Point& mousePos,
KeyModifiers modifiers)
{
+ if (get_mouse_cursor() == kOutsideDisplay)
+ return;
+
Widget* dst = (capture_widget ? capture_widget: mouse_widget);
if (dst)
enqueueMessage(
@@ -323,7 +326,9 @@ void Manager::generateMessagesFromSheEvents()
}
case she::Event::MouseEnter: {
+ _internal_set_mouse_position(sheEvent.position());
set_mouse_cursor(kArrowCursor);
+ lastMouseMoveEvent = sheEvent;
break;
}
@@ -332,6 +337,10 @@ void Manager::generateMessagesFromSheEvents()
setMouse(NULL);
_internal_no_mouse_position();
+
+ // To avoid calling kSetCursorMessage when the mouse leaves
+ // the window.
+ lastMouseMoveEvent = she::Event();
break;
}
--
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