Bug 491725 - Subsurface Rounding Issues on KWIN Wayland with wp-fractional-scale-v1,
Summary: Subsurface Rounding Issues on KWIN Wayland with wp-fractional-scale-v1,
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 6.1.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-14 18:30 UTC by dofficialgman
Modified: 2024-08-15 14:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dofficialgman 2024-08-14 18:30:55 UTC
SUMMARY
Previously mentioned in https://bugs.kde.org/show_bug.cgi?id=479891#c8 however this bug is unrelated to the title of that bug and should be separate.


STEPS TO REPRODUCE
1. compile the test program

git clone https://git.sr.ht/~vyivel/aligned-scale-test
cd aligned-scale-test/
meson build/
meson compile -C build/

2. set the scaling to 100% to see correct output
3. build/aligned-scale-test -f 

4. set the scaling to any fractional scale to see incorrect (overlapping and spaces) output
5. build/aligned-scale-test -f 

OBSERVED RESULT
https://bugs.kde.org/show_bug.cgi?id=479891#c11

EXPECTED RESULT
https://bugs.kde.org/show_bug.cgi?id=479891#c9

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 24.04
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0 
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Comment 1 Zamundaaa 2024-08-15 12:57:27 UTC
fractional-scale-v1 inherently doesn't work with subsurfaces, and states that
> The  rounding algorithm for subsurface position and size is not defined.

as no rounding algorithm can make it work properly. This is not something we can fix in an implementation.
Comment 2 dofficialgman 2024-08-15 13:03:08 UTC
(In reply to Zamundaaa from comment #1)
> fractional-scale-v1 inherently doesn't work with subsurfaces, and states that
> > The  rounding algorithm for subsurface position and size is not defined.
> 
> as no rounding algorithm can make it work properly. This is not something we
> can fix in an implementation.

According to the post mentioned in the summary link https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/143#note_1343171 you can fix in an implementation (and wlroots and mutter have already done so).
Reading the mutter PR (merged 1 year ago) may help with KDE fixing this issue https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2726
Comment 3 Zamundaaa 2024-08-15 14:28:23 UTC
It can't be fixed, you can only choose a different tradeoff: gaps or blurriness.
The test client is not something to fixate on, as normal apps do not adjust their subsurface positions and sizes to match the weird oddities of the Wayland protocol.