diff options
| author | Ching Pei Yang <59727193+horriblename@users.noreply.github.com> | 2023-02-22 00:57:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-21 23:57:38 +0000 |
| commit | 513bbb80474e5752c7e84e707374e445a4954878 (patch) | |
| tree | 552ac9e1a4da788e4cb95ad96cc437bd81759478 /src/managers/input/InputManager.cpp | |
| parent | f1c9077139d1b670782b1e4e1286c17eb302465f (diff) | |
Resize on border icon bug (#1608)
* fix: reset border hover icon on setting empty focus
* cleanup comment
* fix: reset border hover icon on layer surface
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 0c6a2420..d5c5acb1 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -251,6 +251,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { if (!foundSurface) { if (!m_bEmptyFocusCursorSet) { + m_eBorderIconDirection = BORDERICON_NONE; if (g_pHyprRenderer->m_bHasARenderedCursor) { // TODO: maybe wrap? if (m_ecbClickBehavior == CLICKMODE_KILL) @@ -304,7 +305,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { } if (pFoundWindow) { - // change cursor icon if hovering over border, skip if mouse bind is active + // change cursor icon if hovering over border if (*PRESIZEONBORDER && *PRESIZECURSORICON && !pFoundWindow->m_bIsFullscreen && !pFoundWindow->hasPopupAt(mouseCoords)) { setCursorIconOnBorder(pFoundWindow); } @@ -343,6 +344,11 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { m_bLastFocusOnLS = false; } else { + if (*PRESIZEONBORDER && *PRESIZECURSORICON && m_eBorderIconDirection != BORDERICON_NONE) { + m_eBorderIconDirection = BORDERICON_NONE; + unsetCursorImage(); + } + if (pFoundLayerSurface && pFoundLayerSurface->layerSurface->current.keyboard_interactive && *PFOLLOWMOUSE != 3 && allowKeyboardRefocus) { g_pCompositor->focusSurface(foundSurface); } |
