Bug 476996 - Allow window border to render on plasmashell windows too.
Summary: Allow window border to render on plasmashell windows too.
Status: CLOSED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (show other bugs)
Version: 6.0.4
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL: https://discuss.kde.org/t/any-idea-wh...
Keywords:
Depends on: 486940
Blocks:
  Show dependency treegraph
 
Reported: 2023-11-14 15:32 UTC by Roke Julian Lockhart Beedell
Modified: 2024-07-30 20:48 UTC (History)
1 user (show)

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


Attachments
Depiction of the problem. (995.63 KB, image/tiff)
2023-11-14 15:32 UTC, Roke Julian Lockhart Beedell
Details
`noborderrule=2` KWin Rule inactive (in Wayland). (57.16 KB, image/png)
2024-05-12 23:16 UTC, Roke Julian Lockhart Beedell
Details
`noborderrule=2` KWin Rule active. (59.35 KB, image/png)
2024-07-28 20:47 UTC, Roke Julian Lockhart Beedell
Details
`noborderrule=2` KWin Rule active in X11. (38.03 KB, image/png)
2024-07-28 20:47 UTC, Roke Julian Lockhart Beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roke Julian Lockhart Beedell 2023-11-14 15:32:10 UTC
Created attachment 163153 [details]
Depiction of the problem.

SUMMARY
The relatively new 1-pixel window border doesn't appear to render on windows created by `plasmashell`. I don't know why.

STEPS TO REPRODUCE
1. Add a panel, or:
3. Invoke a plasmoid.

OBSERVED RESULT
No border.

