fix: resize cursor icon not showing when follow_mouse != 1

This commit is contained in:
Ching Pei Yang 2023-01-21 11:54:00 +01:00
parent 4881246e71
commit a8ef13277c

View file

@ -277,6 +277,11 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
}
if (pFoundWindow) {
// change cursor icon if hovering over border, skip if mouse bind is active
if (*PRESIZEONBORDER && *PRESIZECURSORICON && !pFoundWindow->m_bIsFullscreen && !g_pKeybindManager->m_bIsMouseBindActive) {
setCursorIconOnBorder(pFoundWindow);
}
if (*PFOLLOWMOUSE != 1 && !refocus) {
if (pFoundWindow != g_pCompositor->m_pLastWindow && g_pCompositor->m_pLastWindow &&
((pFoundWindow->m_bIsFloating && *PFLOATBEHAVIOR == 2) || (g_pCompositor->m_pLastWindow->m_bIsFloating != pFoundWindow->m_bIsFloating && *PFLOATBEHAVIOR != 0))) {
@ -309,11 +314,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
g_pCompositor->focusWindow(pFoundWindow, foundSurface);
}
// change cursor icon if hovering over border, skip if mouse bind (resize or move operations) is active
if (*PRESIZEONBORDER && *PRESIZECURSORICON && !pFoundWindow->m_bIsFullscreen && !g_pKeybindManager->m_bIsMouseBindActive) {
setCursorIconOnBorder(pFoundWindow);
}
m_bLastFocusOnLS = false;
} else {
if (pFoundLayerSurface && pFoundLayerSurface->layerSurface->current.keyboard_interactive && *PFOLLOWMOUSE != 3 && allowKeyboardRefocus) {