mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 22:05:59 +01:00
compositor: ignore grab extend behind special workspaces (#4944)
* compositor: ignore grab extend behind special workspaces * ignore the window entirely
This commit is contained in:
parent
28272d2d74
commit
8ccbd272cc
1 changed files with 10 additions and 2 deletions
|
@ -740,6 +740,14 @@ CWindow* CCompositor::vectorToWindowUnified(const Vector2D& pos, uint8_t propert
|
|||
continue;
|
||||
|
||||
const auto BB = w->getWindowBoxUnified(properties);
|
||||
const auto PWINDOWMONITOR = getMonitorFromID(w->m_iMonitorID);
|
||||
|
||||
// to avoid focusing windows behind special workspaces from other monitors
|
||||
if (!**PSPECIALFALLTHRU && PWINDOWMONITOR && PWINDOWMONITOR->specialWorkspaceID && w->m_iWorkspaceID != PWINDOWMONITOR->specialWorkspaceID &&
|
||||
BB.x >= PWINDOWMONITOR->vecPosition.x && BB.y >= PWINDOWMONITOR->vecPosition.y &&
|
||||
BB.x + BB.width <= PWINDOWMONITOR->vecPosition.x + PWINDOWMONITOR->vecSize.x && BB.y + BB.height <= PWINDOWMONITOR->vecPosition.y + PWINDOWMONITOR->vecSize.y)
|
||||
continue;
|
||||
|
||||
CBox box = {BB.x - BORDER_GRAB_AREA, BB.y - BORDER_GRAB_AREA, BB.width + 2 * BORDER_GRAB_AREA, BB.height + 2 * BORDER_GRAB_AREA};
|
||||
if (w->m_bIsFloating && w->m_bIsMapped && isWorkspaceVisible(w->m_iWorkspaceID) && !w->isHidden() && !w->m_bPinned && !w->m_sAdditionalConfigData.noFocus &&
|
||||
w.get() != pIgnoreWindow && (!aboveFullscreen || w->m_bCreatedOverFullscreen)) {
|
||||
|
|
Loading…
Reference in a new issue