[vlc-commits] commit: Make xcb reject resize requests when embedded. Fixes trac #3848. ( David Menestrina )

git at videolan.org git at videolan.org
Tue Aug 3 22:56:13 CEST 2010


vlc/vlc-1.1 | branch: master | David Menestrina <dmenest-vlc at ofb.net> | Tue Aug  3 19:56:14 2010 +0300| [3a31af06dbabd4e21a68e46249fdf3209cd8060a] | committer: Rémi Denis-Courmont 

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

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=3a31af06dbabd4e21a68e46249fdf3209cd8060a
---

 modules/video_output/xcb/window.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index dc1c708..5fcab5e 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -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;



More information about the vlc-commits mailing list