mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 04:45:36 +00:00
[350/906] fix window position when using xoverlay
x, y are the coordinates of the position inside the new parent window. Fixes #584877
This commit is contained in:
parent
ca1a2d33ca
commit
f3fef483ec
2 changed files with 12 additions and 22 deletions
|
@ -438,7 +438,7 @@ gst_gl_window_set_external_window_id (GstGLWindow * window, gulong id)
|
||||||
attr.height);
|
attr.height);
|
||||||
|
|
||||||
XReparentWindow (priv->disp_send, priv->internal_win_id, priv->parent,
|
XReparentWindow (priv->disp_send, priv->internal_win_id, priv->parent,
|
||||||
attr.x, attr.y);
|
0, 0);
|
||||||
|
|
||||||
XSync (priv->disp_send, FALSE);
|
XSync (priv->disp_send, FALSE);
|
||||||
|
|
||||||
|
@ -540,22 +540,17 @@ gst_gl_window_draw (GstGLWindow * window)
|
||||||
XWindowAttributes attr_parent;
|
XWindowAttributes attr_parent;
|
||||||
XGetWindowAttributes (priv->disp_send, priv->parent, &attr_parent);
|
XGetWindowAttributes (priv->disp_send, priv->parent, &attr_parent);
|
||||||
|
|
||||||
if (attr.x != attr_parent.x || attr.y != attr_parent.y ||
|
if (attr.width != attr_parent.width ||
|
||||||
attr.width != attr_parent.width
|
attr.height != attr_parent.height) {
|
||||||
|| attr.height != attr_parent.height) {
|
|
||||||
XMoveResizeWindow (priv->disp_send, priv->internal_win_id,
|
XMoveResizeWindow (priv->disp_send, priv->internal_win_id,
|
||||||
attr_parent.x, attr_parent.y, attr_parent.width,
|
0, 0, attr_parent.width, attr_parent.height);
|
||||||
attr_parent.height);
|
|
||||||
XSync (priv->disp_send, FALSE);
|
XSync (priv->disp_send, FALSE);
|
||||||
|
|
||||||
attr.x = attr_parent.x;
|
|
||||||
attr.y = attr_parent.y;
|
|
||||||
|
|
||||||
attr.width = attr_parent.width;
|
attr.width = attr_parent.width;
|
||||||
attr.height = attr_parent.height;
|
attr.height = attr_parent.height;
|
||||||
|
|
||||||
g_debug ("parent resize: %d, %d, %d, %d\n", attr_parent.x,
|
g_debug ("parent resize: %d, %d\n",
|
||||||
attr_parent.y, attr_parent.width, attr_parent.height);
|
attr_parent.width, attr_parent.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -439,7 +439,7 @@ gst_gl_window_set_external_window_id (GstGLWindow * window, gulong id)
|
||||||
attr.height);
|
attr.height);
|
||||||
|
|
||||||
XReparentWindow (priv->disp_send, priv->internal_win_id, priv->parent,
|
XReparentWindow (priv->disp_send, priv->internal_win_id, priv->parent,
|
||||||
attr.x, attr.y);
|
0, 0);
|
||||||
|
|
||||||
XSync (priv->disp_send, FALSE);
|
XSync (priv->disp_send, FALSE);
|
||||||
|
|
||||||
|
@ -541,22 +541,17 @@ gst_gl_window_draw (GstGLWindow * window)
|
||||||
XWindowAttributes attr_parent;
|
XWindowAttributes attr_parent;
|
||||||
XGetWindowAttributes (priv->disp_send, priv->parent, &attr_parent);
|
XGetWindowAttributes (priv->disp_send, priv->parent, &attr_parent);
|
||||||
|
|
||||||
if (attr.x != attr_parent.x || attr.y != attr_parent.y ||
|
if (attr.width != attr_parent.width ||
|
||||||
attr.width != attr_parent.width
|
attr.height != attr_parent.height) {
|
||||||
|| attr.height != attr_parent.height) {
|
|
||||||
XMoveResizeWindow (priv->disp_send, priv->internal_win_id,
|
XMoveResizeWindow (priv->disp_send, priv->internal_win_id,
|
||||||
attr_parent.x, attr_parent.y, attr_parent.width,
|
0, 0, attr_parent.width, attr_parent.height);
|
||||||
attr_parent.height);
|
|
||||||
XSync (priv->disp_send, FALSE);
|
XSync (priv->disp_send, FALSE);
|
||||||
|
|
||||||
attr.x = attr_parent.x;
|
|
||||||
attr.y = attr_parent.y;
|
|
||||||
|
|
||||||
attr.width = attr_parent.width;
|
attr.width = attr_parent.width;
|
||||||
attr.height = attr_parent.height;
|
attr.height = attr_parent.height;
|
||||||
|
|
||||||
g_debug ("parent resize: %d, %d, %d, %d\n", attr_parent.x,
|
g_debug ("parent resize: %d, %d\n",
|
||||||
attr_parent.y, attr_parent.width, attr_parent.height);
|
attr_parent.width, attr_parent.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue