From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 79066158089 for ; Sat, 11 Nov 2023 08:37:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BA20D2BC02E; Sat, 11 Nov 2023 08:37:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A10C42BC01B for ; Sat, 11 Nov 2023 08:37:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D89E0335D9A for ; Sat, 11 Nov 2023 08:37:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7052D1364 for ; Sat, 11 Nov 2023 08:37:17 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1699691780.67f76e16dd6a1e9038fcc22317bf761f1a128140.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/ X-VCS-Repository: repo/gentoo X-VCS-Files: kde-plasma/kwin/files/kwin-5.27.9-xdgshellwindow-enforce-min-size.patch kde-plasma/kwin/kwin-5.27.9-r1.ebuild X-VCS-Directories: kde-plasma/kwin/ kde-plasma/kwin/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 67f76e16dd6a1e9038fcc22317bf761f1a128140 X-VCS-Branch: master Date: Sat, 11 Nov 2023 08:37:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 75eccc1f-82d4-46bc-bc93-c90e6ff9dd8d X-Archives-Hash: fe0fb1e34004755860af776cd57336b7 commit: 67f76e16dd6a1e9038fcc22317bf761f1a128140 Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Nov 10 21:17:46 2023 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Nov 11 08:36:20 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67f76e16 kde-plasma/kwin: xdgshellwindow: enforce a minimum size for clients KDE-Bug: https://bugs.kde.org/469237 Signed-off-by: Andreas Sturmlechner gentoo.org> ...in-5.27.9-xdgshellwindow-enforce-min-size.patch | 71 ++++++++++++++++++++++ kde-plasma/kwin/kwin-5.27.9-r1.ebuild | 2 + 2 files changed, 73 insertions(+) diff --git a/kde-plasma/kwin/files/kwin-5.27.9-xdgshellwindow-enforce-min-size.patch b/kde-plasma/kwin/files/kwin-5.27.9-xdgshellwindow-enforce-min-size.patch new file mode 100644 index 000000000000..471a37a3e0bd --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.27.9-xdgshellwindow-enforce-min-size.patch @@ -0,0 +1,71 @@ +From 0900264e6f538ff915186b1bd9e528e568b28c1d Mon Sep 17 00:00:00 2001 +From: Xaver Hugl +Date: Wed, 23 Aug 2023 21:51:18 +0200 +Subject: [PATCH] xdgshellwindow: enforce a minimum size for clients + +It doesn't make sense for a window to become 1x1 pixels small. When we have +server side decorations we also know that the decoration takes a lot of +space, so this commit enforces a bigger minimum size for decorated windows + +BUG: 469237 + + +(cherry picked from commit 28c27609a4b45cf08b53dcc7dfe90f23c3338797) +--- + autotests/integration/xdgshellwindow_test.cpp | 8 ++++---- + src/xdgshellwindow.cpp | 3 ++- + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/autotests/integration/xdgshellwindow_test.cpp b/autotests/integration/xdgshellwindow_test.cpp +index 70716e49434..53489a27f6b 100644 +--- a/autotests/integration/xdgshellwindow_test.cpp ++++ b/autotests/integration/xdgshellwindow_test.cpp +@@ -375,12 +375,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()); + +@@ -417,14 +417,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 34201bdd05b..29d8623cac3 100644 +--- a/src/xdgshellwindow.cpp ++++ b/src/xdgshellwindow.cpp +@@ -600,7 +600,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 +-- +GitLab + diff --git a/kde-plasma/kwin/kwin-5.27.9-r1.ebuild b/kde-plasma/kwin/kwin-5.27.9-r1.ebuild index 8f4aa4f45ebd..348e6879fbc6 100644 --- a/kde-plasma/kwin/kwin-5.27.9-r1.ebuild +++ b/kde-plasma/kwin/kwin-5.27.9-r1.ebuild @@ -100,6 +100,8 @@ BDEPEND=" " PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5" +PATCHES=( "${FILESDIR}/${P}-xdgshellwindow-enforce-min-size.patch" ) # KDE-bug 469237 + src_prepare() { ecm_src_prepare use multimedia || eapply "${FILESDIR}/${PN}-5.26.80-gstreamer-optional.patch"