diff options
| author | Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> | 2025-07-14 13:13:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-14 13:13:54 +0200 |
| commit | 01971cb6c7b7607329314645bf46e83d985eafeb (patch) | |
| tree | 7c634faa6bfe228fc300845abb67765ed3372223 /src/managers/SessionLockManager.hpp | |
| parent | d0f58baf296a2cdd5df0f82212fe17dfbef8438e (diff) | |
session-lock: don't render workspaces when locked (#10865)
Avoid rendering the workspace behind if we are locked
Diffstat (limited to 'src/managers/SessionLockManager.hpp')
| -rw-r--r-- | src/managers/SessionLockManager.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/managers/SessionLockManager.hpp b/src/managers/SessionLockManager.hpp index da15496e..2938a851 100644 --- a/src/managers/SessionLockManager.hpp +++ b/src/managers/SessionLockManager.hpp @@ -3,6 +3,7 @@ #include "../defines.hpp" #include "../helpers/time/Timer.hpp" #include "../helpers/signal/Signal.hpp" +#include "./eventLoop/EventLoopTimer.hpp" #include <cstdint> #include <unordered_map> #include <unordered_set> @@ -29,10 +30,10 @@ struct SSessionLockSurface { struct SSessionLock { WP<CSessionLock> lock; - CTimer mLockTimer; + CTimer lockTimer; + SP<CEventLoopTimer> sendDeniedTimer; std::vector<UP<SSessionLockSurface>> vSessionLockSurfaces; - std::unordered_map<uint64_t, CTimer> mMonitorsWithoutMappedSurfaceTimers; struct { CHyprSignalListener newSurface; @@ -41,6 +42,7 @@ struct SSessionLock { } listeners; bool hasSentLocked = false; + bool hasSentDenied = false; std::unordered_set<uint64_t> lockedMonitors; }; @@ -51,10 +53,9 @@ class CSessionLockManager { WP<SSessionLockSurface> getSessionLockSurfaceForMonitor(uint64_t); - float getRedScreenAlphaForMonitor(uint64_t); - bool isSessionLocked(); - bool isSessionLockPresent(); + bool clientLocked(); + bool clientDenied(); bool isSurfaceSessionLock(SP<CWLSurfaceResource>); bool anySessionLockSurfacesPresent(); @@ -72,6 +73,7 @@ class CSessionLockManager { } m_listeners; void onNewSessionLock(SP<CSessionLock> pWlrLock); + void removeSendDeniedTimer(); }; inline UP<CSessionLockManager> g_pSessionLockManager; |
