mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
xvimagesink: set WM_CLASS of window
Set WM_CLASS of the xvimagesink window so window managers can apply rules based on xprop filtering.
This commit is contained in:
parent
92ef0f8c38
commit
c3a19f7851
1 changed files with 8 additions and 0 deletions
|
@ -1080,10 +1080,18 @@ gst_xwindow_set_title (GstXWindow * window, const gchar * title)
|
||||||
/* we have a window */
|
/* we have a window */
|
||||||
if (window->internal && title) {
|
if (window->internal && title) {
|
||||||
XTextProperty xproperty;
|
XTextProperty xproperty;
|
||||||
|
XClassHint *hint = XAllocClassHint ();
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
if (hint) {
|
||||||
|
hint->res_name = g_strdup (title);
|
||||||
|
hint->res_class = g_strdup ("GStreamer");
|
||||||
|
XSetClassHint (context->disp, window->win, hint);
|
||||||
|
}
|
||||||
|
XFree (hint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue