Bug 459226 - [Desktop grid] Window re-arranging animation played when dragging whole VD to another empty VD
Summary: [Desktop grid] Window re-arranging animation played when dragging whole VD to...
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-overview (show other bugs)
Version: 6.0.1
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: ratijas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-16 15:58 UTC by postix
Modified: 2024-03-25 21:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenrecording: With MR2965 (1.48 MB, video/x-matroska)
2022-09-17 11:20 UTC, postix
Details
Screenrecording: Without MR2965 (1.47 MB, video/x-matroska)
2022-09-17 11:20 UTC, postix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2022-09-16 15:58:09 UTC
STEPS TO REPRODUCE
1. Open the grid view
2.  Drag all windows of a VD together to another empty VD. In my case I had like 6 windows opened

OBSERVED RESULT
The windows appear to re-arrange to the very some positions on drop.

EXPECTED RESULT
The windows do not re-arrange but simply drop at their right spots in the same spacial configuration as they are dragged.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220914
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.5
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-09-16 20:47:35 UTC
Can confirm.
Comment 2 ratijas 2022-09-16 22:09:14 UTC
I believe this is due to an incorrect usage of a TextField API in QML/QtQuick:

>     onTextChanged: {
>         effect.searchText = text;
>         heap.resetSelected();
>         heap.selectNextItem(WindowHeap.Direction.Down);
>     }
>     Binding {
>         target: searchField
>         property: "text"
>         value: effect.searchText
>     }

My gut feeling tells my this Binding should've never existed. and onTextEdited should've been used in the first place.

There's also the Window View effect, which is like Overview but should be merged with it. And there's a similar SearchField, but with a comment:

>             // Binding loops will be avoided from the fact that setting the text to the same won't emit textChanged

which supports my theory that developers simply didn't know the trick.

Also, the root cause here is this function:

>    function start() {
>        animationEnabled = true;
>        organized = true;
>        searchField.text = "";
>    }

Clearly, it resets search text too late.
Comment 3 ratijas 2022-09-16 22:23:01 UTC
...not to mention that the `searchText` property exists only in WindowViewEffect class, but not in OverviewEffect :-\

how did it even…
Comment 4 Bug Janitor Service 2022-09-17 00:05:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2965
Comment 5 Bug Janitor Service 2022-09-17 00:05:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2965
Comment 6 postix 2022-09-17 11:20:16 UTC
Created attachment 152148 [details]
Screenrecording: With MR2965

Short feedback: I have tested the current state of MR2965, but unfortunately it hasn't fixed the issue for me yet. Please see the screen recording.
Comment 7 postix 2022-09-17 11:20:33 UTC
Created attachment 152149 [details]
Screenrecording: Without MR2965
Comment 8 ratijas 2022-09-17 11:43:23 UTC
> Short feedback: I have tested the current state of MR2965, but unfortunately it hasn't fixed the issue for me yet. Please see the screen recording.

I must have linked the wrong BUG number. That MR fixes the rearrangement after searching and not clearing the search text. It should've been BUG 459202. Thanks, I'll correct the commit description now.

The rearrangement I see here is likely because desktops get recreated, and the new window heap instance re-layouts its content. It really sucks that it is not deterministic as it should be.