From 465e3d979d72da90ea4f715393a0d6d3098830b1 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 29 Apr 2025 18:20:06 +0100 Subject: 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. --- src/events/Windows.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/events/Windows.cpp') 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; -- cgit v1.2.3