Bug 441241

Summary: When choosing Thumbnail Grid as your Task Switcher, tasks seem to be kept their position while you click the close button
Product: [Plasma] kdeplasma-addons Reporter: m11.1l1.f64
Component: Task SwitchersAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, isma.af, nate, zrenfire
Priority: NOR    
Version: 5.22.4   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 5.25.3
Sentry Crash Report:
Attachments: Task Switcher Bug

Description m11.1l1.f64 2021-08-20 14:46:48 UTC
Created attachment 140878 [details]
Task Switcher Bug

SUMMARY
When choosing Thumbnail Grid as your Task Switcher, tasks seem to be kept their position while you click the close button

STEPS TO REPRODUCE
1. Choose Thumbnail Grid as your Task Switcher in the settings
2. Trigger the Task Switcher with alt + tab
3. Click on the close button

OBSERVED RESULT
The task position still exists

EXPECTED RESULT
The empty space should not be present

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
You can watch the attachment for the visual representation
Comment 2 Ismael Asensio 2022-06-28 22:36:13 UTC
Git commit b73b970a683ac3d983c06f67e4c6bd6737cd7289 by Ismael Asensio.
Committed on 28/06/2022 at 22:34.
Pushed by iasensio into branch 'master'.

switchers/thumbnailgrid: Fix layout when window count changes

Assign the column calculation declaratively, so the number of
columns is automatically updated on window count changes
FIXED-IN: 5.25.3

M  +11   -16   windowswitchers/thumbnail_grid/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/commit/b73b970a683ac3d983c06f67e4c6bd6737cd7289
Comment 3 Ismael Asensio 2022-06-28 22:41:37 UTC
Git commit 2b0069baa5bf8b901bfffa288fe1188ef3faaeed by Ismael Asensio.
Committed on 28/06/2022 at 22:41.
Pushed by iasensio into branch 'Plasma/5.25'.

switchers/thumbnailgrid: Fix layout when window count changes

Assign the column calculation declaratively, so the number of
columns is automatically updated on window count changes
FIXED-IN: 5.25.3


(cherry picked from commit b73b970a683ac3d983c06f67e4c6bd6737cd7289)

M  +11   -16   windowswitchers/thumbnail_grid/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/commit/2b0069baa5bf8b901bfffa288fe1188ef3faaeed
Comment 4 Patrick Silva 2022-07-12 14:46:12 UTC
it's still reproducible after update to Plasma 5.25.3.

Operating System: Arch Linux
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Graphics Platform: Wayland
Comment 5 Ismael Asensio 2022-07-12 18:36:03 UTC
(In reply to Patrick Silva from comment #4)
> it's still reproducible after update to Plasma 5.25.3.
> 
> Operating System: Arch Linux
> KDE Plasma Version: 5.25.3
> KDE Frameworks Version: 5.96.0
> Qt Version: 5.15.5
> Graphics Platform: Wayland

I cannot reproduce it anymore after the change in 5.25.3. 
I don't know about Arch. Is the kde-plasmaaddons package also at the same version?

I don't know much about Arch, but is the package for kdeplasma-addons also updated to that version?  
I'd think so, but just to be sure
Comment 6 Patrick Silva 2022-07-12 21:09:11 UTC
kdeplasma-addons 5.25.3-1 package is installed. I can reproduce on Wayland and X11.
Comment 7 Chris Holland 2022-09-26 08:15:58 UTC
When Thumbnail Grid was written, this behavior was deliberate. It was so that when you have 6 windows open, and you close 1 window, it doesn't resize the window from 3x2 to 5x1. Also if you closed window #2 of 6, your mouse would be hovering window #3 letting you easily close that window as well.

https://github.com/Zren/kwin-tabbox-thumbnail_grid/pull/2

The Alt+Tab popup currently goes from 5x2 => 3x3 => 4x2 right now...

Since I have it available: In Windows 11, the rows do not repopulate if a window is closed after the Alt+Tab is show. In a 5x2, you can delete 4 windows from the first row, and it'll still contain 1 window on the first row (centered) and 5 windows on the bottom row. The windows in the top row do shift to keep them centered though, and the window can resize if you delete windows from both rows.