[vlc-commits] commit: XCB/window: cannot be resized if embedded ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Wed Aug 4 18:14:09 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug  4 19:13:39 2010 +0300| [2c0b770976956de35b321f3307405adc9cfde85e] | committer: Rémi Denis-Courmont 

XCB/window: cannot be resized if embedded

(manual forward port of 3a31af06dbabd4e21a68e46249fdf3209cd8060a)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c0b770976956de35b321f3307405adc9cfde85e
---

 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 48f2f2a..a7040a8 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;



More information about the vlc-commits mailing list