mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 01:20:25 +00:00
Fix slow scroll/selection movement with Alleg4 port (fix #929)
This commit is contained in:
parent
910612101a
commit
eba8de0306
@ -1,5 +1,5 @@
|
|||||||
// Aseprite UI Library
|
// 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.
|
// This file is released under the terms of the MIT license.
|
||||||
// Read LICENSE.txt for more information.
|
// Read LICENSE.txt for more information.
|
||||||
@ -336,11 +336,12 @@ void Manager::generateMessagesFromSheEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
case she::Event::MouseMove: {
|
case she::Event::MouseMove: {
|
||||||
|
#ifndef USE_ALLEG4_BACKEND
|
||||||
_internal_set_mouse_position(sheEvent.position());
|
_internal_set_mouse_position(sheEvent.position());
|
||||||
|
|
||||||
handleMouseMove(sheEvent.position(), m_mouseButtons,
|
handleMouseMove(sheEvent.position(), m_mouseButtons,
|
||||||
sheEvent.modifiers());
|
sheEvent.modifiers());
|
||||||
|
#endif
|
||||||
lastMouseMoveEvent = sheEvent;
|
lastMouseMoveEvent = sheEvent;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -384,8 +385,17 @@ void Manager::generateMessagesFromSheEvents()
|
|||||||
|
|
||||||
// Generate just one kSetCursorMessage for the last mouse position
|
// Generate just one kSetCursorMessage for the last mouse position
|
||||||
if (lastMouseMoveEvent.type() != she::Event::None) {
|
if (lastMouseMoveEvent.type() != she::Event::None) {
|
||||||
generateSetCursorMessage(lastMouseMoveEvent.position(),
|
sheEvent = lastMouseMoveEvent;
|
||||||
lastMouseMoveEvent.modifiers());
|
|
||||||
|
#ifdef USE_ALLEG4_BACKEND
|
||||||
|
_internal_set_mouse_position(sheEvent.position());
|
||||||
|
|
||||||
|
handleMouseMove(sheEvent.position(), m_mouseButtons,
|
||||||
|
sheEvent.modifiers());
|
||||||
|
#endif
|
||||||
|
|
||||||
|
generateSetCursorMessage(sheEvent.position(),
|
||||||
|
sheEvent.modifiers());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user