mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-10 14:09:49 +01:00
snap: don't snap to any windows if workspace has a fullscreen window (#8870)
This commit is contained in:
parent
780e3dd542
commit
602d6b7356
1 changed files with 5 additions and 3 deletions
|
@ -421,11 +421,13 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
|
||||||
SRange sourceY = {sourcePos.y, sourcePos.y + sourceSize.y};
|
SRange sourceY = {sourcePos.y, sourcePos.y + sourceSize.y};
|
||||||
|
|
||||||
if (*SNAPWINDOWGAP) {
|
if (*SNAPWINDOWGAP) {
|
||||||
const double GAPSIZE = *SNAPWINDOWGAP;
|
const double GAPSIZE = *SNAPWINDOWGAP;
|
||||||
const auto WSID = DRAGGINGWINDOW->workspaceID();
|
const auto WSID = DRAGGINGWINDOW->workspaceID();
|
||||||
|
const bool HASFULLSCREEN = DRAGGINGWINDOW->m_pWorkspace && DRAGGINGWINDOW->m_pWorkspace->m_bHasFullscreenWindow;
|
||||||
|
|
||||||
for (auto& other : g_pCompositor->m_vWindows) {
|
for (auto& other : g_pCompositor->m_vWindows) {
|
||||||
if (other == DRAGGINGWINDOW || other->workspaceID() != WSID || !other->m_bIsMapped || other->m_bFadingOut || other->isX11OverrideRedirect())
|
if ((HASFULLSCREEN && !other->m_bCreatedOverFullscreen) || other == DRAGGINGWINDOW || other->workspaceID() != WSID || !other->m_bIsMapped || other->m_bFadingOut ||
|
||||||
|
other->isX11OverrideRedirect())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const int OTHERBORDERSIZE = other->getRealBorderSize();
|
const int OTHERBORDERSIZE = other->getRealBorderSize();
|
||||||
|
|
Loading…
Reference in a new issue