diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 7ed7b4f6b..8ae80404c 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -595,7 +595,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse, st if (pFoundWindow) { // change cursor icon if hovering over border if (*PRESIZEONBORDER && *PRESIZECURSORICON) { - if (!pFoundWindow->isFullscreen() && !pFoundWindow->hasPopupAt(mouseCoords)) + if (!pFoundWindow->isFullscreen() && !pFoundWindow->hasPopupAt(mouseCoords) && PWORKSPACE->getWindows() > 1 && + (pFoundWindow->m_isFloating || PWORKSPACE->getWindows(false) == 0)) setCursorIconOnBorder(pFoundWindow); else if (m_borderIconDirection != BORDERICON_NONE) { m_borderIconDirection = BORDERICON_NONE; @@ -807,12 +808,15 @@ void CInputManager::processMouseDownNormal(const IPointer::SButtonEvent& e, SPisSessionLocked() && !m_lastFocusOnLS && e.state == WL_POINTER_BUTTON_STATE_PRESSED && (!w || !w->isX11OverrideRedirect())) { if (w && !w->isFullscreen()) { - const CBox real = {w->m_realPosition->value().x, w->m_realPosition->value().y, w->m_realSize->value().x, w->m_realSize->value().y}; - const CBox grab = {real.x - BORDER_GRAB_AREA, real.y - BORDER_GRAB_AREA, real.width + 2 * BORDER_GRAB_AREA, real.height + 2 * BORDER_GRAB_AREA}; + const auto PWORKSPACE = w->m_workspace; + if (PWORKSPACE && PWORKSPACE->getWindows() > 1 && (w->m_isFloating || PWORKSPACE->getWindows(false) == 0)) { + const CBox real = {w->m_realPosition->value().x, w->m_realPosition->value().y, w->m_realSize->value().x, w->m_realSize->value().y}; + const CBox grab = {real.x - BORDER_GRAB_AREA, real.y - BORDER_GRAB_AREA, real.width + 2 * BORDER_GRAB_AREA, real.height + 2 * BORDER_GRAB_AREA}; - if ((grab.containsPoint(mouseCoords) && (!real.containsPoint(mouseCoords) || w->isInCurvedCorner(mouseCoords.x, mouseCoords.y))) && !w->hasPopupAt(mouseCoords)) { - g_pKeybindManager->resizeWithBorder(e); - return; + if ((grab.containsPoint(mouseCoords) && (!real.containsPoint(mouseCoords) || w->isInCurvedCorner(mouseCoords.x, mouseCoords.y))) && !w->hasPopupAt(mouseCoords)) { + g_pKeybindManager->resizeWithBorder(e); + return; + } } } }