mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
Set _NET_WM_NAME property for xvimagesink and ximagesink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1017>
This commit is contained in:
parent
3d96786857
commit
e135961e1e
2 changed files with 15 additions and 0 deletions
|
@ -397,6 +397,15 @@ gst_x_image_sink_xwindow_set_title (GstXImageSink * ximagesink,
|
||||||
if (title) {
|
if (title) {
|
||||||
if ((XStringListToTextProperty (((char **) &title), 1,
|
if ((XStringListToTextProperty (((char **) &title), 1,
|
||||||
&xproperty)) != 0) {
|
&xproperty)) != 0) {
|
||||||
|
Atom _NET_WM_NAME =
|
||||||
|
XInternAtom (ximagesink->xcontext->disp, "_NET_WM_NAME", 0);
|
||||||
|
Atom UTF8_STRING =
|
||||||
|
XInternAtom (ximagesink->xcontext->disp, "UTF8_STRING", 0);
|
||||||
|
XChangeProperty (ximagesink->xcontext->disp, xwindow->win,
|
||||||
|
_NET_WM_NAME, UTF8_STRING, 8, 0, (unsigned char *) title,
|
||||||
|
strlen (title));
|
||||||
|
XSync (ximagesink->xcontext->disp, False);
|
||||||
|
|
||||||
XSetWMName (ximagesink->xcontext->disp, xwindow->win, &xproperty);
|
XSetWMName (ximagesink->xcontext->disp, xwindow->win, &xproperty);
|
||||||
XFree (xproperty.value);
|
XFree (xproperty.value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1106,11 +1106,17 @@ gst_xwindow_set_title (GstXWindow * window, const gchar * title)
|
||||||
if (window->internal && title) {
|
if (window->internal && title) {
|
||||||
XTextProperty xproperty;
|
XTextProperty xproperty;
|
||||||
XClassHint *hint = XAllocClassHint ();
|
XClassHint *hint = XAllocClassHint ();
|
||||||
|
Atom _NET_WM_NAME = XInternAtom (context->disp, "_NET_WM_NAME", 0);
|
||||||
|
Atom UTF8_STRING = XInternAtom (context->disp, "UTF8_STRING", 0);
|
||||||
|
|
||||||
if ((XStringListToTextProperty (((char **) &title), 1, &xproperty)) != 0) {
|
if ((XStringListToTextProperty (((char **) &title), 1, &xproperty)) != 0) {
|
||||||
XSetWMName (context->disp, window->win, &xproperty);
|
XSetWMName (context->disp, window->win, &xproperty);
|
||||||
XFree (xproperty.value);
|
XFree (xproperty.value);
|
||||||
|
|
||||||
|
XChangeProperty (context->disp, window->win, _NET_WM_NAME, UTF8_STRING, 8,
|
||||||
|
0, (unsigned char *) title, strlen (title));
|
||||||
|
XSync (context->disp, False);
|
||||||
|
|
||||||
if (hint) {
|
if (hint) {
|
||||||
hint->res_name = (char *) title;
|
hint->res_name = (char *) title;
|
||||||
hint->res_class = (char *) "GStreamer";
|
hint->res_class = (char *) "GStreamer";
|
||||||
|
|
Loading…
Reference in a new issue