Bug 453745

Summary: Window Border Not Render on the Right on Wayland when Display Scaling > 100%
Product: [Plasma] kwin Reporter: Kevan <baker.kevan98>
Component: decorationsAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: joern.koerner, kde, kde, nate
Priority: NOR    
Version: 5.24.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Image of display settings, where the border around the image does not render on the right side
This image shows what the window border normally looks like at 100% scaling
Transparent right window border when scaled to any size not 100%

Description Kevan 2022-05-13 15:10:20 UTC
Created attachment 148798 [details]
Image of display settings, where the border around the image does not render on the right side

SUMMARY
When the display scaling is 100%, the window borders render as expected, beautifully. However, I crank the scaling up to 110% because I am a bit hard of sight, and the right border on the window leaves the building. Please see the attached image for more information. I took a screenshot of my window with the scaling settings, in the screenshot you can see the border stops at the right side of the window


STEPS TO REPRODUCE
1. Change scaling to >100%
2. Enable Window Borders

OBSERVED RESULT
No rendered window border on the right side of the window frame

EXPECTED RESULT
Complete border around the frame.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Gentoo (?) Kernel 5.17.4
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
I use two monitors. When I move the window from the 110% scaled monitor to a 100% scaled monitor, the right border begins to render again on the window immediately.
Comment 1 Kevan 2022-05-13 15:18:59 UTC
Created attachment 148799 [details]
This image shows what the window border normally looks like at 100% scaling
Comment 2 Joern 2022-07-07 12:29:32 UTC
> ADDITIONAL INFORMATION
> I use two monitors. When I move the window from the 110% scaled monitor to a
> 100% scaled monitor, the right border begins to render again on the window
> immediately.

I've the same problem. In addition the right border (and only the right  one) is transparent on any screen scale !=100%, !=200% and so on. Sometimes the transparent border also flickers until I move the window.
It came up somewhere in between 5.23-5.24.

To visualize I set window border to "Large" and also enabled "Shadow". This monitor is scaled to 115%. When I scale to 100%/200% the right border is fine. See attachmnent
Comment 3 Joern 2022-07-07 12:30:55 UTC
Created attachment 150463 [details]
Transparent right window border when scaled to any size not 100%
Comment 4 David Redondo 2022-07-07 12:57:29 UTC
I can reproduce,
- set borders to normals
- set scaling to 125% 

the right border is not rendered,
at 150% it's rendered
Comment 5 Vlad Zahorodnii 2022-07-08 12:34:28 UTC
Git commit c49620658f24dde055c053cfa1aac6b22997b0d0 by Vlad Zahorodnii, on behalf of David Edmundson.
Committed on 08/07/2022 at 12:34.
Pushed by vladz into branch 'master'.

Create large enough atlas texture for decorations

When we render individual component of a decoration into an atlas we
ceil the positions for the individual component parts so they don't risk
overlapping. See SceneOpenGLDecorationRenderer::render

This isn't done when we set the overall texture height. This can cause
the bottommost part of the atlas (the right edge) to go out of view.

M  +9    -5    src/scenes/opengl/scene_opengl.cpp
M  +1    -0    src/scenes/opengl/scene_opengl.h

https://invent.kde.org/plasma/kwin/commit/c49620658f24dde055c053cfa1aac6b22997b0d0