1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:08:12 +00:00

WindowServer: Don't eat a MouseUp when producing a MouseDoubleClick

Otherwise, double clicking a button will leave it in pressed state.
This commit is contained in:
Robin Burchell 2019-05-21 16:35:25 +02:00 committed by Andreas Kling
parent c9a9ca0dfe
commit 9aa9454c6b

View file

@ -749,10 +749,12 @@ void WSWindowManager::process_event_for_doubleclick(WSWindow& window, WSMouseEve
void WSWindowManager::deliver_mouse_event(WSWindow& window, WSMouseEvent& event)
{
window.event(event);
if (event.type() == WSEvent::MouseUp) {
process_event_for_doubleclick(window, event);
if (event.type() == WSEvent::MouseDoubleClick)
window.event(event);
}
window.event(event);
}
void WSWindowManager::process_mouse_event(WSMouseEvent& event, WSWindow*& hovered_window)