Bug 480819 - Window Glitching When Snapping to Left or Right in Wayland
Summary: Window Glitching When Snapping to Left or Right in Wayland
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.10
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-04 01:57 UTC by Chris Lewis
Modified: 2024-11-01 03:47 UTC (History)
3 users (show)

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


Attachments
Window artifacts (263.47 KB, image/png)
2024-10-02 15:53 UTC, Elliott Partridge
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lewis 2024-02-04 01:57:00 UTC
SUMMARY

I've included a video of the issue because it's easier to show than describe:
https://mega.nz/file/DDZVwR7Q#YTJqguszTzMMvxyGg6d75ynU9TEgnnB5S3f36a9QdAY

The issue is that occasionally when snapping windows to the left or right of the screen, there will be a visual glitch and cause all sorts of unexpected results.

It tends to only happen with web browsers, and more frequently with Progressive Web Apps, as you can see with Gmail in my example video.

The PWA I was demonstrating uses Chromium, but I’ve also had this occur with Chrome and Brave. The Appearance settings in the browsers are set to “classic”, but it happens with GTK and QT as well. I’ve set all themes back to default Breeze default to ensure it wasn’t a theme issue.

I’ve only been able to reproduce this issue in Wayland. When running X11, it works just fine.


STEPS TO REPRODUCE
1. Open PWA
2. Snap to either left or right
3. (I can't always reproduce the issue on demand, but it does happen very frequently)

OBSERVED RESULT
Visual distortion after window snap

EXPECTED RESULT
Clean snap to either left or right side of screen

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
kwin 5.27.10-2
wayland 1.22.0-1

ADDITIONAL INFORMATION
Comment 1 Chris Lewis 2024-02-05 18:55:27 UTC
There's another user in my post here that's experiencing the same thing in Fedora:
https://discuss.kde.org/t/window-glitching-when-snapping-to-left-or-right-in-wayland/10107
Comment 2 Nate Graham 2024-02-06 20:45:55 UTC
Thanks for the video. Are you able to successfully side-tile one of the affected windows using the Meta+Left or Meta+Right shortcuts?
Comment 3 Chris Lewis 2024-02-07 03:22:12 UTC
I turned wayland back on to test... when it happened again, I tried Win + Left Arrow or Right Arrow it was non-responsive. But when I  Did Win + Up it started working again.
Comment 4 Nate Graham 2024-02-07 17:29:50 UTC
And then thereafter, did Win+Left or Win+Right work properly?
Comment 5 Chris Lewis 2024-02-07 18:49:40 UTC
Yes, it started working again after I did Win + Up
Comment 6 Nate Graham 2024-02-13 20:00:12 UTC
And since then, has it continued to work as expected? Or did it break again?
Comment 7 Chris Lewis 2024-02-14 16:51:45 UTC
(In reply to Nate Graham from comment #6)
> And since then, has it continued to work as expected? Or did it break again?

It will work temporarily and then eventually the issue will occur again either with the same or different window.
Comment 8 Nate Graham 2024-02-15 15:04:46 UTC
Ok, thanks. Would be good to know if it happens in Plasma 6 once it's released in two weeks.
Comment 9 Vlad Zahorodnii 2024-09-30 11:44:20 UTC
Is this still an issue in 6.1?
Comment 10 Elliott Partridge 2024-10-02 15:53:30 UTC
Created attachment 174321 [details]
Window artifacts
Comment 11 Chris Lewis 2024-10-02 15:55:48 UTC
After updating to KDE 6 this issue was resolved.
Comment 12 Elliott Partridge 2024-10-02 15:58:44 UTC
I am experiencing the same or similar issue on KDE Plasma 6.1.5.

The visual distortion is a bit different - the previous screen contents within the new snapped window field is "locked in", any new screen activity is "added" to the window (kind of like mouse trails, but persistent), and I can no longer move the window around using the mouse.  Using `WIN+UP` snaps the window to the top half of the screen, but then exhibits the same issue just on the top of the screen. I am able to restore window functionality by maximizing it from the application panel.

I can reliably reproduce this with **any** window by:
1. Maximize window
2. Press `META+LEFT` or `META+RIGHT` to snap to left or right side of screen

Screenshot posted above.

System details:
Operating System: EndeavourOS 
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3
Kernel Version: 6.10.10-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 630
Manufacturer: Dell Inc.
Product Name: Precision 7540
Comment 13 Elliott Partridge 2024-10-02 16:32:30 UTC
Here's a video of my experience:

https://cloud.peartree.us/index.php/s/F2F7KFgDBEij7YG
Comment 14 Bug Janitor Service 2024-10-17 03:48:07 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 15 Bug Janitor Service 2024-11-01 03:47:29 UTC
🐛🧹 This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.