input-capture: force cursor hiding

This commit is contained in:
Gwilherm Folliot 2025-01-09 14:03:53 +01:00
parent f0a29c2ac0
commit d90149657f
No known key found for this signature in database
GPG key ID: 90236D3623DCD660

View file

@ -1,6 +1,7 @@
#include "InputCapture.hpp"
#include "managers/SeatManager.hpp"
#include "render/Renderer.hpp"
#include <fcntl.h>
CInputCaptureProtocol::CInputCaptureProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) {
@ -15,10 +16,12 @@ void CInputCaptureProtocol::bindManager(wl_client* client, void* data, uint32_t
RESOURCE->setCapture([this](CHyprlandInputCaptureManagerV1* p) {
Debug::log(LOG, "[input-capture] Input captured");
active = true;
g_pHyprRenderer->ensureCursorRenderingMode();
});
RESOURCE->setRelease([this](CHyprlandInputCaptureManagerV1* p) {
Debug::log(LOG, "[input-capture] Input released");
active = false;
g_pHyprRenderer->ensureCursorRenderingMode();
});
sendKeymap(g_pSeatManager->keyboard.lock(), RESOURCE);