mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 02:05:07 +00:00
WindowServer: Disable the global menubar while a modal window is active.
This makes it much harder to screw with an application while it's showing a modal window, and matches what some other systems are doing. :^)
This commit is contained in:
parent
98b569a702
commit
6eb4ace6e8
3 changed files with 7 additions and 3 deletions
|
@ -681,10 +681,12 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event, WSWindow*& hovere
|
|||
deliver_mouse_event(*window, translated_event);
|
||||
}
|
||||
|
||||
if (menubar_rect().contains(event.position())) {
|
||||
// FIXME: Now that the menubar has a dedicated window, is this special-casing really necessary?
|
||||
if (!active_window_is_modal() && menubar_rect().contains(event.position())) {
|
||||
m_menu_manager.event(event);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_current_menu && m_current_menu->menu_window()) {
|
||||
auto& window = *m_current_menu->menu_window();
|
||||
bool event_is_inside_current_menu = window.rect().contains(event.position());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue