[vlc-devel] [PATCH] qt: don't set the interface on top if the video will not be embedded

Steve Lhomme robux4 at ycbcr.xyz
Mon Apr 1 12:41:22 CEST 2019


On 3/27/2019 11:09 AM, Rémi Denis-Courmont wrote:
> Hi,
>
> It is not clear to me what the intended UX is here. If the goal is to 
> be on top regardless of video status, then the current code is 
> correct. If the goal is to be on top when there is a video embedded 
> inside the GUI, then neither the current code nor the patch are really 
> correct.

I agree it can go both ways. But the Qt vout_window_t is not created if 
the video is not going to be embedded so on startup (this is the 
MainInterface constructor) we can't assume the Qt UI is on top, a video 
is already likely opened and should probably be on top.

The doc of video-on-top is: 
Alwaysplacethevideowindowontopofotherwindows. That sounds like a feature 
of the standalone video window rather than the UI. It corresponds to the 
VOUT_WINDOW_STATE_ABOVE state that is already handled by many of them.

The UI may use the flag if a standalone window is not used. But if there 
is one, IMO it shouldn't.

>
> Le 27 mars 2019 08:59:31 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a 
> écrit :
>
>     In that case the external video is the one that should be on top.
>     ------------------------------------------------------------------------
>       modules/gui/qt/main_interface.cpp | 3 ++-
>       1 file changed, 2 insertions(+), 1 deletion(-)
>
>     diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
>     index 82ce6e81a8..6f5c487304 100644
>     --- a/modules/gui/qt/main_interface.cpp
>     +++ b/modules/gui/qt/main_interface.cpp
>     @@ -148,7 +148,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ),
>           b_plDocked = getSettings()->value( "MainWindow/pl-dock-status", true ).toBool();
>       
>           /* Should the UI stays on top of other windows */
>     -    b_interfaceOnTop = var_InheritBool( p_intf, "video-on-top" );
>     +    b_interfaceOnTop = var_InheritBool( p_intf, "video-on-top" ) &&
>     +                       var_InheritBool( p_intf, "embedded-video" );
>       
>       #ifdef QT5_HAS_WAYLAND
>           b_hasWayland = QGuiApplication::platformName()
>
>
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez 
> excuser ma brièveté.
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list