mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 05:44:59 +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
|
@ -104,6 +104,9 @@ void WSMenuManager::refresh()
|
|||
|
||||
void WSMenuManager::event(CEvent& event)
|
||||
{
|
||||
if (WSWindowManager::the().active_window_is_modal())
|
||||
return CObject::event(event);
|
||||
|
||||
if (event.type() == WSEvent::MouseMove || event.type() == WSEvent::MouseUp || event.type() == WSEvent::MouseDown || event.type() == WSEvent::MouseWheel) {
|
||||
auto& mouse_event = static_cast<WSMouseEvent&>(event);
|
||||
WSWindowManager::the().for_each_active_menubar_menu([&](WSMenu& menu) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue