mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
WindowServer: Add misbehavior restriction for Blocking modals
Two Blocking modals in the same modal chain which aren't descended one from the other will block each other's input rendering the chain noninteractive. This has caused confusion in the past for builders so this warning makes the behavior explicitly forbidden.
This commit is contained in:
parent
ef7d9c0166
commit
325061b0e4
Notes:
sideshowbarker
2024-07-17 07:19:27 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/325061b0e4 Pull-request: https://github.com/SerenityOS/serenity/pull/16098
1 changed files with 5 additions and 0 deletions
|
@ -599,6 +599,11 @@ void ConnectionFromClient::create_window(i32 window_id, Gfx::IntRect const& rect
|
|||
did_misbehave("CreateWindow with bad parent_window_id");
|
||||
return;
|
||||
}
|
||||
|
||||
if (auto* blocker = parent_window->blocking_modal_window(); blocker && mode == (i32)WindowMode::Blocking) {
|
||||
did_misbehave("CreateWindow with illegal mode: reciprocally blocked");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (type < 0 || type >= (i32)WindowType::_Count) {
|
||||
|
|
Loading…
Reference in a new issue