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

WindowServer: Catch more Window stealing misbehavior

Previously it was possible for a window to register as a parentless
blocking modal then add itself to a stealable parent's modal chain,
bypassing a mode misbehavior check in create_window()

Also relaxes reciprocity for blockers with the same parent. This
scenario is usually created by simultaneous MessageBoxes. It's not
an ideal UX to cascade these, but there's no need to crash over it.
This commit is contained in:
thankyouverycool 2023-05-13 05:10:54 -04:00 committed by Andreas Kling
parent c87c4f6d94
commit 44049f5ad5
3 changed files with 14 additions and 6 deletions

View file

@ -13,7 +13,7 @@ namespace WindowServer {
// - Modeless: No modal effect (default mode for parentless windows)
// - Passive: Joins the modal chain but has no modal effect (default mode for child windows)
// - RenderAbove: Renders above its parent
// - Blocking: Preempts all interaction with its modal chain excepting descendants and popups (default mode for Dialogs)
// - Blocking: Preempts all interaction with its modal chain excepting descendants, sibling blockers, and popups (default mode for Dialogs)
enum class WindowMode {
Modeless = 0,
Passive,