qt: restore the interface window closing responsiveness
We are intercepting and inhibiting the close event for several reasons:
- Idle inhibit case (not inhibiting close used to crash at least Wayland).
- Video window using resources of the interface window case (Wayland, DComp).
Furthermore for the latter case we postpone destroying the window (hence closing) even more, to the point destroying the window does not cause harm with regard to the video window (fdb0a981 for DComp, 6923be9b for Wayland).
Because of this, the time between user clicks on the close button and the window effectively closes is too much for responsiveness.
I propose to hide the window until destroying (and closing) to make close
more responsive. This should be fine because hiding should not
release the resources, as the default value of
QQuickWindow::setPersistentGraphics()
is true and we are not overriding
it and we do not expect to override it as well.
I have also checked if this would cause saving the window state as hidden
before closing. However, QVLCTools::saveWindowPosition()
does not save
it so it should be fine.
Request review @chub.