diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-06-12 19:13:23 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-06-12 19:13:23 -0700 |
commit | 300afc5784cec539a1a9d2babb9f73056aee52cd (patch) | |
tree | a360625a73a1f8b94f4119542c55113feb35e843 /xclock.c | |
parent | 861edc2009b8224d9acf77b9703a9fdb7d4903cc (diff) |
X.Org Bug 10775: xclock does not set _NET_WM_PID
X.Org Bugzilla #10775: <https://bugs.freedesktop.org/show_bug.cgi?id=10775>
Diffstat (limited to 'xclock.c')
-rw-r--r-- | xclock.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -57,6 +57,10 @@ in this Software without prior written authorization from The Open Group. Boolean no_locale = True; /* if True, use old behavior */ #endif +#ifdef HAVE_GETPID +# include <unistd.h> +#endif + /* Command line options table. Only resources are entered here...there is a pass over the remaining options after XtParseCommand is let loose. */ @@ -208,6 +212,17 @@ main(int argc, char *argv[]) False); (void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel), &wm_delete_window, 1); + +#ifdef HAVE_GETPID + { + pid_t pid = getpid(); + XChangeProperty(XtDisplay(toplevel), XtWindow(toplevel), + XInternAtom(XtDisplay(toplevel), "_NET_WM_PID", False), + XA_CARDINAL, 32, PropModeReplace, + (unsigned char *) &pid, 1); + } +#endif + XtAppMainLoop (app_con); exit(0); } |