1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-16 02:02:24 +00:00
serenity/Userland/Services/WindowServer/WindowMode.h
thankyouverycool 1dd9086e1a 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.
2022-08-28 16:04:35 +01:00

27 lines
714 B
C++

/*
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
namespace WindowServer {
// WindowMode sets modal behavior for windows in a modal chain
//
// - 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
// - CaptureInput: Captures input from its parent
// - Blocking: Preempts all interaction with its modal chain excepting descendants (default mode for Dialogs)
enum class WindowMode {
Modeless = 0,
Passive,
RenderAbove,
CaptureInput,
Blocking,
_Count,
};
}