From 2c0b770976956de35b321f3307405adc9cfde85e Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Wed, 4 Aug 2010 19:13:39 +0300 Subject: [PATCH] XCB/window: cannot be resized if embedded (manual forward port of 3a31af06dbabd4e21a68e46249fdf3209cd8060a) --- modules/video_output/xcb/window.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c index 48f2f2a25d..a7040a8930 100644 --- a/modules/video_output/xcb/window.c +++ b/modules/video_output/xcb/window.c @@ -100,6 +100,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 */ @@ -215,6 +217,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_InheritString (wnd, "x11-display"); @@ -487,6 +490,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, }; @@ -617,6 +623,7 @@ static int EmOpen (vlc_object_t *obj) if (p_sys == NULL || xcb_connection_has_error (conn)) goto error; + p_sys->embedded = true; p_sys->keys = NULL; wnd->handle.xid = window; wnd->control = Control; -- 2.39.2