Bug 480564 - Window briefly appears on wrong desktop when dragging a window from desktop 1 on screen A to desktop 2 on screen B
Summary: Window briefly appears on wrong desktop when dragging a window from desktop 1...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-overview (show other bugs)
Version: 5.92.0
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen, qt6
Depends on:
Blocks:
 
Reported: 2024-01-30 20:44 UTC by Dashon
Modified: 2024-02-19 16:42 UTC (History)
4 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 Dashon 2024-01-30 20:44:56 UTC
SUMMARY
Hey, I'm still testing plasma 6 wayland session on endeavourOS/arch. When using the overview effect, I noticed that when I moved a window from desktop 2 to desktop 1. The window would appear on my left monitor. If I clicked the window, it would quickly disappear. Once I switched to desktop 1 it would be in the right spot which is the second monitor.

Also if you trigger the overview effect and drag a window to the other monitor instead of into the thumbnail bar. The window will disappear to one of your other virtual desktops and most likely be on the wrong monitor.


STEPS TO REPRODUCE
1. Need multiple monitors for this one, but first have at least two virtual desktops.
2. First move a window to the second virtual desktop.
3. Switch to the second virtual desktop.
4. Trigger the overview effect..
5. Drag the window to first virtual desktop using the thumbnail bar at the top.

OBSERVED RESULT
The window will show up on your other monitor, but you can't click on it because it is not actually there. If you do click on it, it will close the overview effect and the window will disappear. You will then find the window on the correct monitor 

EXPECTED RESULT
The window should not appear on the other monitor at all because it is not supposed to be there.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0
Qt Version: 6.7.0
Kernel Version: 6.7.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 3080/PCIe/SSE2
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C95
System Version: 1.0

ADDITIONAL INFORMATION:
I recorded some videos of the problem, but they are too big to upload. It is around 78 MiB.
Comment 1 Dashon 2024-01-30 20:45:59 UTC
Sorry, this one was kinda hard to describe, but the gist of it is that windows seem to jump around between monitors when using the overview effect with multiple monitors.
Comment 2 fanzhuyifan 2024-01-31 03:24:36 UTC
Can reproduce -- the overview effect is quite finicky with multiple monitors.
Comment 3 Doug 2024-01-31 04:23:55 UTC
I'm seeing something similar.  Neon Testing, Plasma 5.92.90, Frameworks 5.249.0, Qt 6.6.1
Comment 4 Nate Graham 2024-01-31 21:28:25 UTC
Hmm, I'm not able to reproduce it myself.
Comment 5 fanzhuyifan 2024-01-31 22:59:52 UTC
(In reply to Nate Graham from comment #4)
> Hmm, I'm not able to reproduce it myself.

One way I can reproduce this reliably is to enter gridview, and then drag a window from desktop 1 on screen A to desktop 2 on screen B. In the overview effects it will show up at desktop 2 on screen A, while in reality it has been moved to desktop 2 on screen B.
Comment 6 Nate Graham 2024-02-02 17:45:15 UTC
I can reproduce that.
Comment 7 Vlad Zahorodnii 2024-02-12 11:19:04 UTC
*** This bug has been marked as a duplicate of bug 478777 ***
Comment 8 Nate Graham 2024-02-13 17:09:27 UTC
Apparently not the same thing; see https://invent.kde.org/plasma/kwin/-/merge_requests/5174#note_869710. Un-marking as a duplicate.
Comment 9 Bug Janitor Service 2024-02-14 14:05:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5193
Comment 10 Marco Martin 2024-02-15 09:58:38 UTC
Git commit 5244f9f406cd029786c7c766d2561b089497ebf6 by Marco Martin.
Committed on 15/02/2024 at 09:58.
Pushed by mart into branch 'master'.

Only show otherScreenThumbnail if we are actually dragging

otherScreenThumbnail is used to fake a window thumbnail being dragged
half in the old screen, half in the "new" one (or even more than two)

right now the condition to use it is purely the "real" thumbnail x
or y change, but sometimes especially when the item has just been created
and is being laid out it might trigger an itemDraggedOutOfScreen
when no-one was dragging.

We should never make otherScreenThumbnail visible when we aren't dragging
a thumbnail, so check for Drag being active in the source item.

the item will be kept visible even if drag becomes inactive as before,
as it still needs to be visible for the reset animation

M  +3    -1    src/plugins/private/qml/WindowHeap.qml

https://invent.kde.org/plasma/kwin/-/commit/5244f9f406cd029786c7c766d2561b089497ebf6
Comment 11 Marco Martin 2024-02-15 10:37:46 UTC
Git commit 5bf066ff11a3fa9ec70963ffe96ecef6c39280ad by Marco Martin.
Committed on 15/02/2024 at 10:01.
Pushed by mart into branch 'Plasma/6.0'.

Only show otherScreenThumbnail if we are actually dragging

otherScreenThumbnail is used to fake a window thumbnail being dragged
half in the old screen, half in the "new" one (or even more than two)

right now the condition to use it is purely the "real" thumbnail x
or y change, but sometimes especially when the item has just been created
and is being laid out it might trigger an itemDraggedOutOfScreen
when no-one was dragging.

We should never make otherScreenThumbnail visible when we aren't dragging
a thumbnail, so check for Drag being active in the source item.

the item will be kept visible even if drag becomes inactive as before,
as it still needs to be visible for the reset animation

M  +3    -1    src/plugins/private/qml/WindowHeap.qml

https://invent.kde.org/plasma/kwin/-/commit/5bf066ff11a3fa9ec70963ffe96ecef6c39280ad
Comment 12 fanzhuyifan 2024-02-18 17:56:30 UTC
(In reply to fanzhuyifan from comment #5)
> (In reply to Nate Graham from comment #4)
> > Hmm, I'm not able to reproduce it myself.
> 
> One way I can reproduce this reliably is to enter gridview, and then drag a
> window from desktop 1 on screen A to desktop 2 on screen B. In the overview
> effects it will show up at desktop 2 on screen A, while in reality it has
> been moved to desktop 2 on screen B.

Can still reproduce with these steps in master build
Comment 13 Vlad Zahorodnii 2024-02-19 14:23:49 UTC
That's https://bugs.kde.org/show_bug.cgi?id=481331. Please don't reopen bug reports for unrelated bugs.
Comment 14 fanzhuyifan 2024-02-19 16:42:52 UTC
(In reply to Vlad Zahorodnii from comment #13)
> That's https://bugs.kde.org/show_bug.cgi?id=481331. Please don't reopen bug
> reports for unrelated bugs.

Ah sorry I forgot there was a separate one.