This commit is contained in:
MRiMagneto 2026-05-06 14:19:27 -03:00 committed by GitHub
commit 2656531de0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -620,7 +620,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;
@ -832,12 +833,15 @@ void CInputManager::processMouseDownNormal(const IPointer::SButtonEvent& e, SP<I
// TODO detect click on LS properly
if (*PRESIZEONBORDER && !g_pSessionLockManager->isSessionLocked() && !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;
}
}
}
}