Bug 503565

Summary: Some window rules don't apply to xwayland windows
Product: [Plasma] kwin Reporter: Mors Mortium <morsmortium>
Component: xwaylandAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: john.kizer, morsmortium
Priority: NOR    
Version First Reported In: 6.3.4   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Maximized window rule applied to dolphin, but not to pysolfc
kwinrulesrc file
xprop output of PySolFC

Description Mors Mortium 2025-04-30 05:46:10 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

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY

I run the wayland session and use some apps that are x11 only, will probably stay that way in the indefinite future.
I use some window rules for a small display, namely maximization.
The windows of xwayland apps don't get maximized, they can be dragged around still, however the maximize button disappears from the titlebar (as it should)

STEPS TO REPRODUCE

1. Set up a window rule for maximizing windows
2. Start an x11 only app in wayland session (a GTK2 app for example)

OBSERVED RESULT

See that the window for the x11 app is not maximized, it can be dragged around, but the maximized button disappears.

EXPECTED RESULT

That the window is maximized like every other wayland window.

SOFTWARE/OS VERSIONS

Operating System: Artix Linux 
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.2-artix1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® N100
Memory: 11.4 GiB of RAM
Graphics Processor: Intel® Graphics

ADDITIONAL INFORMATION
Comment 1 John Kizer 2025-04-30 19:10:25 UTC
Hi - just to check:

* Could you please provide a screenshot or screencast of what is happening to the window that should have the window rules applied?
* What are applications that you've observed this with - are they only GTK2, by chance? (Do you see this with GTK3/4, or other toolkits?)

Thanks!
Comment 2 Mors Mortium 2025-05-01 11:58:45 UTC
Created attachment 180847 [details]
Maximized window rule applied to dolphin, but not to pysolfc
Comment 3 Mors Mortium 2025-05-01 12:04:10 UTC
By default I only have GTK2 and TTK apps where this happens, but by running an app with WAYLAND_DISPLAY="", forcing them to use xwayland, i could reproduce it with all kinds of apps, GTK3 (Lutris tested), GTK4 (GTK4 demo tested), regular Qt apps (Strawberry tested) and KDE apps (Dolphin and Gwenview tested)
Comment 4 Vlad Zahorodnii 2025-05-12 07:35:56 UTC
Can you attach the xprop output for pysolfc to this bug report? Can you also please share your ~/.config/kwinrulesrc file?
Comment 5 Mors Mortium 2025-05-12 10:10:35 UTC
Created attachment 181203 [details]
kwinrulesrc file
Comment 6 Mors Mortium 2025-05-12 10:15:30 UTC
Created attachment 181205 [details]
xprop output of PySolFC
Comment 7 Mors Mortium 2025-05-12 10:16:19 UTC
(In reply to Vlad Zahorodnii from comment #4)
> Can you attach the xprop output for pysolfc to this bug report? Can you also
> please share your ~/.config/kwinrulesrc file?

Done
Comment 8 Mors Mortium 2025-06-25 06:31:13 UTC
This got fixed in Plasma 6.4