Bug 421527 - Thumbnail Grid may cause the desktop to be always focused
Summary: Thumbnail Grid may cause the desktop to be always focused
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: effects-tabbox (other bugs)
Version First Reported In: 5.18.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-14 18:38 UTC by magiblot
Modified: 2023-09-06 10:38 UTC (History)
2 users (show)

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


Attachments
Link to video showing the issue (66 bytes, text/plain)
2020-05-14 18:38 UTC, magiblot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description magiblot 2020-05-14 18:38:05 UTC
Created attachment 128462 [details]
Link to video showing the issue

SUMMARY

If the thumbnail grid is focused on the desktop while another application is launched, releasing Alt+Tab focuses the desktop instead of the application. Holding Alt+Tab again will show other running applications, but releasing it will always focus again on the desktop. The only way to revert this is to close all applications, then hold and release Alt+Tab.

STEPS TO REPRODUCE

Please see the attachment.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Kernel Version: 5.6.11-arch1-1
OS Type: 64-bit
Windowing System: Wayland

ADDITIONAL INFORMATION

I am using the KwinFT branch of Kwin. I assumed this would be reproducible on the main branch, too. Please correct me if I'm wrong.
Comment 1 Chris Holland 2020-05-14 20:12:14 UTC
Direct link to OP's attachment:
https://drive.google.com/file/d/1136PK_QmDzPcICjOsX09eQo1hZb3jhlf/view

I was able to reproduce this bug after turning back on "Show selected window".

It has "showing desktop" selected, then the "show desktop" item is replaced with "app" as we don't have "Include 'show desktop' icon" checked. The currentIndex does not change.

Even if we check "Include 'show desktop' icon", when the app appears the window is selected in the tabbox but the show desktop effect is still active. Because currentIndex=0 still. If we hit tab twice to select 'show desktop' then select the app then all is well. This is because currentIndex changed.

So we need to detect when the data at currentIndex is changed (eg: 'show desktop' => 'app') and cause it to 

https://github.com/KDE/kdeplasma-addons/blob/master/windowswitchers/thumbnail_grid/contents/ui/main.qml
Comment 2 Bernie Innocenti 2020-06-15 12:41:31 UTC
I just filed bug #423008, which has many similarities, except it can be triggered more easily.
Comment 3 David Edmundson 2023-09-06 10:38:38 UTC
This bug was reported against an outdated version of KWin. We have made many changes since the. 
If the issue persists in newer versions can you reopen the bug report updating the version number.