From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
Date: Tue, 23 Nov 2021 14:59:35 +0000 (UTC) [thread overview]
Message-ID: <1637679553.05d8b1ff72e2697b27b3cb2284d0e722202a6bf6.asturm@gentoo> (raw)
commit: 05d8b1ff72e2697b27b3cb2284d0e722202a6bf6
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 22 16:14:44 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Nov 23 14:59:13 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05d8b1ff
kde-plasma/kwin: Fix wrong window size in some cases
Upstream commits:
325208347c40d7311aea83572b5150ba3750cba9
1ba7b5ec63b61fa00b7eac59a1beca12323fefb3
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=445444
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...-enable-window-rules-for-all-xdg-toplevel.patch | 132 +++++++++++++++++++++
.../kwin/files/kwin-5.23.3-revert-2560288e.patch | 35 ++++++
kde-plasma/kwin/kwin-5.23.3-r1.ebuild | 2 +
3 files changed, 169 insertions(+)
diff --git a/kde-plasma/kwin/files/kwin-5.23.3-enable-window-rules-for-all-xdg-toplevel.patch b/kde-plasma/kwin/files/kwin-5.23.3-enable-window-rules-for-all-xdg-toplevel.patch
new file mode 100644
index 000000000000..fa52bd7a3481
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.23.3-enable-window-rules-for-all-xdg-toplevel.patch
@@ -0,0 +1,132 @@
+From 1ba7b5ec63b61fa00b7eac59a1beca12323fefb3 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Wed, 17 Nov 2021 18:36:00 +0200
+Subject: [PATCH] wayland: Enable window rules for all xdg-toplevel
+
+If a window wants to be initially shown in fullscreen mode, it will
+issue an xdg_toplevel.set_fullscreen request before the first surface
+commit.
+
+If a window wants to be shown in fullscreen mode and there hasn't been
+any first surface commit, kwin will cache the request and apply
+fullscreen mode when checking window rules in the initialize() function.
+
+On the other hand, window rules are disabled for plasma surfaces. The
+motivation behind that was to forbid user from messing with plasma's
+surfaces (this change was suggested during redesign of xdg-shell
+implementation).
+
+As it turns out, there are cases where plasma may ask to show a window
+in fullscreen mode, which also has a plasma surface installed, e.g.
+fullscreen application dashboard.
+
+In order to fix the dashboard, this change allows window rules to be
+applied to xdg-toplevel windows that also have plasma surfaces installed.
+
+As is, xdg-toplevel surfaces and plasma surfaces are very different in
+nature. Adding more quirks to handle plasma surfaces in
+XdgToplevelClient is not worth the effort and there are better
+alternatives, e.g. layer-shell.
+
+
+(cherry picked from commit 039b1d031e3e30c238c8d67ade376c6d52297d81)
+---
+ src/xdgshellclient.cpp | 65 +++++++++++++++++++++---------------------
+ 1 file changed, 32 insertions(+), 33 deletions(-)
+
+diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp
+index 9e8216a3a0..b4427b8cf7 100644
+--- a/src/xdgshellclient.cpp
++++ b/src/xdgshellclient.cpp
+@@ -647,7 +647,7 @@ void XdgToplevelClient::updateDecoration(bool check_workspace_pos, bool force)
+
+ bool XdgToplevelClient::supportsWindowRules() const
+ {
+- return !m_plasmaShellSurface;
++ return true;
+ }
+
+ StrutRect XdgToplevelClient::strutRect(StrutArea area) const
+@@ -946,7 +946,7 @@ void XdgToplevelClient::handleWindowClassChanged()
+ {
+ const QByteArray applicationId = m_shellSurface->windowClass().toUtf8();
+ setResourceClass(resourceName(), applicationId);
+- if (shellSurface()->isConfigured() && supportsWindowRules()) {
++ if (shellSurface()->isConfigured()) {
+ evaluateWindowRules();
+ }
+ setDesktopFileName(applicationId);
+@@ -1196,40 +1196,39 @@ void XdgToplevelClient::initialize()
+ // is sent if the client has called the set_mode() request with csd mode.
+ updateDecoration(false, true);
+
+- if (supportsWindowRules()) {
+- setupWindowRules(false);
+-
+- moveResize(rules()->checkGeometry(frameGeometry(), true));
+- maximize(rules()->checkMaximize(initialMaximizeMode(), true));
+- setFullScreen(rules()->checkFullScreen(initialFullScreenMode(), true), false);
+- setOnActivities(rules()->checkActivity(activities(), true));
+- setDesktops(rules()->checkDesktops(desktops(), true));
+- setDesktopFileName(rules()->checkDesktopFile(desktopFileName(), true).toUtf8());
+- if (rules()->checkMinimize(isMinimized(), true)) {
+- minimize(true); // No animation.
+- }
+- setSkipTaskbar(rules()->checkSkipTaskbar(skipTaskbar(), true));
+- setSkipPager(rules()->checkSkipPager(skipPager(), true));
+- setSkipSwitcher(rules()->checkSkipSwitcher(skipSwitcher(), true));
+- setKeepAbove(rules()->checkKeepAbove(keepAbove(), true));
+- setKeepBelow(rules()->checkKeepBelow(keepBelow(), true));
+- setShortcut(rules()->checkShortcut(shortcut().toString(), true));
+- setNoBorder(rules()->checkNoBorder(noBorder(), true));
++ setupWindowRules(false);
++
++ moveResize(rules()->checkGeometry(frameGeometry(), true));
++ maximize(rules()->checkMaximize(initialMaximizeMode(), true));
++ setFullScreen(rules()->checkFullScreen(initialFullScreenMode(), true), false);
++ setOnActivities(rules()->checkActivity(activities(), true));
++ setDesktops(rules()->checkDesktops(desktops(), true));
++ setDesktopFileName(rules()->checkDesktopFile(desktopFileName(), true).toUtf8());
++ if (rules()->checkMinimize(isMinimized(), true)) {
++ minimize(true); // No animation.
++ }
++ setSkipTaskbar(rules()->checkSkipTaskbar(skipTaskbar(), true));
++ setSkipPager(rules()->checkSkipPager(skipPager(), true));
++ setSkipSwitcher(rules()->checkSkipSwitcher(skipSwitcher(), true));
++ setKeepAbove(rules()->checkKeepAbove(keepAbove(), true));
++ setKeepBelow(rules()->checkKeepBelow(keepBelow(), true));
++ setShortcut(rules()->checkShortcut(shortcut().toString(), true));
++ setNoBorder(rules()->checkNoBorder(noBorder(), true));
++
++ // Don't place the client if its position is set by a rule.
++ if (rules()->checkPosition(invalidPoint, true) != invalidPoint) {
++ needsPlacement = false;
++ }
+
+- // Don't place the client if its position is set by a rule.
+- if (rules()->checkPosition(invalidPoint, true) != invalidPoint) {
+- needsPlacement = false;
+- }
++ // Don't place the client if the maximize state is set by a rule.
++ if (requestedMaximizeMode() != MaximizeRestore) {
++ needsPlacement = false;
++ }
+
+- // Don't place the client if the maximize state is set by a rule.
+- if (requestedMaximizeMode() != MaximizeRestore) {
+- needsPlacement = false;
+- }
++ discardTemporaryRules();
++ RuleBook::self()->discardUsed(this, false); // Remove Apply Now rules.
++ updateWindowRules(Rules::All);
+
+- discardTemporaryRules();
+- RuleBook::self()->discardUsed(this, false); // Remove Apply Now rules.
+- updateWindowRules(Rules::All);
+- }
+ if (isRequestedFullScreen()) {
+ needsPlacement = false;
+ }
+--
+GitLab
+
diff --git a/kde-plasma/kwin/files/kwin-5.23.3-revert-2560288e.patch b/kde-plasma/kwin/files/kwin-5.23.3-revert-2560288e.patch
new file mode 100644
index 000000000000..db91c918ec3d
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.23.3-revert-2560288e.patch
@@ -0,0 +1,35 @@
+From 325208347c40d7311aea83572b5150ba3750cba9 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Tue, 16 Nov 2021 22:37:26 +0200
+Subject: [PATCH] Revert "wayland: Check workspace position when preferred deco
+ mode changes"
+
+This reverts commit 2560288e4b66acfdbb8a8f4daafd2d600aeb525a.
+
+It broke alacricitty. The fix is not obvious, so revert the commit for
+the time being.
+
+BUG: 445444
+
+
+(cherry picked from commit 068d60e36a112c6b901010331ef3a995019c97cb)
+---
+ src/xdgshellclient.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp
+index af1bd57ac7..9e8216a3a0 100644
+--- a/src/xdgshellclient.cpp
++++ b/src/xdgshellclient.cpp
+@@ -1317,7 +1317,7 @@ void XdgToplevelClient::installXdgDecoration(XdgToplevelDecorationV1Interface *d
+ connect(m_xdgDecoration, &XdgToplevelDecorationV1Interface::preferredModeChanged, this, [this] {
+ if (m_isInitialized) {
+ // force is true as we must send a new configure response.
+- updateDecoration(/* check_workspace_pos */ true, /* force */ true);
++ updateDecoration(/* check_workspace_pos */ false, /* force */ true);
+ }
+ });
+ }
+--
+GitLab
+
diff --git a/kde-plasma/kwin/kwin-5.23.3-r1.ebuild b/kde-plasma/kwin/kwin-5.23.3-r1.ebuild
index cf0d965820df..24a401f083d2 100644
--- a/kde-plasma/kwin/kwin-5.23.3-r1.ebuild
+++ b/kde-plasma/kwin/kwin-5.23.3-r1.ebuild
@@ -102,6 +102,8 @@ PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
PATCHES=(
"${FILESDIR}/${P}-fix-xwayland-abstract-socket-addr.patch" # KDE-bug 442362, bug 813888
+ "${FILESDIR}/${P}-revert-2560288e.patch" # KDE-bug 445444
+ "${FILESDIR}/${P}-enable-window-rules-for-all-xdg-toplevel.patch"
)
src_prepare() {
next reply other threads:[~2021-11-23 14:59 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 14:59 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-04-21 20:48 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/ Andreas Sturmlechner
2025-04-15 0:05 Sam James
2025-03-09 22:16 Sam James
2025-03-05 22:20 Andreas Sturmlechner
2025-02-17 18:38 Sam James
2024-08-11 6:54 Andreas Sturmlechner
2024-03-08 20:44 Andreas Sturmlechner
2023-11-11 8:37 Andreas Sturmlechner
2023-09-20 13:15 Andreas Sturmlechner
2023-06-27 11:25 Andreas Sturmlechner
2023-05-10 11:37 Andreas Sturmlechner
2022-10-28 16:07 Andreas Sturmlechner
2022-05-25 21:13 Andreas Sturmlechner
2022-05-17 19:02 Andreas Sturmlechner
2022-04-18 14:17 Andreas Sturmlechner
2022-02-06 21:17 Andreas Sturmlechner
2021-12-15 11:28 Andreas Sturmlechner
2021-09-15 17:42 Andreas Sturmlechner
2020-10-04 16:07 Andreas Sturmlechner
2020-05-16 22:38 Andreas Sturmlechner
2020-05-16 22:38 Andreas Sturmlechner
2019-10-26 14:20 Andreas Sturmlechner
2018-11-13 11:32 Andreas Sturmlechner
2018-01-15 0:17 Andreas Sturmlechner
2017-06-10 16:12 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1637679553.05d8b1ff72e2697b27b3cb2284d0e722202a6bf6.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox