Bug 393912 - The Activities switcher steal the focus after I switch using meta+tab and after that it does not autohide
Summary: The Activities switcher steal the focus after I switch using meta+tab and aft...
Status: RESOLVED DUPLICATE of bug 424020
Alias: None
Product: plasmashell
Classification: Plasma
Component: Activity Switcher (show other bugs)
Version: 5.12.2
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-06 16:28 UTC by whoopsdecade
Modified: 2020-09-08 13:50 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fix (1.97 KB, patch)
2018-05-21 09:58 UTC, Thomas Surrel
Details
Desktop.qml (10.22 KB, text/plain)
2018-05-29 20:48 UTC, Thomas Surrel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description whoopsdecade 2018-05-06 16:28:06 UTC
The Activities switcher steal the focus after I switch using meta+tab and after that it does not autohide, I have to click on the activities switcher and then on the desktop for it to go away. This is very annoying to me because I actually want to do away with that animation entirely but I was getting used to it hiding right after I switched. Now I have to contend with the activity switcher actually getting in the way after I switch.
Comment 1 Eric Francis 2018-05-08 19:01:31 UTC
I've also run into this on PCLinuxOS, Plasma 5.12.4 (not sure if I've updated to 5.12.5 yet, though I know I've seen this for a couple minor releases at least).
Comment 2 Jim Duchek 2018-05-18 19:00:23 UTC
This behaviour has been around for quite a while.  It's very annoying, I haven't found any workaround as of yet.  It is not even 'reproducible' (though it happens all the time).  It seems to be a timing issue of some sort -- Doing meta-tab very slowly makes it never seem to occur... going _very_ fast seems to make it rarer as well.  

I turned off meta (the Windows key) opening up the application menu, wondering if it might be a conflict.  This did not help.
Comment 3 Thomas Surrel 2018-05-21 09:58:12 UTC
Created attachment 112784 [details]
Fix
Comment 4 Thomas Surrel 2018-05-21 10:00:57 UTC
Oops, I meant to provide more information with the attached patch. I will try to get that upstream but in the meantime you can apply the patch to the Desktop.qml file (you don't need to recompile anything). On ArchLinux you can find it under /usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/.

Please confirm that fixes the issue for you as well.
Comment 5 Christoph Feck 2018-05-21 11:02:08 UTC
Thomas, thanks for the patch! I suggest to add it to https://phabricator.kde.org/differential/diff/create/ to get Plasma developers seeing it.
Comment 6 Thomas Surrel 2018-05-21 11:03:42 UTC
It's done: https://phabricator.kde.org/D13012
Comment 7 Jim Duchek 2018-05-21 20:58:45 UTC
Thomas -- the patch appears to work for me.  I have never been able to reproduce the bug 100% of the time, but it was quite common.  It has not appeared since I applied your patch.
Comment 8 Nate Graham 2018-05-22 20:35:59 UTC
Git commit d234b8fde4c3c131545686a117e284b31c6a95a9 by Nathaniel Graham, on behalf of Thomas Surrel.
Committed on 22/05/2018 at 20:35.
Pushed by ngraham into branch 'master'.

Activity switcher auto-hide when using Meta-Tab

Summary:
Commit 174aa217180434ab93b899d9c7cf967bd2daff7e created a new
issue where the activity switcher would not hide anymore when
switching activities with the Meta-Tab global shortcut and
releasing the keys under one second.

This patch fixes this by unconditionnal toggling the activity
switcher visibility if it should be hidden, but keeping the
timestamp condition before showing it, so that both Meta-q and
Meta-Tab behaves correctly.

Reviewers: mart, ngraham

Reviewed By: mart, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13012

M  +6    -7    desktoppackage/contents/views/Desktop.qml

https://commits.kde.org/plasma-desktop/d234b8fde4c3c131545686a117e284b31c6a95a9
Comment 9 Kai Uwe Broulik 2018-05-28 17:28:41 UTC
*** Bug 394798 has been marked as a duplicate of this bug. ***
Comment 10 mathojojo 2018-05-29 16:51:08 UTC
Nice work, but I'm not developer. How do I use the attached file with my Desktop.qml  ??

A copy/paste ? where?

Sorry
Comment 11 Thomas Surrel 2018-05-29 20:48:29 UTC
Created attachment 112953 [details]
Desktop.qml

I have eattached the full file, if it can help others while the fix makes its way into an official release.
Comment 12 Jamie Smith 2018-06-02 18:54:49 UTC
Git commit c1f3b45cabe0cf89e13a5b1c9b7a673992320826 by James D. Smith, on behalf of Thomas Surrel.
Committed on 02/06/2018 at 18:49.
Pushed by smithjd into branch 'Plasma/5.13'.

Activity switcher auto-hide when using Meta-Tab

Summary:
Commit 174aa217180434ab93b899d9c7cf967bd2daff7e created a new
issue where the activity switcher would not hide anymore when
switching activities with the Meta-Tab global shortcut and
releasing the keys under one second.

This patch fixes this by unconditionnal toggling the activity
switcher visibility if it should be hidden, but keeping the
timestamp condition before showing it, so that both Meta-q and
Meta-Tab behaves correctly.

Reviewers: mart, ngraham

Reviewed By: mart, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13012

M  +6    -7    desktoppackage/contents/views/Desktop.qml

https://commits.kde.org/plasma-desktop/c1f3b45cabe0cf89e13a5b1c9b7a673992320826
Comment 13 David Edmundson 2018-07-26 13:18:45 UTC
This is super weird.

The last message shows we got a committed in 5.13, but it's not in the repo.

There was a forced rewind in June after a bad merge. Probably around this time.
Right now commit is only in master.
Comment 14 whoopsdecade 2018-07-26 16:03:20 UTC
(In reply to Thomas Surrel from comment #4)
> Oops, I meant to provide more information with the attached patch. I will
> try to get that upstream but in the meantime you can apply the patch to the
> Desktop.qml file (you don't need to recompile anything). On ArchLinux you
> can find it under
> /usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/.
> 
> Please confirm that fixes the issue for you as well.

btw after applying this fix "Move to activity" (right click on window item on the bottom panel) stopped working. Don't know why.
Comment 15 jose luis m 2020-08-05 13:29:46 UTC
This is still a problem. When I press meta+tab, the activity switcher appears but doesn't auto-hide and I cannot get rid of it no matter what I do. I have to logout and start a new plasma session. The window switcher (alt+tab) works as expected and I suppose that  the way the activity switcher should work

Operating System: Manjaro Linux
KDE Plasma Version: 5.19.3
KDE Frameworks Version: 5.72.0
Qt Version: 5.15.0
Kernel Version: 5.7.9-1-MANJARO
Comment 16 Nate Graham 2020-09-08 13:50:09 UTC

*** This bug has been marked as a duplicate of bug 424020 ***