1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

WindowServer: Remove misbehavior conditions for modals

This was too restrictive and there are already UI elements that rely
on this behavior. Now Blocking modals will preempt interaction with
all windows in their modal chain except those descending from them.
Fixes crashing in FilePicker when permission is denied.
This commit is contained in:
thankyouverycool 2022-08-27 16:48:11 -04:00 committed by Linus Groh
parent b2b68a7551
commit 1dd9086e1a
5 changed files with 14 additions and 18 deletions

View file

@ -576,10 +576,6 @@ 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() && mode != (i32)WindowMode::CaptureInput) || parent_window->is_capturing_input()) {
did_misbehave("CreateWindow with forbidden parent mode");
return;
}
}
if (type < 0 || type >= (i32)WindowType::_Count) {