summaryrefslogtreecommitdiff
path: root/src/events/Windows.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-04-29 18:20:06 +0100
committerVaxry <vaxry@vaxry.net>2025-04-29 18:20:06 +0100
commit465e3d979d72da90ea4f715393a0d6d3098830b1 (patch)
tree6a079cb909199bd5e91520918a4eae9f6e005298 /src/events/Windows.cpp
parentb10a43dabc0d65a03a3a169ff292f0f18d9c6640 (diff)
window: make AsyncDialogBoxes not closeable
we don't want the user to accidentally close a popup for permissions or ANR. They can dismiss them by clicking an appropriate option.
Diffstat (limited to 'src/events/Windows.cpp')
-rw-r--r--src/events/Windows.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index 9e0d2be5..f476c6e8 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -2,6 +2,7 @@
#include "../Compositor.hpp"
#include "../helpers/WLClasses.hpp"
+#include "../helpers/AsyncDialogBox.hpp"
#include "../managers/input/InputManager.hpp"
#include "../managers/TokenManager.hpp"
#include "../managers/SeatManager.hpp"
@@ -327,6 +328,11 @@ void Events::listener_mapWindow(void* owner, void* data) {
PWINDOW->applyDynamicRule(r);
}
+ // make it uncloseable if it's a Hyprland dialog
+ // TODO: make some closeable?
+ if (CAsyncDialogBox::isAsyncDialogBox(PWINDOW->getPID()))
+ PWINDOW->m_closeableSince = Time::steadyNow() + std::chrono::years(10 /* Should be enough, no? */);
+
// disallow tiled pinned
if (PWINDOW->m_pinned && !PWINDOW->m_isFloating)
PWINDOW->m_pinned = false;