For wayland we override StateDragging and deal in QDrag instead
but some spurious mouse event got in and were handled in the base
class.
Fixes a crash when receiving mouse move during a drag
Otherwise we stop receiving drag moves.
If we're dragging a window we're absolutely sure that user code
won't be interested.
As reproduced by using graphic views.
EGLFS doesn't honour that the floating windows should be
on top and will make the floating windows go behind.
It's also unneeded to raise it on eglfs, since it's fullscreen.
The application developer might now want to show some segments.
Now he can use Config::setDropIndicatorAllowedFunc(), which previously
only worked for classic indicators
So the lambda can have more advanced usage and inspect the
target layout before allowing or disallowing the drop.
For our use case, we want to limit max 3 dock widgets side by side,
for example.
When dragging a maximized window we show normal, but we can
only start moving it when the window managers acknowledges the new
state. The state in QWidget isn't reliable.
QWidget::windowStateChanged isn't useful as it's emitted once sync
and another async, with the same value. Only the async one is useful
as it will represent the real window manager state. Then we can do
further moves.
The QWindow one happens to be good (async), so use that one instead.
Since our workaround isn't an atomic operation, each dock widget
was saving its new tab index while we were in the middle of a restore.
So be sure we set their correct index and restore "current" at the end.
Fixes#279
Nested FloatingWindows already supported it, so make it consistent.
Personal take: In a non-docking world, users can override their
main window close event and prevent a close, to save a document
or such. However, in a docking world, the main window developer
won't know which widgets are docked, so forwarding needs to happen,
as some might have documents to save.
TitleBar::isFloating() was returning false, while it should
have returned true.
Fixed by making isFloating() simpler and dumb. isFloating() should
only say if it belongs to a floating window or not. It shouldn't
contain any logic about whether button should be visible or not.
There's already logic elsewhere that will hide the float button
in case there's nesting.
Fixes issue #96 and #44