From: david Date: Fri, 22 Jan 2021 21:24:24 +0000 (+0100) Subject: Set _NET_WM_NAME property for xvimagesink and ximagesink X-Git-Tag: 1.19.3~511^2~254 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e135961e1ec27f17ccb7feb7694aebfe19485114;p=platform%2Fupstream%2Fgstreamer.git Set _NET_WM_NAME property for xvimagesink and ximagesink Part-of: --- diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 36e678d..f1bab94 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -397,6 +397,15 @@ gst_x_image_sink_xwindow_set_title (GstXImageSink * ximagesink, if (title) { if ((XStringListToTextProperty (((char **) &title), 1, &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); XFree (xproperty.value); } diff --git a/sys/xvimage/xvcontext.c b/sys/xvimage/xvcontext.c index 69d6884..b240cc8 100644 --- a/sys/xvimage/xvcontext.c +++ b/sys/xvimage/xvcontext.c @@ -1106,11 +1106,17 @@ gst_xwindow_set_title (GstXWindow * window, const gchar * title) if (window->internal && title) { XTextProperty xproperty; 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) { XSetWMName (context->disp, window->win, &xproperty); 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) { hint->res_name = (char *) title; hint->res_class = (char *) "GStreamer";