From: Luis de Bethencourt Date: Fri, 5 Jun 2015 14:58:39 +0000 (+0100) Subject: xvimagesink: set WM_CLASS of window X-Git-Tag: 1.19.3~511^2~3569 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3a19f7851c9e0c5d28a87bbdfb1369e841d43a5;p=platform%2Fupstream%2Fgstreamer.git xvimagesink: set WM_CLASS of window Set WM_CLASS of the xvimagesink window so window managers can apply rules based on xprop filtering. --- diff --git a/sys/xvimage/xvcontext.c b/sys/xvimage/xvcontext.c index 6d84e37..b04a49c 100644 --- a/sys/xvimage/xvcontext.c +++ b/sys/xvimage/xvcontext.c @@ -1080,10 +1080,18 @@ gst_xwindow_set_title (GstXWindow * window, const gchar * title) /* we have a window */ if (window->internal && title) { XTextProperty xproperty; + XClassHint *hint = XAllocClassHint (); if ((XStringListToTextProperty (((char **) &title), 1, &xproperty)) != 0) { XSetWMName (context->disp, window->win, &xproperty); XFree (xproperty.value); + + if (hint) { + hint->res_name = g_strdup (title); + hint->res_class = g_strdup ("GStreamer"); + XSetClassHint (context->disp, window->win, hint); + } + XFree (hint); } } }