Fix autohide panels on wayland
ClosedPublic

Authored by davidedmundson on Jan 25 2018, 5:57 PM.

Details

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.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Jan 25 2018, 5:57 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 25 2018, 5:57 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Jan 25 2018, 5:57 PM
mart accepted this revision.Jan 26 2018, 12:59 PM
This revision is now accepted and ready to land.Jan 26 2018, 12:59 PM
This revision was automatically updated to reflect the committed changes.