summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis.bg@samsung.com>2015-06-05 16:01:05 +0100
committerLuis de Bethencourt <luis.bg@samsung.com>2015-06-08 17:08:30 +0100
commitfc01b3f13f2c9308009b3843e9496c29ca9b64d3 (patch)
tree9423d8513e922b5f41598efa4f5d1f04528c656f /sys
parentc3a19f7851c9e0c5d28a87bbdfb1369e841d43a5 (diff)
ximagesink: set WM_CLASS of window
Set WM_CLASS of the ximagesink window so window managers can apply rules based on xprop filtering.
Diffstat (limited to 'sys')
-rw-r--r--sys/ximage/ximagesink.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index 7814ac84a..328a617e1 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -378,6 +378,7 @@ gst_ximagesink_xwindow_set_title (GstXImageSink * ximagesink,
/* we have a window */
if (xwindow->internal) {
XTextProperty xproperty;
+ XClassHint *hint = XAllocClassHint ();
const gchar *app_name;
const gchar *title = NULL;
gchar *title_mem = NULL;
@@ -403,6 +404,13 @@ gst_ximagesink_xwindow_set_title (GstXImageSink * ximagesink,
g_free (title_mem);
}
+
+ if (hint) {
+ hint->res_name = g_strdup (app_name);
+ hint->res_class = g_strdup ("GStreamer");
+ XSetClassHint (ximagesink->xcontext->disp, xwindow->win, hint);
+ }
+ XFree (hint);
}
}
}