mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-15 19:52:05 +00:00
Fix MouseEnter and MouseLeave (fix #4240)
Callback messages were not being handled and since MouseEnter and MouseLeave events were wrapped into CallbackMessages they were lost and so never got called
This commit is contained in:
parent
85eb64ca35
commit
cbac6f98a7
@ -498,6 +498,7 @@ void Manager::generateMessagesFromOSEvents()
|
||||
set_mouse_cursor(kArrowCursor);
|
||||
mouse_display = display;
|
||||
});
|
||||
msg->setRecipient(this);
|
||||
enqueueMessage(msg);
|
||||
lastMouseMoveEvent = osEvent;
|
||||
break;
|
||||
@ -513,7 +514,7 @@ void Manager::generateMessagesFromOSEvents()
|
||||
mouse_display = nullptr;
|
||||
}
|
||||
});
|
||||
|
||||
msg->setRecipient(this);
|
||||
enqueueMessage(msg);
|
||||
|
||||
// To avoid calling kSetCursorMessage when the mouse leaves
|
||||
@ -1665,6 +1666,11 @@ bool Manager::onProcessMessage(Message* msg)
|
||||
else
|
||||
return false;
|
||||
}
|
||||
case kCallbackMessage: {
|
||||
CallbackMessage* callback = static_cast<CallbackMessage*>(msg);
|
||||
callback->call();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user