From f3fef483ec832c49121d807521ad3e40e14113ac Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Sun, 7 Jun 2009 20:19:03 +0200 Subject: [PATCH] [350/906] fix window position when using xoverlay x, y are the coordinates of the position inside the new parent window. Fixes #584877 --- gst-libs/gst/gl/gstglwindow_x11.c | 17 ++++++----------- gst-libs/gst/gl/gstglwindow_x11ES2.c | 17 ++++++----------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/gst-libs/gst/gl/gstglwindow_x11.c b/gst-libs/gst/gl/gstglwindow_x11.c index 60a4f51f8f..e1cdb9ddc7 100644 --- a/gst-libs/gst/gl/gstglwindow_x11.c +++ b/gst-libs/gst/gl/gstglwindow_x11.c @@ -438,7 +438,7 @@ gst_gl_window_set_external_window_id (GstGLWindow * window, gulong id) attr.height); XReparentWindow (priv->disp_send, priv->internal_win_id, priv->parent, - attr.x, attr.y); + 0, 0); XSync (priv->disp_send, FALSE); @@ -540,22 +540,17 @@ gst_gl_window_draw (GstGLWindow * window) XWindowAttributes attr_parent; XGetWindowAttributes (priv->disp_send, priv->parent, &attr_parent); - if (attr.x != attr_parent.x || attr.y != attr_parent.y || - attr.width != attr_parent.width - || attr.height != attr_parent.height) { + if (attr.width != attr_parent.width || + attr.height != attr_parent.height) { XMoveResizeWindow (priv->disp_send, priv->internal_win_id, - attr_parent.x, attr_parent.y, attr_parent.width, - attr_parent.height); + 0, 0, attr_parent.width, attr_parent.height); XSync (priv->disp_send, FALSE); - attr.x = attr_parent.x; - attr.y = attr_parent.y; - attr.width = attr_parent.width; attr.height = attr_parent.height; - g_debug ("parent resize: %d, %d, %d, %d\n", attr_parent.x, - attr_parent.y, attr_parent.width, attr_parent.height); + g_debug ("parent resize: %d, %d\n", + attr_parent.width, attr_parent.height); } } diff --git a/gst-libs/gst/gl/gstglwindow_x11ES2.c b/gst-libs/gst/gl/gstglwindow_x11ES2.c index 02978caa6b..09649d7ad5 100644 --- a/gst-libs/gst/gl/gstglwindow_x11ES2.c +++ b/gst-libs/gst/gl/gstglwindow_x11ES2.c @@ -439,7 +439,7 @@ gst_gl_window_set_external_window_id (GstGLWindow * window, gulong id) attr.height); XReparentWindow (priv->disp_send, priv->internal_win_id, priv->parent, - attr.x, attr.y); + 0, 0); XSync (priv->disp_send, FALSE); @@ -541,22 +541,17 @@ gst_gl_window_draw (GstGLWindow * window) XWindowAttributes attr_parent; XGetWindowAttributes (priv->disp_send, priv->parent, &attr_parent); - if (attr.x != attr_parent.x || attr.y != attr_parent.y || - attr.width != attr_parent.width - || attr.height != attr_parent.height) { + if (attr.width != attr_parent.width || + attr.height != attr_parent.height) { XMoveResizeWindow (priv->disp_send, priv->internal_win_id, - attr_parent.x, attr_parent.y, attr_parent.width, - attr_parent.height); + 0, 0, attr_parent.width, attr_parent.height); XSync (priv->disp_send, FALSE); - attr.x = attr_parent.x; - attr.y = attr_parent.y; - attr.width = attr_parent.width; attr.height = attr_parent.height; - g_debug ("parent resize: %d, %d, %d, %d\n", attr_parent.x, - attr_parent.y, attr_parent.width, attr_parent.height); + g_debug ("parent resize: %d, %d\n", + attr_parent.width, attr_parent.height); } }