diff --git a/autotests/integration/xdgshellwindow_test.cpp b/autotests/integration/xdgshellwindow_test.cpp index ef6e8961ae..b21f55f696 100644 --- a/autotests/integration/xdgshellwindow_test.cpp +++ b/autotests/integration/xdgshellwindow_test.cpp @@ -370,12 +370,12 @@ void TestXdgShellWindow::testFullscreen() QVERIFY(surfaceConfigureRequestedSpy.wait()); shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value()); - auto window = Test::renderAndWaitForShown(surface.get(), QSize(100, 50), Qt::blue); + auto window = Test::renderAndWaitForShown(surface.get(), QSize(500, 250), Qt::blue); QVERIFY(window); QVERIFY(window->isActive()); QCOMPARE(window->layer(), NormalLayer); QVERIFY(!window->isFullScreen()); - QCOMPARE(window->clientSize(), QSize(100, 50)); + QCOMPARE(window->clientSize(), QSize(500, 250)); QCOMPARE(window->isDecorated(), decoMode == Test::XdgToplevelDecorationV1::mode_server_side); QCOMPARE(window->clientSizeToFrameSize(window->clientSize()), window->size()); @@ -412,14 +412,14 @@ void TestXdgShellWindow::testFullscreen() QCOMPARE(surfaceConfigureRequestedSpy.count(), 4); states = toplevelConfigureRequestedSpy.last().at(1).value(); QVERIFY(!(states & Test::XdgToplevel::State::Fullscreen)); - QCOMPARE(toplevelConfigureRequestedSpy.last().at(0).value(), QSize(100, 50)); + QCOMPARE(toplevelConfigureRequestedSpy.last().at(0).value(), QSize(500, 250)); shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value()); Test::render(surface.get(), toplevelConfigureRequestedSpy.last().at(0).value(), Qt::blue); QVERIFY(fullScreenChangedSpy.wait()); QCOMPARE(fullScreenChangedSpy.count(), 2); - QCOMPARE(window->clientSize(), QSize(100, 50)); + QCOMPARE(window->clientSize(), QSize(500, 250)); QVERIFY(!window->isFullScreen()); QCOMPARE(window->isDecorated(), decoMode == Test::XdgToplevelDecorationV1::mode_server_side); QCOMPARE(window->layer(), NormalLayer); diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index b4b4c0fbe0..5a3824c146 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -497,7 +497,8 @@ MaximizeMode XdgToplevelWindow::requestedMaximizeMode() const QSizeF XdgToplevelWindow::minSize() const { - return rules()->checkMinSize(m_shellSurface->minimumSize()); + const int enforcedMinimum = m_nextDecoration ? 150 : 20; + return rules()->checkMinSize(QSize(std::max(enforcedMinimum, m_shellSurface->minimumSize().width()), std::max(enforcedMinimum, m_shellSurface->minimumSize().height()))); } QSizeF XdgToplevelWindow::maxSize() const