set cursor to hand1 when moving a window
This commit is contained in:
parent
e2da4ff257
commit
d5eafe1926
3 changed files with 28 additions and 0 deletions
|
|
@ -339,6 +339,10 @@ void CInputManager::processMouseRequest(wlr_seat_pointer_request_set_cursor_even
|
|||
g_pHyprRenderer->m_bWindowRequestedCursorHide = false;
|
||||
}
|
||||
|
||||
if (m_bCursorImageOverriden) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_ecbClickBehavior == CLICKMODE_KILL) {
|
||||
wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "crosshair", g_pCompositor->m_sWLRCursor);
|
||||
return;
|
||||
|
|
@ -1184,3 +1188,17 @@ void CInputManager::newSwitch(wlr_input_device* pDevice) {
|
|||
void CInputManager::destroySwitch(SSwitchDevice* pDevice) {
|
||||
m_lSwitches.remove(*pDevice);
|
||||
}
|
||||
|
||||
void CInputManager::setCursorImageUntilUnset(std::string name) {
|
||||
wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, name.c_str(), g_pCompositor->m_sWLRCursor);
|
||||
m_bCursorImageOverriden = true;
|
||||
}
|
||||
|
||||
void CInputManager::unsetCursorImage() {
|
||||
if (!m_bCursorImageOverriden)
|
||||
return;
|
||||
|
||||
m_bCursorImageOverriden = false;
|
||||
if (!g_pHyprRenderer->m_bWindowRequestedCursorHide)
|
||||
wlr_xcursor_manager_set_cursor_image(g_pCompositor->m_sWLRXCursorMgr, "left_ptr", g_pCompositor->m_sWLRCursor);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue