mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
WindowServer: Always process double clicks for mouse events
This used to be optional and was disabled in two cases: - On a mouse move event during dragging; because double clicks are only possible on mouse up events, this had no effect. - On a mouse event for automatic cursor tracking; this has now gained support for double click events. Since it's always enabled now, we can remove the `bool` argument.
This commit is contained in:
parent
448b187782
commit
3e70d41c57
3 changed files with 10 additions and 11 deletions
|
@ -168,7 +168,7 @@ void MenuManager::handle_mouse_event(MouseEvent& mouse_event)
|
|||
bool event_is_inside_current_menu = window->rect().contains(mouse_event.position());
|
||||
if (event_is_inside_current_menu) {
|
||||
WindowManager::the().set_hovered_window(window);
|
||||
WindowManager::the().deliver_mouse_event(*window, mouse_event, true);
|
||||
WindowManager::the().deliver_mouse_event(*window, mouse_event);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ void MenuManager::handle_mouse_event(MouseEvent& mouse_event)
|
|||
if (!menu->menu_window()->rect().contains(mouse_event.position()))
|
||||
continue;
|
||||
WindowManager::the().set_hovered_window(menu->menu_window());
|
||||
WindowManager::the().deliver_mouse_event(*menu->menu_window(), mouse_event, true);
|
||||
WindowManager::the().deliver_mouse_event(*menu->menu_window(), mouse_event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue