diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-06-26 13:43:32 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-06-26 13:43:32 +0200 |
| commit | f5c2dfc706776986ab9ff81a2512cc88f8aaef19 (patch) | |
| tree | ab7d09f7a655acc704ce8b1bc8374e4514a0ead8 /src/events/Devices.cpp | |
| parent | 4d09101e236c72ce7c34dc9c0fb87895f3b48146 (diff) | |
a bit of fixes to cursor hiding
Diffstat (limited to 'src/events/Devices.cpp')
| -rw-r--r-- | src/events/Devices.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/events/Devices.cpp b/src/events/Devices.cpp index 7a47df77..df4501cf 100644 --- a/src/events/Devices.cpp +++ b/src/events/Devices.cpp @@ -56,7 +56,16 @@ void Events::listener_mouseAxis(wl_listener* listener, void* data) { void Events::listener_requestMouse(wl_listener* listener, void* data) { const auto EVENT = (wlr_seat_pointer_request_set_cursor_event*)data; + + if (!g_pHyprRenderer->shouldRenderCursor()) + return; + if (!EVENT->surface) { + g_pHyprRenderer->m_bWindowRequestedCursorHide = true; + } else { + g_pHyprRenderer->m_bWindowRequestedCursorHide = false; + } + if (EVENT->seat_client == g_pCompositor->m_sSeat.seat->pointer_state.focused_client) wlr_cursor_set_surface(g_pCompositor->m_sWLRCursor, EVENT->surface, EVENT->hotspot_x, EVENT->hotspot_y); } |
