Bug 399763 - Window-Specific Overrides rule using the window-class does not work under Wayland
Summary: Window-Specific Overrides rule using the window-class does not work under Way...
Status: RESOLVED FIXED
Alias: None
Product: Breeze
Classification: Plasma
Component: window decoration (show other bugs)
Version: 5.23.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2018-10-13 16:20 UTC by trmdi
Modified: 2022-11-25 14:46 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description trmdi 2018-10-13 16:20:53 UTC
SUMMARY
Window-Specific Overrides rule using the window-class does not work under Wayland

STEPS TO REPRODUCE
1. Open System Settings > Application style > Window Decorations > Breeze > Configure
2. Create a new rule in the Window-Specific Overrides tab: Matching Window property-> Window Class name ; Regexp to match: kate ; Check on "Hide window titlebar" -> Ok
3. Run kate

OBSERVED RESULT
Kate's window titlebar is not hidden.

EXPECTED RESULT
Kate's window titlebar is hidden.

ADDITIONAL INFORMATION
It works if I use window-titlebar instead of window-class in the step 2. above.
Comment 1 trmdi 2018-10-13 16:22:36 UTC
It also works properly under Plasma X.
Comment 2 Alexander Mentyu 2018-10-22 17:17:48 UTC
Can reproduce this bug with Kate app

Operating System: KDE neon Developer Edition
KDE Plasma Version: 5.14.80
Qt Version: 5.11.1
KDE Frameworks Version: 5.52.0
Comment 3 phrxmd 2021-11-09 13:25:17 UTC
Can reproduce still with Kate 21.08.3

Operating System: openSUSE Tumbleweed 20211107
KDE Plasma Version: 5.23.2
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.14.14-1-default (64-bit)
Graphics Platform: Wayland
Comment 4 phrxmd 2021-11-09 14:51:36 UTC
It seems unlikely that this will ever work though, because window class is an X11 property.
Comment 5 Firlaev-Hans 2021-11-21 14:13:28 UTC
(In reply to Philipp Reichmuth from comment #4)
> It seems unlikely that this will ever work though, because window class is
> an X11 property.

It is possible to set KWin Window rules (under System Settings > Window Management) on Wayland, defined by the window class. Even "Detect Window Properties" works there. I don't see why it couldn't work the same way for Breeze decoration window specific overrides.
Comment 6 phrxmd 2021-11-21 14:31:59 UTC
It populates that from the app_id, probably, just calling it "class"? 
Then it's a matter of applying it to window decorations the same way as to window rules.
Comment 7 Firlaev-Hans 2021-11-21 15:44:28 UTC
Isn't this technically a bug in "Breeze" > "window decoration", and not in "KWin" > "wayland-generic"?

At least the relevant code seems to reside at https://invent.kde.org/plasma/breeze/-/tree/master/kdecoration
Comment 8 phrxmd 2021-11-21 16:43:03 UTC
I guess. I've refiled it there
Comment 9 Vlad Zahorodnii 2022-11-25 14:44:26 UTC
Git commit 2501065a3aa46a738f38ee7db482ebac7f5d9889 by Vlad Zahorodnii.
Committed on 25/11/2022 at 14:37.
Pushed by vladz into branch 'master'.

kdecoration: Make "Detect window properties" button work on Wayland

Use kwin's dbus api to query window info both on x11 and wayland.

In order to make dbus interaction code nicer, this change gets rid of
the nested dialog. With the proposed changes, you will have to select
window class or window title in the exception type combobox, click
"detect window properties" button, click a window and the kcm will fill
in "regular expression to match" text field.

M  +0    -1    kdecoration/CMakeLists.txt
M  +26   -134  kdecoration/config/breezedetectwidget.cpp
M  +9    -59   kdecoration/config/breezedetectwidget.h
M  +5    -24   kdecoration/config/breezeexceptiondialog.cpp
D  +0    -146  kdecoration/config/ui/breezedetectwidget.ui

https://invent.kde.org/plasma/breeze/commit/2501065a3aa46a738f38ee7db482ebac7f5d9889