The window provider should remain available even when no video is shown
so that available fullscreen targets can be tracked (or whatever other
events from the display server).
This is similar to audio output existing even without an audio stream.
Also remove the return value. It is universally ignored, as the request
is asynchronous (so success means really nothing). Plus the Skin engine
did not even return the correct value.
This removes one layer of function calls. This also removes the old
check for interface destroyed before window, which would not work
properly, since most vout displays cannot cope with their window going
away asynchronously.
As no videoWidget is ever inserted into the stackWidgetsSizes QMap, a
default QSize is provided with width and height = -1. These uninitialized
values are then propagated and end up as a no op at some point.
Yet, on Wayland, this -1 default values can end up being transmitted to
the Wayland server, that treats them as invalid values (protocol error).
At least the Gnome server(mutter) does.
This fix simply removes the call.
The playlist was disabled on fullscreen only when numscreen was in
range. Since commit 22c9f2a46d, numscreen
might be left to -1 not to enforce a screen to the FSC.
In that case, the playlist must also be disabled.
Fixes#20362
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
On X11 with Qt < 5.10, a resize request invoked XMoveResizeWindow() (see
0285ba4eea), which both moves and resizes.
To avoid moving, it was called with the current geometry() coordinates
as position arguments.
However, the calculated position may be wrong when several displays have
a different devicePixelRatio(). As a consequence, on a secondary
display, every (automatic) resize of the window made it jump to
unexpected locations.
To avoid the problem, just call XResizeWindow(), so that the window is
not moved at all.
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
Starting a video may resize the window (if autoresize is enabled). If
the video is started fullscreen, however, the window is not resized, so
its size is unexpected once fullscreen is disabled.
The initial fullscreen mode should not prevent autoresize, so resize the
window when disabling fullscreen.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
restoreStackOldWidget() should always restore the size the widget have
when fullscreen is disabled.
Therefore, save the size before switching to fullscreen, and never
update while fullscreen is enabled.
Fixes#20224
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
There are 3 time labels in the main interface, containing:
- the elapsed time (on the left of the seekbar);
- the remaining or total time (on the right of the seekbar);
- both (in the statusbar).
Only the one from the statusbar was updated on seek request: it was
individually connected to its own specific slot. As a consequence, the
others were not updated on seek (especially visible while paused).
Instead, factorize the slot implementation so that all time label
updates are handled by setDisplayPosition(), and connect seekRequested()
from the TimeLabel constructor (like positionUpdated()) to update them
all on seek request.
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
If a vout probe fails, releaseVideoSlot() will be called with an input with a
valid Video. This will cause the showTab() method to stack the videoWidget into
the artContainer.
Since the video widget is always kept in the main interface, just making
sure it is relocated __before__ moving the playlistwidget to the playlist
dialog saves the two calls to the display server needed to reparent the
native window back and forth at the qt level.
For Wayland, this fixes a crash, since qt is unable to reparent due to
Wayland limitations, anyway.
For other platforms, this is an optimization, since we avoid two useless
often inter-process communications (reparenting back and forth)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
qt-fullscreen-screennumber was read at startup for FSControler
but dynamically for the main interface
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
We already have the macosx interface, if the user wants something thats
native. No need to try hard here, additionally it looks much better
without this.
numScreens() is deprecated.
To set the window fullscreen on the defined monitor, a call to setScreen()
is needed.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This patch is a workaround https://bugreports.qt.io/browse/QTBUG-57608 Qt
assumes that all resize requests will succeed, which might not be the case with
tiled windows
Default resize behavior is working properly with QT 5.10 beta
Fixes#18961
Signed-off-by: Thomas Guillem <thomas@gllm.fr>