Bug 461283

Summary: Wobbly Windows are now slightly blurry when dragged
Product: [Plasma] kwin Reporter: ratijas <me>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: ahiemstra, d_debnath, kde, kimiblock, nate
Priority: NOR Keywords: regression
Version: git master   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.0
Sentry Crash Report:

Description ratijas 2022-11-01 10:26:40 UTC
SUMMARY

Probably another floating point regression. With Wobbly Windows effect turned on, windows become slightly blurred when being dragged. It is enough to just press and hold until dragging operation starts to see how they change from crisp to fuzzy. 

STEPS TO REPRODUCE
1. Enable Wobbly Windows effect
2. Drag any window

OBSERVED RESULT
window becomes blurry

EXPECTED RESULT
window should stay sharp

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE: git master
Qt Version: 5.15.7
Kernel Version: 6.0.6-arch1-1 (64-bit)
Graphics Platform: both on X11 and Wayland
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 31.3 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: G752VT
System Version: 1.0
Comment 1 Nate Graham 2022-11-02 14:48:39 UTC
Can reproduce on Wayland too. It's an extremely subtle effect for me though, at least with a 4K screen and 200% scaling.
Comment 2 ratijas 2022-11-18 16:14:00 UTC
> Can reproduce on Wayland too. It's an extremely subtle effect for me though, at least with a 4K screen and 200% scaling.

It still a thing, and very noticeable for my eyes at 100% scaling ¯\_(ツ)_/¯

Last days KWin experience on X11 has regressed even more for me, especially after sleep. Textures are getting lost, surfaces shutter in triangles, plasma panels get stuck in the middle of animation etc. What happened?
Comment 3 Arjen Hiemstra 2023-01-16 10:19:40 UTC
Git commit 3118b48650c26fa5fec28eacdd02779c14b7a766 by Arjen Hiemstra.
Committed on 16/01/2023 at 09:51.
Pushed by ahiemstra into branch 'master'.

Disable vertex snapping for Wobbly Windows and Magic Lamp

The subdivided grid used by these effects doesn't account for pixel
alignment. If we force the generated WindowQuads to be rounded, the
quad's sizes no longer match the texture sizes, which results in blurry
rendering.

eeffects

M  +2    -0    src/effects/magiclamp/magiclamp.cpp
M  +2    -0    src/effects/wobblywindows/wobblywindows.cpp

https://invent.kde.org/plasma/kwin/commit/3118b48650c26fa5fec28eacdd02779c14b7a766
Comment 4 Nate Graham 2024-01-26 15:17:00 UTC
*** Bug 480021 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2024-01-26 15:17:31 UTC
This has unfortunately regressed again with git master.
Comment 6 D. Debnath 2024-01-26 15:34:46 UTC
A lot of other KWin effects are also affected by this bug, including Invert and "KDE Rounded Corners. See here: https://github.com/matinlotfali/KDE-Rounded-Corners/issues/149#issuecomment-1907452505
Comment 7 Bug Janitor Service 2024-01-30 15:44:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5071
Comment 8 Nate Graham 2024-02-01 17:37:34 UTC
Fixed by Marco Martin with https://invent.kde.org/plasma/kwin/-/commit/19970bd63981504bad7fde626644f487b9cf7abc (which forgot to include the BUG: keyword) for Plasma 6.0!
Comment 9 D. Debnath 2024-02-01 18:00:55 UTC
The MR says "plugins/wobblywindows: Use snapping when the window isn't moving" and the changes are also in wobbly window specific files. So, I'm wondering whether this will fix the blurriness of the other effects (invert, KDE-Rounded-Corners)?