Bug 351823

Summary: auto-hide panels stay open if you right-click the panel and then click somewhere else
Product: [Plasma] plasmashell Reporter: mohr1901
Component: PanelAssignee: Plasma Bugs List <plasma-bugs>
Severity: normal CC: kde, kde, squan
Priority: NOR    
Version: 5.4.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description mohr1901 2015-08-26 19:43:01 UTC
pretty self explanatory.

set a panel on auto-hide, pop it up by moving the cursor on the rim, right-click the panel, then click on something that is not the menu and not the panel.

the panel then stays open till you move the cursor on the panel and move it out again

Reproducible: Always

Steps to Reproduce:
1. set a panel on auto-hide
2. pop it up by moving the cursor on the rim of the panel
3. right-click the panel to open the menu
4. close the menu by clicking somewhere that is not the menu and not the panel

Actual Results:  
the panel stays open when it shouldn't

Expected Results:  
the panel should close as soon as the menu closes
Comment 1 Kai Uwe Broulik 2015-08-26 19:45:16 UTC
See also Bug 344205 - except this one's the other way round.
Comment 2 squan 2017-07-04 06:35:39 UTC
With plasma 5.8.6 (on openSUSE 42.2) I found that certain sequences of focus changes resolve this situation.
The easiest is
1) After a panel lost its auto-hide, give focus to it (e.g by clicking)
2) Give focus to any other open window (or panel)
Doing this the other way round also works.
Comment 3 Kai Uwe Broulik 2017-07-07 11:27:26 UTC
Git commit f3dcff28b8fbc635467252706641c9d37f094090 by Kai Uwe Broulik.
Committed on 07/07/2017 at 11:26.
Pushed by broulik into branch 'master'.

[Containment Interface] Keep containment in RequiresAttentionStatus while context menu is open

This ensures the panel does not auto-hide then.
It also forces a re-evaluation of auto-hide status when the menu closes,
so even if we mess up with mouse grabbing, it should more reliably auto-hide afterwards.
Related: bug 344205

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

M  +8    -0    src/scriptengines/qml/plasmoid/containmentinterface.cpp

Comment 4 David Edmundson 2017-07-12 13:50:58 UTC
Git commit 2d8b4e1dec26c5976dd75c238c3ae8a4700b8dd9 by David Edmundson.
Committed on 12/07/2017 at 13:50.
Pushed by davidedmundson into branch 'master'.

Don't autohide panel if a child window is open

This is meant as a more generic fix for the autohide panels, actually
looking to see what transient windows we have open.

The problem with the current fixes (D6555) being posted is that we
potentially get attentionStatus in a corrupt status as we cache the
value but it might change externally whilst that window is open.

Also saves duplicating code in a bunch of places.

Test Plan:
Set autohide
Opened a context menu in task manager didn't autohide, till I closed it
Closing menu whilst keeping mouse in the panel doesn't auto hide it
until we move out after.
Hovering over TM tooltip keeps autohide from closing (another fix)
Related: bug 352459, bug 347855

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

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

M  +10   -0    shell/panelview.cpp
M  +1    -0    shell/panelview.h