| Summary: | Assigned Shortcut in Window Rules does not work after closing and restarting application | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | D. Debnath <d_debnath> |
| Component: | rules | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | isma.af |
| Priority: | NOR | Keywords: | qt6 |
| Version First Reported In: | master | ||
| Target Milestone: | --- | ||
| Platform: | Neon | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/b62d212a5833a389b1aaa3a7ad4187e56e729e18 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | Window Rules for Konsole | ||
|
Description
D. Debnath
2023-12-17 14:04:16 UTC
I am unable to reproduce the issue. Please provide all the details about the window rule (type, shortcut, etc) Created attachment 164912 [details] Window Rules for Konsole (In reply to Vlad Zahorodnii from comment #1) > I am unable to reproduce the issue. Please provide all the details about the > window rule (type, shortcut, etc) I hope you're trying this on Wayland. This is an issue on Wayland only. Also, I've the same issue on multiple machines, and multiple distros (Arch Linux and KDE Neon Unstable) and so I'm confident that this should be reproducible. I've attached a screenshot of the Window Rules I'm using for Konsole. This is my ~/.config/kwinrulesrc [$Version] update_info=kwinrules.upd:replace-placement-string-to-enum,kwinrules.upd:use-virtual-desktop-ids [1] Description=Application settings for Konsole above=true aboverule=3 desktops=\\0 desktopsrule=2 minimize=true minimizerule=3 placementrule=2 shortcut=Meta+Return shortcutrule=2 skippager=true skippagerrule=3 skipswitcher=true skipswitcherrule=3 skiptaskbar=true skiptaskbarrule=3 wmclass=konsole org.kde.konsole wmclasscomplete=true wmclassmatch=1 [General] count=1 rules=1 Works fine on my machine. Have you tried using other shortcut? Okay, I've figured out the issue now! This happens when the Shortcut is set to "Force". It works when set to "Apply Initially". Can you reproduce the problem now? Why does setting it to "Force" create this issue? Is that intended behaviour? A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4926 Git commit b98607c6893633e0b5743132049e903ff59f533e by Vlad Zahorodnii. Committed on 15/01/2024 at 15:24. Pushed by vladz into branch 'master'. Fix cleanup of forced window shortcuts XdgToplevelWindow doesn't call finishWindowRules(). It creates a problem for Workspace::removeWindow() because it calls setShortcut() to release the window shortcut. While one way to fix the bug would be to add a finishWindowRules() call in XdgToplevelWindow, it would perhaps be not the best one because it would change the appearance of decoration when the window is closed. Instead, this change makes the workspace release the shortcut when the window is closed. It has a couple of advantages: the appearance of the decoration won't change, shortcut cleanup is better encapsulated. M +5 -0 src/useractions.cpp M +0 -4 src/workspace.cpp https://invent.kde.org/plasma/kwin/-/commit/b98607c6893633e0b5743132049e903ff59f533e Git commit b62d212a5833a389b1aaa3a7ad4187e56e729e18 by Vlad Zahorodnii. Committed on 15/01/2024 at 15:41. Pushed by vladz into branch 'Plasma/6.0'. Fix cleanup of forced window shortcuts XdgToplevelWindow doesn't call finishWindowRules(). It creates a problem for Workspace::removeWindow() because it calls setShortcut() to release the window shortcut. While one way to fix the bug would be to add a finishWindowRules() call in XdgToplevelWindow, it would perhaps be not the best one because it would change the appearance of decoration when the window is closed. Instead, this change makes the workspace release the shortcut when the window is closed. It has a couple of advantages: the appearance of the decoration won't change, shortcut cleanup is better encapsulated. (cherry picked from commit b98607c6893633e0b5743132049e903ff59f533e) M +5 -0 src/useractions.cpp M +0 -4 src/workspace.cpp https://invent.kde.org/plasma/kwin/-/commit/b62d212a5833a389b1aaa3a7ad4187e56e729e18 |