Bug 452240 - wayland: "No titlebar and frame" rule doesn't force SSDs on Wayland
Summary: wayland: "No titlebar and frame" rule doesn't force SSDs on Wayland
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: 5.27.10
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
: 470535 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-04-03 21:38 UTC by Subramaniyam Raizada
Modified: 2024-04-16 16:42 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
4wy78uwh: performance-
4wy78uwh: Wayland+
4wy78uwh: X11-


Attachments
Response to #c1. (1.25 MB, image/tiff)
2024-01-02 13:34 UTC, Roke Julian Lockhart Beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Subramaniyam Raizada 2022-04-03 21:38:56 UTC
SUMMARY

I use the "No titlebar and frame": Force to "No" window rule to have KWin force server side decorations on some applications which use CSD by default.

My rules were working in X11 - KWin would draw the titlebar above the application's CSD and would draw the Breeze theme's window shadows around the edges of the application. But the rules no longer work in Wayland.

I've tested that the "Keep above other windows" rule is still applying properly to these applications in Wayland, so there's no issue with window matching.

I can apply the rule in the opposite direction to remove SSDs on normal Qt/GTK applications like Konsole, Dolphin, Qalculate. That works fine in all scenarios. So force-removing SSDs works, but force-adding them doesn't.


STEPS TO REPRODUCE
1. For an application which uses CSD, add a rule which has "No titlebar and frame" set to "Force: No"
2. Run the application under an X11 session or in XWayland: the rule works. Run the application under native Wayland: the rule has no effect.


OBSERVED RESULT
When the application is running under native Wayland, the application does not have SSD applied by KWin. SSDs are drawn in X11 or when using XWayland.


EXPECTED RESULT
The application has server side decorations applied by KWin even in native Wayland.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3


ADDITIONAL INFORMATION

I tested this with Gnome's Simple-Scan (any other CSD-using Gnome application should also reproduce) and also with some Electron applications.

Electron applications will run under XWayland by default, so this needs to be added to the Exec line in their .desktop files to have them use native Wayland: " --enable-features=UseOzonePlatform --ozone-platform=wayland".

Possibly related: https://bugs.kde.org/show_bug.cgi?id=429171
Comment 1 David Edmundson 2024-01-02 11:25:20 UTC
This isn't as doable on wayland as it was under X11. The GTK clients will behave differently. We can force a deco, but it'd have a massive margin and then the window contents. 

Your best bet is to complain to upstream for not supporting the proper standards.
Comment 2 Roke Julian Lockhart Beedell 2024-01-02 13:34:55 UTC
Created attachment 164623 [details]
Response to #c1.

(In reply to David Edmundson from comment #1)
> This isn't as doable on wayland as it was under X11. The GTK clients will
> behave differently. We can force a deco, but it'd have a massive margin and
> then the window contents. 
> 
> Your best bet is to complain to upstream for not supporting the proper
> standards.

Like this?
Comment 3 Nate Graham 2024-01-10 19:44:47 UTC
*** Bug 470535 has been marked as a duplicate of this bug. ***
Comment 4 Roke Julian Lockhart Beedell 2024-01-10 19:59:48 UTC
(In reply to Nate Graham from comment #3)
> *** Bug 470535 has been marked as a duplicate of this bug. ***

I strongly believe this needs to be reopened, because what kde@davidedmundson.co.uk explains in https://bugs.kde.org/show_bug.cgi?id=452240#c2 is now what occurs (as demonstrated by https://bugs.kde.org/show_bug.cgi?id=479372#c1) which means the stated thing to prevent being the reason for closing this as intentional has already come to pass. However, this is also the sole issue keeping me on X11 — it's also *the* reason I initially chose to use KDE Plasma, because differentiating between Windows was impossible in Windows. It's an incredibly important accessibility feature for me.
Comment 5 Roke Julian Lockhart Beedell 2024-04-16 16:42:30 UTC
(In reply to `{third: "Beedell", first: "Roke"}`{.JSON5} from comment #4)
Another example of where this is problematic is https://wiki.archlinux.org/index.php?title=Talk:DaVinci_Resolve&oldid=806169#c-RokeJulianLockhart-20240416163900-noborderrule=2_doesn't_work_on_Wayland.