Commit d41934d6 authored by Cheng Sun's avatar Cheng Sun Committed by Jean-Baptiste Kempf

XCB windowless: respect top/left offset

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 9832877e
......@@ -74,8 +74,8 @@ void VlcWindowlessXCB::drawBackground(xcb_drawable_t drawable)
uint32_t values[2] = {colorpixel, 0};
xcb_create_gc(m_conn, background, drawable, mask, values);
xcb_rectangle_t rect;
rect.x = 0;
rect.y = 0;
rect.x = npwindow.x;
rect.y = npwindow.y;
rect.width = npwindow.width;
rect.height = npwindow.height;
......@@ -106,8 +106,8 @@ bool VlcWindowlessXCB::handle_event(void *event)
break;
/* Compute the position of the video */
int left = (npwindow.width - m_media_width) / 2;
int top = (npwindow.height - m_media_height) / 2;
int left = npwindow.x + (npwindow.width - m_media_width) / 2;
int top = npwindow.y + (npwindow.height - m_media_height) / 2;
gc = xcb_generate_id(m_conn);
xcb_create_gc(m_conn, gc, xgeevent->drawable, 0, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment