Commit 2cb5965f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

window: remove VOUT_WINDOW_TYPE_INVALID

parent b9c2ca3d
......@@ -47,13 +47,12 @@ struct wl_surface;
* Window handle type
*/
enum vout_window_type {
VOUT_WINDOW_TYPE_INVALID=0 /**< Invalid or unspecified window type */,
VOUT_WINDOW_TYPE_DUMMY /**< Dummy window (not an actual window) */,
VOUT_WINDOW_TYPE_XID /**< X11 window */,
VOUT_WINDOW_TYPE_HWND /**< Win32 or OS/2 window */,
VOUT_WINDOW_TYPE_NSOBJECT /**< MacOS X view */,
VOUT_WINDOW_TYPE_ANDROID_NATIVE /**< Android native window */,
VOUT_WINDOW_TYPE_WAYLAND /**< Wayland surface */,
VOUT_WINDOW_TYPE_DUMMY /**< Dummy window (not an actual window) */
};
/**
......@@ -157,10 +156,6 @@ struct vout_window_t {
* and the \ref display union are to be set.
*
* The possible values are defined in \ref vout_window_type.
*
* VOUT_WINDOW_TYPE_INVALID is a special placeholder type. It means that
* any windowing system is acceptable. In that case, the plugin must set
* its actual type during activation.
*/
unsigned type;
......
......@@ -570,7 +570,8 @@ static void *Thread( void *obj )
p_sys->p_mi = p_mi;
/* Check window type from the Qt platform back-end */
p_sys->voutWindowType = VOUT_WINDOW_TYPE_INVALID;
bool known_type = true;
QString platform = app.platformName();
if( platform == qfu("xcb") )
p_sys->voutWindowType = VOUT_WINDOW_TYPE_XID;
......@@ -581,13 +582,19 @@ static void *Thread( void *obj )
else if( platform == qfu("cocoa" ) )
p_sys->voutWindowType = VOUT_WINDOW_TYPE_NSOBJECT;
else
{
msg_Err( p_intf, "unknown Qt platform: %s", qtu(platform) );
known_type = false;
}
var_Create( THEPL, "qt4-iface", VLC_VAR_ADDRESS );
var_SetAddress( THEPL, "qt4-iface", p_intf );
var_Create( THEPL, "window", VLC_VAR_STRING );
if( p_sys->voutWindowType != VOUT_WINDOW_TYPE_INVALID )
if( known_type )
{
var_SetAddress( THEPL, "qt4-iface", p_intf );
var_SetString( THEPL, "window", "qt,any" );
}
}
/* Explain how to show a dialog :D */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment