Bug 490055

Summary: Window Rules unable to detect different window types or roles
Product: [Plasma] kwin Reporter: saunders
Component: rulesAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: admin, audvare, d_debnath, isma.af, plasma-bugs-null, xaver.hugl
Priority: NOR Keywords: wayland-only
Version First Reported In: 6.1.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: blank text in "Window Types" menu

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.
Comment 3 D. Debnath 2025-03-30 14:57:35 UTC
Created attachment 179870 [details]
blank text in "Window Types" menu

Is this (blank text in "Window Types" menu) related?
Comment 4 Dominik Kummer 2025-06-22 02:01:15 UTC
Surface::tag() and Surface::setTag() in conjunction with wl_proxy_get_tag() and wl_proxy_set_tag() are not implemented yet in kwayland/src/client/surface.cpp.

Also Window::windowRole() should probably translate PlasmaShellSurface::role() enum to according QString

Both pieces of info are needed by clientToVariantMap() in kwin/src/dbusinterface.cpp