diff --git a/subprojects/gst-plugins-base/sys/ximage/ximagesink.c b/subprojects/gst-plugins-base/sys/ximage/ximagesink.c index 6b1b487923..4fd9070538 100644 --- a/subprojects/gst-plugins-base/sys/ximage/ximagesink.c +++ b/subprojects/gst-plugins-base/sys/ximage/ximagesink.c @@ -112,6 +112,9 @@ /* Debugging category */ #include +/* For getpid */ +#include + /* for XkbKeycodeToKeysym */ #include @@ -433,6 +436,12 @@ gst_x_image_sink_xwindow_set_title (GstXImageSink * ximagesink, XSetClassHint (ximagesink->xcontext->disp, xwindow->win, hint); } XFree (hint); + + unsigned long pid = getpid (); + Atom _NET_WM_PID = + XInternAtom (ximagesink->xcontext->disp, "_NET_WM_PID", 0); + XChangeProperty (ximagesink->xcontext->disp, xwindow->win, + _NET_WM_PID, _NET_WM_PID, 32, 0, (unsigned char *) &pid, 1); } } } diff --git a/subprojects/gst-plugins-base/sys/xvimage/xvcontext.c b/subprojects/gst-plugins-base/sys/xvimage/xvcontext.c index fbaee4e309..75bebd9887 100644 --- a/subprojects/gst-plugins-base/sys/xvimage/xvcontext.c +++ b/subprojects/gst-plugins-base/sys/xvimage/xvcontext.c @@ -30,6 +30,9 @@ /* Debugging category */ #include +/* for getpid */ +#include + /* for XkbKeycodeToKeysym */ #include @@ -1039,6 +1042,11 @@ gst_xvcontext_create_xwindow (GstXvContext * context, gint width, gint height) g_free (hints); } + unsigned long pid = getpid (); + Atom _NET_WM_PID = XInternAtom (context->disp, "_NET_WM_PID", 0); + XChangeProperty (context->disp, window->win, + _NET_WM_PID, _NET_WM_PID, 32, 0, (unsigned char *) &pid, 1); + window->gc = XCreateGC (context->disp, window->win, 0, NULL); XMapRaised (context->disp, window->win);