Bug 377838

Summary: [Wayland] Panel doesn't autohide sometimes
Product: [Plasma] plasmashell Reporter: sunwebrw
Component: PanelAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bshah, kopper.patrick
Priority: NOR    
Version First Reported In: 5.9.3   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description sunwebrw 2017-03-20 14:53:45 UTC
Even though i enable Autohide option panel doesn't always autohides itself. Hovering a mouse pointer near a panel(fixes it for X session) gives no result(on Wayland session), only if i use Show Desktop to hide all windows the auohide feature starts working again. Alternatively each window can be minimized manually and then click on desktop area and hover near panel, it also restores autohide behaviour.
Comment 1 Patrick Kopper 2018-01-16 10:37:36 UTC
Can confirm this behavior for a bottom panel with autohide in Plasma 5.11.95. Minimizing all windows restores autohide functionality. Will gladly provide more information on request.
Comment 2 David Edmundson 2018-01-28 09:15:28 UTC
Git commit 1cb0d180bdda8bf06b77daf7a404d9213270752b by David Edmundson.
Committed on 28/01/2018 at 09:14.
Pushed by davidedmundson into branch 'Plasma/5.12'.

Fix autohide panels on wayland

Summary:
To test if the panel is under the cursor we used:
if (geometry().contains(QCursor::pos(screenToFollow()))) {

Unsurprisingly in wayland we don't know the cursor position once it's
left our window. Behaviour seems to be undefined.

We were already using enter and leave events to start the autohide
timer, so we may as well rely on that for tracking state too.

Test Plan:
Tested mouse in, mouse out

Tested mouse in and waiting and panel stayed open

Tested opening wifi applet and closing it
That will trigger the restoreAutoHide method as an applet status changed
The panel stayed open because the mouse was on it.

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: plasma-devel

Tags: #plasma

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

M  +20   -18   shell/panelview.cpp
M  +1    -0    shell/panelview.h

https://commits.kde.org/plasma-workspace/1cb0d180bdda8bf06b77daf7a404d9213270752b