1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

WindowServer: Ignore modal blocking if capturing input

This exception is necessary for ComboBoxes used in some blocking
Dialogs. CaptureInput is now the only mode which can spawn from
a blocking modal and it won't accept any children of its own.
This commit is contained in:
thankyouverycool 2022-08-25 11:28:01 -04:00 committed by Andreas Kling
parent bab8bd143f
commit 18b111b802
3 changed files with 11 additions and 9 deletions

View file

@ -576,7 +576,7 @@ void ConnectionFromClient::create_window(i32 window_id, Gfx::IntRect const& rect
did_misbehave("CreateWindow with bad parent_window_id");
return;
}
if (parent_window->is_blocking() || (parent_window->is_capturing_input() && mode == (i32)WindowMode::CaptureInput)) {
if ((parent_window->is_blocking() && mode != (i32)WindowMode::CaptureInput) || parent_window->is_capturing_input()) {
did_misbehave("CreateWindow with forbidden parent mode");
return;
}