1.1 --- a/src/video/x11/SDL_x11video.c Thu Jan 05 19:19:58 2012 -0500
1.2 +++ b/src/video/x11/SDL_x11video.c Tue Jun 28 22:26:47 2011 +0200
1.3 @@ -417,6 +417,25 @@
1.4 }
1.5 }
1.6
1.7 + {
1.8 + char hostname[256];
1.9 +
1.10 + if (gethostname(hostname, sizeof(hostname)) > -1) {
1.11 + hostname[sizeof(hostname)-1] = '\0';
1.12 + pid_t pid = getpid();
1.13 +
1.14 + if (pid > 0) {
1.15 + Atom _NET_WM_PID = XInternAtom(SDL_Display, "_NET_WM_PID", False);
1.16 + Atom WM_CLIENT_MACHINE = XInternAtom(SDL_Display, "WM_CLIENT_MACHINE", False);
1.17 +
1.18 + XChangeProperty(SDL_Display, WMwindow, _NET_WM_PID, XA_CARDINAL, 32,
1.19 + PropModeReplace, (unsigned char *)&pid, 1);
1.20 + XChangeProperty(SDL_Display, WMwindow, WM_CLIENT_MACHINE, XA_STRING, 8,
1.21 + PropModeReplace, hostname, SDL_strlen(hostname));
1.22 + }
1.23 + }
1.24 + }
1.25 +
1.26 /* Setup the communication with the IM server */
1.27 /* create_aux_windows may be called several times against the same
1.28 Display. We should reuse the SDL_IM if one has been opened for