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.
This commit is contained in:
parent
b10a43dabc
commit
465e3d979d
3 changed files with 16 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue