From 679e41780888b428a64389e06d7e2738904f3a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 2 Nov 2016 12:35:47 +0100 Subject: [PATCH] Don't snap to auto-hidden panels Summary: When moving windows we don't want to snap against not visible windows like auto-hidden panels. BUG: 365892 FIXED-IN: 5.8.4 Test Plan: So far only auto-test, manual test will follow. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3225 --- autotests/integration/move_resize_window_test.cpp | 1 - geometry.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/autotests/integration/move_resize_window_test.cpp b/autotests/integration/move_resize_window_test.cpp index 7bedad9948..77211faee2 100644 --- a/autotests/integration/move_resize_window_test.cpp +++ b/autotests/integration/move_resize_window_test.cpp @@ -664,7 +664,6 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingX11Panel() QVERIFY(panelHiddenSpy.wait()); // now try to snap again - QEXPECT_FAIL("", "BUG 365892", Continue); QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint); // and destroy the panel again diff --git a/geometry.cpp b/geometry.cpp index 73507b296f..812db7c143 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -527,6 +527,8 @@ QPoint Workspace::adjustClientPosition(AbstractClient* c, QPoint pos, bool unres continue; if ((*l)->isMinimized()) continue; // is minimized + if (!(*l)->isShown(false)) + continue; if ((*l)->tabGroup() && (*l) != (*l)->tabGroup()->current()) continue; // is not active tab if (!((*l)->isOnDesktop(c->desktop()) || c->isOnDesktop((*l)->desktop())))