mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 12:32:52 +00:00
Revert wrapping MouseEnter/Leave messages
Changes reverted to fix #4754
This commit is contained in:
parent
cadd766671
commit
c1405e0d3a
@ -488,34 +488,27 @@ void Manager::generateMessagesFromOSEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
case os::Event::MouseEnter: {
|
case os::Event::MouseEnter: {
|
||||||
auto msg = new CallbackMessage([osEvent, display]{
|
if (get_multiple_displays()) {
|
||||||
if (get_multiple_displays()) {
|
if (osEvent.window()) {
|
||||||
if (osEvent.window()) {
|
ASSERT(display != nullptr);
|
||||||
ASSERT(display != nullptr);
|
_internal_set_mouse_display(display);
|
||||||
_internal_set_mouse_display(display);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
set_mouse_cursor(kArrowCursor);
|
}
|
||||||
mouse_display = display;
|
set_mouse_cursor(kArrowCursor);
|
||||||
});
|
mouse_display = display;
|
||||||
msg->setRecipient(this);
|
|
||||||
enqueueMessage(msg);
|
|
||||||
lastMouseMoveEvent = osEvent;
|
lastMouseMoveEvent = osEvent;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case os::Event::MouseLeave: {
|
case os::Event::MouseLeave: {
|
||||||
auto msg = new CallbackMessage([this, display]{
|
if (mouse_display == display) {
|
||||||
if (mouse_display == display) {
|
set_mouse_cursor(kOutsideDisplay);
|
||||||
set_mouse_cursor(kOutsideDisplay);
|
setMouse(nullptr);
|
||||||
setMouse(nullptr);
|
|
||||||
|
|
||||||
_internal_no_mouse_position();
|
_internal_no_mouse_position();
|
||||||
mouse_display = nullptr;
|
mouse_display = nullptr;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
msg->setRecipient(this);
|
|
||||||
enqueueMessage(msg);
|
|
||||||
|
|
||||||
// To avoid calling kSetCursorMessage when the mouse leaves
|
// To avoid calling kSetCursorMessage when the mouse leaves
|
||||||
// the window.
|
// the window.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user