EXPECTED RESULT
The border should render. These are windows like any other, so they're just as difficult to differentiate from the background without the border.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20231108
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.5.9-1-default (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
Memory: 30.5 GiB of RAM
Graphics Processor: AMD Radeon RX 5700
Manufacturer: ASRock
Product Name: X670E Taichi

ADDITIONAL INFORMATION
https://discuss.kde.org/t/any-idea-why-my-plasmashell-windows-are-missing-a-window-border/7258/2?u=rokejulianlockhart
Comment 1 Roke Julian Lockhart Beedell 2023-11-14 15:33:51 UTC
The https://bugs.kde.org/page.cgi?id=fields.html#importance probably shouldn't be "NOR Wishlist" on second thought, because this seems  more like a bug to me than a missing feature due to its inability to be configured and the fact that it's an exception without any obvious supportive rationale. However, Wishlist is at least a safer bet.
Comment 2 Roke Julian Lockhart Beedell 2023-11-14 21:42:32 UTC
(In reply to `{third: "Beedell", first: "Roke"}`{.JSON5} from comment #0)
> SUMMARY
> The relatively new 1-pixel window border doesn't appear to render on windows
> created by `plasmashell`. I don't know why.
> 
> STEPS TO REPRODUCE
> 1. Add a panel, or:
> 3. Invoke a plasmoid.
> 
> OBSERVED RESULT
> No border.
> 
> EXPECTED RESULT
> The border should render. These are windows like any other, so they're just
> as difficult to differentiate from the background without the border.

Per https://discuss.kde.org/t/any-idea-why-my-plasmashell-windows-are-missing-a-window-border/7258/6?u=rokejulianlockhart, perhaps this should be moved to https://bugs.kde.org/enter_bug.cgi?product=Breeze.
Comment 3 Nate Graham 2023-11-15 20:52:16 UTC
The line has been implemented for app windows using the Breeze Window Decoration theme. Plasma's internal windows (popups, notifications, etc) don't respect the window decoration theme for a variety of intentional design reasons.

These Plasma windows do in fact have a line border as well, it's just not as visually obvious as the one used for app windows.
Comment 4 Roke Julian Lockhart Beedell 2023-11-15 20:54:10 UTC
(In reply to Nate Graham from comment #3)
> The line has been implemented for app windows using the Breeze Window
> Decoration theme. Plasma's internal windows (popups, notifications, etc)
> don't respect the window decoration theme for a variety of intentional
> design reasons.
> 
> These Plasma windows do in fact have a line border as well, it's just not as
> visually obvious as the one used for app windows.

Is that decision explained anywhere? I'd like it to be reconsidered, so at the very least I should try to understand why it was decided.
Comment 5 Roke Julian Lockhart Beedell 2023-11-15 20:55:04 UTC
It should regardless be able to be enabled for the sake of accessibility. Being able to make the window decorations usable for someone with impaired vision but plasmashell not respecting that is nonsensical.
Comment 6 Nate Graham 2023-11-16 00:47:50 UTC
No, it's not explained anywhere. Not everything is or even needs to be explained. If developers explained every reason behind every aspect of the system, they would spend all their time doing that, and no time actually developing it. Life's too short. :)
Comment 7 Roke Julian Lockhart Beedell 2023-11-16 23:29:44 UTC
(In reply to Nate Graham from comment #6)
> No, it's not explained anywhere. Not everything is or even needs to be
> explained. If developers explained every reason behind every aspect of the
> system, they would spend all their time doing that, and no time actually
> developing it. Life's too short. :)

But I think there's a darn good reason for it not to be this way - it makes seeing plasmashell windows as difficult as it used to be before the border was implemented. Why not just introduce an accessibility flag to provide this, or at least not disregard the idea?
Comment 8 Roke Julian Lockhart Beedell 2024-05-12 23:16:05 UTC
Created attachment 169415 [details]
`noborderrule=2` KWin Rule inactive (in Wayland).

PNG instead of TIFF, so it's more easily viewable.
Comment 9 Nate Graham 2024-05-14 22:12:01 UTC
It's reasonable to ask for the Breeze Plasma theme to have a more visually obvious border, but that's not what you asked for. :) You asked for KWin to draw the border. This is unfortunately not feasible as it would conflict with Plasma themes' ability to draw their own borders, which at this point cannot be removed or else 3rd-party themes could get broken.
Comment 10 Roke Julian Lockhart Beedell 2024-05-14 22:28:04 UTC
(In reply to Nate Graham from comment #9)

I see. Introducing breaking changes for a 3rd-party ecosystem is a landmine field I wouldn't wish for my worst enemy to have to manage. Consequently, would you consider continuing (under the hood) to allow Plasma to draw its own window borders, but have it inherit the preferences from KWin (by default)? A simple checkbox, or an override automatically enabled when anything except Breeze is in use, would appear to provide this. However, if that's infeasible, I'd be glad to know why, if you're willing.

Otherwise, since I'll certainly be using Plasma for the rest of my life, perhaps consider putting this at least as a consideration for a breaking change for Plasma 7, irrespective of when that might be shipped. However, I can't see why this would be preferable (except for perfectionist consistency in the relevant codepaths).
Comment 11 Nate Graham 2024-05-16 18:52:20 UTC
The conceptual problem is that Plasma-themed dialogs panels etc. are allowed to draw whatever they want. They can draw a border, or not. Their border can be a 1px line, or it can be a 5px dashed stroke, or it can be a line of pink fluffy bunny fuzz (literally, check out the Plasma theme named "Fluffy Bunny"). As a result, KWin can't reason about where it would draw a border itself.

Making KWin draw borders for Plasma UI elements would basically require throwing out the existing Plasma theming system entirely. Personally I'm on board with that; I find it to be highly problematic. But that's also just my opinion, and this is not something you do lightly.

Hopefully that explanation makes sense.
Comment 12 Roke Julian Lockhart Beedell 2024-05-16 20:28:48 UTC
(In reply to Nate Graham from comment #11)
That does, to a point. Might there be a VDG issue on Invent about your wider gripe about the ecosystem, which you've referenced? I don't really think that it's suitable for solely the shell to provide that level of customisation - that should be something that the window manager allows the user to do everywhere, which isn't really what KWin's designed for (to my knowledge).
Comment 13 Nate Graham 2024-05-21 16:37:40 UTC
Not formally, no.
Comment 14 Roke Julian Lockhart Beedell 2024-07-28 20:47:06 UTC
Created attachment 172079 [details]
`noborderrule=2` KWin Rule active.

Whilst testing https://trac.wildfiregames.com/ticket/6939#comment:5, I've found a workaround on X11 - `noborderrule=2`. Unfortunately, solely on X11, per https://bugs.kde.org/show_bug.cgi?id=452240#c1. However, it didn't work on Plasma 5, so it's at least an improvement.
Comment 15 Roke Julian Lockhart Beedell 2024-07-28 20:47:59 UTC
Created attachment 172080 [details]
`noborderrule=2` KWin Rule active in X11.

This is the correct window to demonstrate it, per the previous attachment.