Don't close plasmoid when closing a subdialog
Summary:
This patch redoes the fencing mechanism around
plasmoid.hideOnWindowDeactivate for window focus
handovers to be more reliable and generic. It's now
always disabled when a dialog is about to be
destroyed, and renabled on focus-in or when exiting
the root list. The dialog code is also fixed not
to close the plasmoid when it knows it's window
deactivation is part of its own destruction.
WindowSystem::monitorWindowFocus is also changed
to work in a single-shot sort of way, removing
the event filter again once it caught an event.
Fixes a refactoring regression from 84f1cb1c1.
BUG:388669
Reviewers: Plasma
Subscribers: plasma-devel
Tags: Plasma
Differential Revision: https://phabricator.kde.org/D9945