diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2022-08-18 11:00:08 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-25 13:28:50 +0200 |
commit | 589572cfa44308c4cfc62f366e95c97c7e6cdc9c (patch) | |
tree | 068d27c16924f177cca097dcb1cca5b1d39f59c1 /Userland/DevTools/HackStudio | |
parent | 609391b46e3ccc07dd86fd3c298909dc14e6949a (diff) | |
download | serenity-589572cfa44308c4cfc62f366e95c97c7e6cdc9c.zip |
LibGUI+WindowServer: Introduce WindowModes
Previously, Windows only understood blocking modality: Windows were
either modal, i.e., in a blocking state, or not. Windows could also
be set as Accessories or ToolWindows, attributes which technically
applied modes to their parents but were implemented ad hoc. This patch
redefines these modal effects as WindowModes and sets up some helpers.
This will let us simplify a lot of modal logic in the upcoming patches
and make it easier to build new modal effects in the future.
Windows can now set 1 of 5 modes before reification:
-Modeless: No modal effect; begins a new modal chain
-Passive: Window joins its modal chain but has no effect
-RenderAbove: Window renders above its parent
-CaptureInput: Window captures the active input role from its parent
-Blocking: Window blocks all interaction with its modal chain
States like fullscreen and tiling are dynamic and don't alter behavior
in modal chains, so they aren't included.
Diffstat (limited to 'Userland/DevTools/HackStudio')
-rw-r--r-- | Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp | 1 | ||||
-rw-r--r-- | Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp b/Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp index 04905caea8..8e227625d2 100644 --- a/Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp +++ b/Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp @@ -14,7 +14,6 @@ GitCommitDialog::GitCommitDialog(GUI::Window* parent) { resize(400, 260); center_within(*parent); - set_modal(true); set_title("Commit"); set_icon(parent->icon()); diff --git a/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp b/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp index e67e39a535..156cc68674 100644 --- a/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp +++ b/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp @@ -47,7 +47,6 @@ NewProjectDialog::NewProjectDialog(GUI::Window* parent) resize(500, 385); center_on_screen(); set_resizable(false); - set_modal(true); set_title("New project"); auto& main_widget = set_main_widget<GUI::Widget>(); |