From: RĂ©mi Denis-Courmont Date: Thu, 9 Apr 2009 09:46:45 +0000 (+0300) Subject: xcb_window: implement VOUT_SET_SIZE X-Git-Tag: 1.0.0-pre2~153 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3d819f9c3d0071b01c6d0294d8ed063e8a320696;p=vlc xcb_window: implement VOUT_SET_SIZE --- diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c index 6271316cb7..9b72f42c01 100644 --- a/modules/video_output/xcb/window.c +++ b/modules/video_output/xcb/window.c @@ -197,11 +197,32 @@ static void *Thread (void *data) return NULL; } +#include static int Control (vout_window_t *wnd, int cmd, va_list ap) { - msg_Err (wnd, "request %d not implemented", cmd); - (void)ap; - return VLC_EGENERIC; + vout_window_sys_t *p_sys = wnd->p_sys; + xcb_connection_t *conn = p_sys->conn; + + switch (cmd) + { + case VOUT_SET_SIZE: + { + unsigned width = va_arg (ap, unsigned); + unsigned height = va_arg (ap, unsigned); + const uint32_t values[] = { width, height, }; + + xcb_configure_window (conn, wnd->handle.xid, + XCB_CONFIG_WINDOW_WIDTH | + XCB_CONFIG_WINDOW_HEIGHT, values); + xcb_flush (conn); + break; + } + + default: + msg_Err (wnd, "request %d not implemented", cmd); + return VLC_EGENERIC; + } + return VLC_SUCCESS; }