mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
sessionlock: restore cursor if hidden on unlock (#10889)
if session locks have hidden the cursor its gonna be missing unless a new cursor shape is set, hovering windows makes us get one, moving the wallpaper/desktop does not. set it again to left_ptr as is default on compositor start.
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
#include "core/Compositor.hpp"
|
#include "core/Compositor.hpp"
|
||||||
#include "core/Output.hpp"
|
#include "core/Output.hpp"
|
||||||
#include "../helpers/Monitor.hpp"
|
#include "../helpers/Monitor.hpp"
|
||||||
|
#include "../render/Renderer.hpp"
|
||||||
|
|
||||||
CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_, SP<CWLSurfaceResource> surface_, PHLMONITOR pMonitor_, WP<CSessionLock> owner_) :
|
CSessionLockSurface::CSessionLockSurface(SP<CExtSessionLockSurfaceV1> resource_, SP<CWLSurfaceResource> surface_, PHLMONITOR pMonitor_, WP<CSessionLock> owner_) :
|
||||||
m_resource(resource_), m_sessionLock(owner_), m_surface(surface_), m_monitor(pMonitor_) {
|
m_resource(resource_), m_sessionLock(owner_), m_surface(surface_), m_monitor(pMonitor_) {
|
||||||
@@ -120,6 +121,10 @@ CSessionLock::CSessionLock(SP<CExtSessionLockV1> resource_) : m_resource(resourc
|
|||||||
|
|
||||||
m_events.unlockAndDestroy.emit();
|
m_events.unlockAndDestroy.emit();
|
||||||
|
|
||||||
|
// if lock tools have hidden it and doesnt restore it, we wont recieve a new cursor until the cursorshape protocol gives us one.
|
||||||
|
// so set it to left_ptr so the "desktop/wallpaper" doesnt end up missing a cursor until hover over a window sending us a shape.
|
||||||
|
g_pHyprRenderer->setCursorFromName("left_ptr");
|
||||||
|
|
||||||
m_inert = true;
|
m_inert = true;
|
||||||
PROTO::sessionLock->destroyResource(this);
|
PROTO::sessionLock->destroyResource(this);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user