Bug 490055 - Window Rules unable to detect different window types or roles
Summary: Window Rules unable to detect different window types or roles
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 6.1.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2024-07-10 22:07 UTC by saunders
Modified: 2025-02-22 21:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description saunders 2024-07-10 22:07:04 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
When using "Detect Window Properties" there seems to be no variation in "Window types" and "Window role". This could be a Wayland issue but previously when I used X it would differentiate between the different windows.

STEPS TO REPRODUCE
1. (this is just one example) open konsole
2. use "detect window properties", set to some size and "apply initially"
3. in konsole open multiple tabs, go to close konsole, popup shows up with "are you sure" type dialog. note it will also be the same size as the main konsole window
4. use "detect window properties" on the popup, "window types" and "window role" don't detect anything.

OBSERVED RESULT
popup is applied the same settings

EXPECTED RESULT
able to differentiate between the different window role/types.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
Operating System: Gentoo Linux 2.15
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.8 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 3950X 16-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4070/PCIe/SSE2

ADDITIONAL INFORMATION
Comment 1 Ismael Asensio 2024-07-21 21:05:23 UTC
Wayland windows return an empty string for windowRole()

https://invent.kde.org/plasma/kwin/-/blob/master/src/waylandwindow.cpp?ref_type=heads#L118

Is the concept of "window role" completely deprecated on Wayland? 
If so, we should find some alternative property to match different kinds of windows
Comment 2 Zamundaaa 2025-02-17 22:34:04 UTC
> Is the concept of "window role" completely deprecated on Wayland? 
It's just not a thing.

https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/238 will provide something similar.