Commit 3a31af06 authored by David Menestrina's avatar David Menestrina Committed by Rémi Denis-Courmont

Make xcb reject resize requests when embedded. Fixes trac #3848.

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 91f39030
......@@ -99,6 +99,8 @@ struct vout_window_sys_t
#ifdef MATCHBOX_HACK
xcb_atom_t mb_current_app_window;
#endif
bool embedded;
};
/** Set an X window property from a nul-terminated string */
......@@ -214,6 +216,7 @@ static int Open (vlc_object_t *obj)
vout_window_sys_t *p_sys = malloc (sizeof (*p_sys));
if (p_sys == NULL)
return VLC_ENOMEM;
p_sys->embedded = false;
/* Connect to X */
char *display = var_CreateGetNonEmptyString (wnd, "x11-display");
......@@ -486,6 +489,9 @@ static int Control (vout_window_t *wnd, int cmd, va_list ap)
{
case VOUT_WINDOW_SET_SIZE:
{
if (p_sys->embedded)
return VLC_EGENERIC;
unsigned width = va_arg (ap, unsigned);
unsigned height = va_arg (ap, unsigned);
const uint32_t values[] = { width, height, };
......@@ -613,6 +619,7 @@ static int EmOpen (vlc_object_t *obj)
return VLC_EGENERIC;
vout_window_sys_t *p_sys = malloc (sizeof (*p_sys));
p_sys->embedded = true;
xcb_connection_t *conn = xcb_connect (NULL, NULL);
if (p_sys == NULL || xcb_connection_has_error (conn))
goto error;
......
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