1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 17:15:07 +00:00
serenity/Userland/Services/WindowServer/WindowMode.h
thankyouverycool 24d299c9c8 LibGUI+WindowServer+Applets+Taskbar: Remove active input concepts
and the CaptureInput mode. They are a source of unneeded complexity
in WindowServer and have proven prone to regressions, so this patch
replaces them with a simple input preemption scheme using Popups.

Popup windows now have ergonomics similar to menus: When open,
a popup preempts all mouse and key events for the entire window
stack; however, they are fragile and will close after WindowServer
swallows the first event outside them. This is similar to how combo
box windows and popups work in the classic Windows DE and has the
added benefit of letting the user click anywhere to dismiss a popup
without having to worry about unwanted interactions with other
widgets.
2022-11-19 16:04:42 +01:00

25 lines
656 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
// - Blocking: Preempts all interaction with its modal chain excepting descendants and popups (default mode for Dialogs)
enum class WindowMode {
Modeless = 0,
Passive,
RenderAbove,
Blocking,
_Count,
};
}