return VLC_ENOMEM;
const xcb_screen_t *screen;
- uint16_t width, height;
- sys->embed = XCB_parent_Create(vd, &sys->conn, &screen, &width, &height);
+ sys->embed = XCB_parent_Create(vd, &sys->conn, &screen);
if (sys->embed == NULL)
{
free(sys);
if (is_fullscreen && vout_window_SetFullScreen(sys->embed, true))
is_fullscreen = false;
vout_display_SendEventFullscreen(vd, is_fullscreen);
- vout_display_SendEventDisplaySize(vd, width, height);
return VLC_SUCCESS;
xcb_window_t wnd)
{
/* Subscribe to parent window resize events */
- uint32_t value = XCB_EVENT_MASK_POINTER_MOTION
- | XCB_EVENT_MASK_STRUCTURE_NOTIFY;
+ uint32_t value = XCB_EVENT_MASK_POINTER_MOTION;
xcb_change_window_attributes (conn, wnd, XCB_CW_EVENT_MASK, &value);
/* Try to subscribe to click events */
/* (only one X11 client can get them, so might not work) */
*/
vout_window_t *XCB_parent_Create (vout_display_t *vd,
xcb_connection_t **restrict pconn,
- const xcb_screen_t **restrict pscreen,
- uint16_t *restrict pwidth,
- uint16_t *restrict pheight)
+ const xcb_screen_t **restrict pscreen)
{
vout_window_cfg_t cfg = {
.type = VOUT_WINDOW_TYPE_XID,
msg_Err (vd, "window not valid");
goto error;
}
- *pwidth = geo->width;
- *pheight = geo->height;
const xcb_screen_t *screen = FindScreen (VLC_OBJECT(vd), conn, geo->root);
free (geo);
msg_Dbg (vd, "display is %svisible", *visible ? "" : "not ");
}
-static void
-HandleParentStructure (vout_display_t *vd,
- const xcb_configure_notify_event_t *ev)
-{
- vout_display_SendEventDisplaySize (vd, ev->width, ev->height);
-}
-
/**
* Process an X11 event.
*/
(xcb_visibility_notify_event_t *)ev);
break;
- case XCB_CONFIGURE_NOTIFY:
- HandleParentStructure (vd, (xcb_configure_notify_event_t *)ev);
- break;
-
/* FIXME I am not sure it is the right one */
case XCB_DESTROY_NOTIFY:
vout_display_SendEventClose (vd);
struct vout_window_t *XCB_parent_Create (vout_display_t *obj,
xcb_connection_t **,
- const xcb_screen_t **,
- uint16_t *width, uint16_t *height);
+ const xcb_screen_t **);
xcb_cursor_t XCB_cursor_Create (xcb_connection_t *, const xcb_screen_t *);
int XCB_Manage (vout_display_t *vd, xcb_connection_t *conn, bool *);
/* Get window, connect to X server (via XCB) */
xcb_connection_t *conn;
const xcb_screen_t *scr;
- uint16_t width, height;
vout_window_t *surface;
- surface = XCB_parent_Create (vd, &conn, &scr, &width, &height);
+ surface = XCB_parent_Create (vd, &conn, &scr);
if (surface == NULL)
{
free (sys);
if (vout_window_SetFullScreen (surface, fs))
fs = false;
vout_display_SendEventFullscreen (vd, fs);
- vout_display_SendEventDisplaySize (vd, width, height);
return VLC_SUCCESS;
/* Get window, connect to X server */
xcb_connection_t *conn;
const xcb_screen_t *scr;
- uint16_t width, height;
- sys->embed = XCB_parent_Create (vd, &conn, &scr, &width, &height);
+ sys->embed = XCB_parent_Create (vd, &conn, &scr);
if (sys->embed == NULL)
{
free (sys);
xcb_create_pixmap (conn, sys->depth, pixmap, scr->root, 1, 1);
c = xcb_create_window_checked (conn, sys->depth, sys->window,
sys->embed->handle.xid, 0, 0,
- width, height, 0,
+ vd->cfg->display.width,
+ vd->cfg->display.height, 0,
XCB_WINDOW_CLASS_INPUT_OUTPUT,
vid, mask, values);
xcb_map_window (conn, sys->window);
if (is_fullscreen && vout_window_SetFullScreen (sys->embed, true))
is_fullscreen = false;
vout_display_SendEventFullscreen (vd, is_fullscreen);
- vout_display_SendEventDisplaySize (vd, width, height);
return VLC_SUCCESS;
/* Connect to X */
xcb_connection_t *conn;
const xcb_screen_t *screen;
- uint16_t width, height;
- p_sys->embed = XCB_parent_Create (vd, &conn, &screen, &width, &height);
+ p_sys->embed = XCB_parent_Create (vd, &conn, &screen);
if (p_sys->embed == NULL)
{
free (p_sys);
if (is_fullscreen && vout_window_SetFullScreen (p_sys->embed, true))
is_fullscreen = false;
vout_display_SendEventFullscreen (vd, is_fullscreen);
- vout_display_SendEventDisplaySize (vd, width, height);
return VLC_SUCCESS;