mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 23:09:51 +01:00
input: fix and unify client checking in mouseRequests
This commit is contained in:
parent
9654749244
commit
7a2027d1fd
1 changed files with 4 additions and 11 deletions
|
@ -470,7 +470,7 @@ void CInputManager::processMouseRequest(wlr_seat_pointer_request_set_cursor_even
|
|||
else
|
||||
g_pHyprRenderer->m_bWindowRequestedCursorHide = false;
|
||||
|
||||
if (!cursorImageUnlocked())
|
||||
if (!cursorImageUnlocked() || !g_pHyprRenderer->shouldRenderCursor())
|
||||
return;
|
||||
|
||||
// cursorSurfaceInfo.pSurface = e->surface;
|
||||
|
@ -487,18 +487,11 @@ void CInputManager::processMouseRequest(wlr_seat_pointer_request_set_cursor_even
|
|||
}
|
||||
|
||||
void CInputManager::processMouseRequest(wlr_cursor_shape_manager_v1_request_set_shape_event* e) {
|
||||
if (!g_pHyprRenderer->shouldRenderCursor())
|
||||
if (!g_pHyprRenderer->shouldRenderCursor() || !cursorImageUnlocked())
|
||||
return;
|
||||
|
||||
if (!g_pCompositor->m_pLastFocus)
|
||||
return;
|
||||
|
||||
if (wl_resource_get_client(g_pCompositor->m_pLastFocus->resource) != e->seat_client->client) {
|
||||
Debug::log(ERR, "Disallowing cursor shape request from unfocused");
|
||||
return;
|
||||
}
|
||||
|
||||
wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, wlr_cursor_shape_v1_name(e->shape));
|
||||
if (e->seat_client == g_pCompositor->m_sSeat.seat->pointer_state.focused_client)
|
||||
wlr_cursor_set_xcursor(g_pCompositor->m_sWLRCursor, g_pCompositor->m_sWLRXCursorMgr, wlr_cursor_shape_v1_name(e->shape));
|
||||
}
|
||||
|
||||
bool CInputManager::cursorImageUnlocked() {
|
||||
|
|
Loading…
Reference in a new issue