Bug 478777 - Visual glitches when dropping dragged windows to another virtual desktop
Summary: Visual glitches when dropping dragged windows to another virtual desktop
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-desktop-grid (show other bugs)
Version: git master
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-12-20 17:49 UTC by fanzhuyifan
Modified: 2024-02-14 15:06 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fanzhuyifan 2023-12-20 17:49:36 UTC
STEPS TO REPRODUCE
1. Create multiple virtual desktops
2. Open 1 window on one of them
3. enable grid view effect
4. drag that window to another desktop

OBSERVED RESULT
When I release the mouse, the window first flashes in the original desktop before appearing in the new desktop.

EXPECTED RESULT
The window shouldn't flash in the original desktop.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.90.90
KDE Frameworks Version: 5.247.0
Qt Version: 6.6.1
Kernel Version: 6.6.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 20 × 13th Gen Intel® Core™ i9-13900H
Memory: 15.2 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ROG Zephyrus G16 GU603VV_GU603VV
System Version: 1.0

ADDITIONAL INFORMATION
Comment 1 Vlad Zahorodnii 2024-02-12 11:12:35 UTC
I debugged it for a bit and it's really weird issue. I've checked that the dragged window is not moved to the new desktop, then original, then back to the new one. It doesn't happen. I tried disabling animations => same thing. I tried commenting out proxy thumbnail stuff => same thing.

Also, fwiw if you drag a desktop, then there's no such glitch.
Comment 2 Vlad Zahorodnii 2024-02-12 11:19:04 UTC
*** Bug 480564 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2024-02-12 14:12:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5174
Comment 4 David Edmundson 2024-02-14 09:32:49 UTC
Git commit eab90b6a0acb3f20b0127f944fea1c68d340e3d2 by David Edmundson.
Committed on 14/02/2024 at 09:19.
Pushed by davidedmundson into branch 'master'.

overview: Explicitly reset parent on teradown

Instantiators create objects when they're added to a model, and
deference when when they're removed from the model.

When we explicitly set a parent in onObjectAdded we're creating a second
reference. This does get cleaned up later, but not in the same frame.

This brings us in line to what QQmlRepeater (which works with items)
does internally for items being added and removed.

M  +6    -0    src/plugins/private/qml/WindowHeap.qml

https://invent.kde.org/plasma/kwin/-/commit/eab90b6a0acb3f20b0127f944fea1c68d340e3d2
Comment 5 Vlad Zahorodnii 2024-02-14 10:37:11 UTC
Git commit cab4fdaad296be5de025540f8d5e937a2dd66c27 by Vlad Zahorodnii, on behalf of David Edmundson.
Committed on 14/02/2024 at 10:08.
Pushed by vladz into branch 'Plasma/6.0'.

overview: Explicitly reset parent on teradown

Instantiators create objects when they're added to a model, and
deference when when they're removed from the model.

When we explicitly set a parent in onObjectAdded we're creating a second
reference. This does get cleaned up later, but not in the same frame.

This brings us in line to what QQmlRepeater (which works with items)
does internally for items being added and removed.


(cherry picked from commit eab90b6a0acb3f20b0127f944fea1c68d340e3d2)

M  +6    -0    src/plugins/private/qml/WindowHeap.qml

https://invent.kde.org/plasma/kwin/-/commit/cab4fdaad296be5de025540f8d5e937a2dd66c27