diff --git a/autotests/integration/quick_tiling_test.cpp b/autotests/integration/quick_tiling_test.cpp index 690d2e7e09..1984fabf83 100644 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -584,23 +584,7 @@ void QuickTilingTest::testX11QuickTilingAfterVertMaximize() QVERIFY(quickTileChangedSpy.isValid()); QFETCH(QuickTileMode, mode); client->setQuickTileMode(mode, true); - QEXPECT_FAIL("left", "Quick tiling not working", Continue); - QEXPECT_FAIL("right", "Quick tiling not working", Continue); - QEXPECT_FAIL("top", "Quick tiling not working", Continue); - QEXPECT_FAIL("bottom", "Quick tiling not working", Continue); - QEXPECT_FAIL("top left", "Quick tiling not working", Continue); - QEXPECT_FAIL("top right", "Quick tiling not working", Continue); - QEXPECT_FAIL("bottom left", "Quick tiling not working", Continue); - QEXPECT_FAIL("bottom right", "Quick tiling not working", Continue); QCOMPARE(client->quickTileMode(), mode); - QEXPECT_FAIL("left", "Quick tiling not working", Continue); - QEXPECT_FAIL("right", "Quick tiling not working", Continue); - QEXPECT_FAIL("top", "Quick tiling not working", Continue); - QEXPECT_FAIL("bottom", "Quick tiling not working", Continue); - QEXPECT_FAIL("top left", "Quick tiling not working", Continue); - QEXPECT_FAIL("top right", "Quick tiling not working", Continue); - QEXPECT_FAIL("bottom left", "Quick tiling not working", Continue); - QEXPECT_FAIL("bottom right", "Quick tiling not working", Continue); QTEST(client->geometry(), "expectedGeometry"); QEXPECT_FAIL("", "We get two changed events", Continue); QCOMPARE(quickTileChangedSpy.count(), 1); diff --git a/geometry.cpp b/geometry.cpp index d128220657..7885b6b365 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -3360,16 +3360,19 @@ void AbstractClient::setQuickTileMode(QuickTileMode mode, bool keyboard) TabSynchronizer syncer(this, TabGroup::QuickTile|TabGroup::Geometry|TabGroup::Maximized); if (mode != QuickTileMode(QuickTileFlag::None)) { - m_quickTileMode = mode; // decorations may turn off some borders when tiled const ForceGeometry_t geom_mode = isDecorated() ? ForceGeometrySet : NormalGeometrySet; m_quickTileMode = int(QuickTileFlag::None); // Temporary, so the maximize code doesn't get all confused - setGeometry(electricBorderMaximizeGeometry(keyboard ? geometry().center() : Cursor::pos(), desktop()), geom_mode); - } - // Store the mode change - m_quickTileMode = mode; - setMaximize(false, false); + setMaximize(false, false); + + setGeometry(electricBorderMaximizeGeometry(keyboard ? geometry().center() : Cursor::pos(), desktop()), geom_mode); + // Store the mode change + m_quickTileMode = mode; + } else { + m_quickTileMode = mode; + setMaximize(false, false); + } emit quickTileModeChanged();