From a958884b5259ec5d6a2c97078b373c722ae20c39 Mon Sep 17 00:00:00 2001 From: Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> Date: Fri, 15 Mar 2024 17:17:13 +0100 Subject: lock: fix red screen issues with multiple monitors (#5100) * lock: use uint64_t for iMonitorID * lock: move activateLock to onNewSessionLock * lock: add red screen fade * lock: damage when fading the red screen and delay for screencopy * lock: remove redundant scheduleFrameForMonitor --- src/managers/SessionLockManager.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/managers/SessionLockManager.hpp') diff --git a/src/managers/SessionLockManager.hpp b/src/managers/SessionLockManager.hpp index 51232867..c2c539db 100644 --- a/src/managers/SessionLockManager.hpp +++ b/src/managers/SessionLockManager.hpp @@ -1,10 +1,13 @@ #pragma once #include "../defines.hpp" +#include "../helpers/Timer.hpp" +#include +#include struct SSessionLockSurface { wlr_session_lock_surface_v1* pWlrLockSurface = nullptr; - int iMonitorID = -1; + uint64_t iMonitorID = -1; bool mapped = false; @@ -18,6 +21,7 @@ struct SSessionLock { wlr_session_lock_v1* pWlrLock = nullptr; std::vector> vSessionLockSurfaces; + std::unordered_map mMonitorsWithoutMappedSurfaceTimers; DYNLISTENER(newSurface); DYNLISTENER(unlock); @@ -30,7 +34,9 @@ class CSessionLockManager { ~CSessionLockManager() = default; void onNewSessionLock(wlr_session_lock_v1*); - SSessionLockSurface* getSessionLockSurfaceForMonitor(const int&); + SSessionLockSurface* getSessionLockSurfaceForMonitor(uint64_t); + + float getRedScreenAlphaForMonitor(uint64_t); bool isSessionLocked(); bool isSurfaceSessionLock(wlr_surface*); -- cgit v1.2.3