src/video/x11/SDL_x11video.c
branchSDL-1.2
changeset 6169 6f3e5ccfd585
parent 6137 4720145f848b
child 6170 044ca54328b4
equal deleted inserted replaced
6158:6f3a2bb301d6 6169:6f3e5ccfd585
   414 	    classhints->res_class = classname;
   414 	    classhints->res_class = classname;
   415 	    XSetClassHint(SDL_Display, WMwindow, classhints);
   415 	    XSetClassHint(SDL_Display, WMwindow, classhints);
   416 	    XFree(classhints);
   416 	    XFree(classhints);
   417 	}
   417 	}
   418     }
   418     }
       
   419 
       
   420 	{
       
   421 		char hostname[256];
       
   422 
       
   423 		if (gethostname(hostname, sizeof(hostname)) > -1) {
       
   424 			hostname[sizeof(hostname)-1] = '\0';
       
   425 			pid_t pid = getpid();
       
   426 
       
   427 			if (pid > 0) {
       
   428 				Atom _NET_WM_PID = XInternAtom(SDL_Display, "_NET_WM_PID", False);
       
   429 				Atom WM_CLIENT_MACHINE = XInternAtom(SDL_Display, "WM_CLIENT_MACHINE", False);
       
   430 				
       
   431 				XChangeProperty(SDL_Display, WMwindow, _NET_WM_PID, XA_CARDINAL, 32,
       
   432 				                PropModeReplace, (unsigned char *)&pid, 1);
       
   433 				XChangeProperty(SDL_Display, WMwindow, WM_CLIENT_MACHINE, XA_STRING, 8,
       
   434 				                PropModeReplace, hostname, SDL_strlen(hostname));
       
   435 			}
       
   436 		}
       
   437 	}
   419 
   438 
   420 	/* Setup the communication with the IM server */
   439 	/* Setup the communication with the IM server */
   421 	/* create_aux_windows may be called several times against the same
   440 	/* create_aux_windows may be called several times against the same
   422 	   Display.  We should reuse the SDL_IM if one has been opened for
   441 	   Display.  We should reuse the SDL_IM if one has been opened for
   423 	   the Display, so we should not simply reset SDL_IM here.  */
   442 	   the Display, so we should not simply reset SDL_IM here.  */