mirror of
https://github.com/RGBCube/serenity
synced 2025-05-24 05:25:06 +00:00
WindowServer: Don't process menu bar events when modal is open
This prevents accesing the parent window menubar when a modal is currently open, which was not a desired behavior.
This commit is contained in:
parent
5250f4fb90
commit
b9be57a9cd
1 changed files with 2 additions and 1 deletions
|
@ -147,11 +147,12 @@ void MenuManager::event(Core::Event& event)
|
|||
|
||||
void MenuManager::handle_mouse_event(MouseEvent& mouse_event)
|
||||
{
|
||||
auto* active_window = WindowManager::the().active_window();
|
||||
bool handled_menubar_event = false;
|
||||
for_each_active_menubar_menu([&](Menu& menu) {
|
||||
if (menu.rect_in_menubar().contains(mouse_event.position())) {
|
||||
handle_menu_mouse_event(menu, mouse_event);
|
||||
handled_menubar_event = true;
|
||||
handled_menubar_event = !active_window || !active_window->is_modal();
|
||||
return IterationDecision::Break;
|
||||
}
|
||||
return IterationDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue