Fix autohide panels on wayland

Authored by davidedmundson on Jan 28 2018, 9:07 AM.

Description

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.

BUG: 377838

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

Details

Committed
davidedmundsonJan 28 2018, 9:14 AM
Reviewer
Plasma
Differential Revision
D10101: Fix autohide panels on wayland
Parents
R120:fb3775c24a86: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown