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
This commit is contained in:
Martin Gräßlin 2016-11-02 12:35:47 +01:00
parent 6c121436e2
commit 679e417808
2 changed files with 2 additions and 1 deletions

View file

@ -664,7 +664,6 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingX11Panel()
QVERIFY(panelHiddenSpy.wait()); QVERIFY(panelHiddenSpy.wait());
// now try to snap again // now try to snap again
QEXPECT_FAIL("", "BUG 365892", Continue);
QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint); QCOMPARE(Workspace::self()->adjustClientPosition(testWindow, targetPoint, false), targetPoint);
// and destroy the panel again // and destroy the panel again

View file

@ -527,6 +527,8 @@ QPoint Workspace::adjustClientPosition(AbstractClient* c, QPoint pos, bool unres
continue; continue;
if ((*l)->isMinimized()) if ((*l)->isMinimized())
continue; // is minimized continue; // is minimized
if (!(*l)->isShown(false))
continue;
if ((*l)->tabGroup() && (*l) != (*l)->tabGroup()->current()) if ((*l)->tabGroup() && (*l) != (*l)->tabGroup()->current())
continue; // is not active tab continue; // is not active tab
if (!((*l)->isOnDesktop(c->desktop()) || c->isOnDesktop((*l)->desktop()))) if (!((*l)->isOnDesktop(c->desktop()) || c->isOnDesktop((*l)->desktop())))