1 --- a/src/xcommon.c 2005-08-14 19:36:52.000000000 +0200
2 +++ b/src/xcommon.c 2010-03-07 17:55:52.669570209 +0100
9 #if defined(__FreeBSD__)
10 #include <machine/param.h>
12 static Atom wm_delete_window;
13 static Atom xawtv_station;
14 static Atom xawtv_remote;
15 +static Atom net_wm_pid;
17 #ifdef HAVE_XTESTEXTENSION
18 static KeyCode kc_shift_l; /* Fake key to send. */
27 - Atom atoms_return[ 17 ];
28 + Atom atoms_return[ 18 ];
30 - XInternAtoms( display, atom_names, 17, False, atoms_return );
31 + XInternAtoms( display, atom_names, 18, False, atoms_return );
32 net_supporting_wm_check = atoms_return[ 0 ];
33 net_supported = atoms_return[ 1 ];
34 net_wm_name = atoms_return[ 2 ];
36 wm_delete_window = atoms_return[ 14 ];
37 xawtv_station = atoms_return[ 15 ];
38 xawtv_remote = atoms_return[ 16 ];
39 + net_wm_pid = atoms_return[ 17 ];
42 static uint32_t icon_colours[256];
43 @@ -1017,6 +1021,16 @@
48 + /* Set _NET_WM_PID */
50 + if( xcommon_verbose ) {
51 + fprintf( stderr, "xcommon: try to set _NET_WM_PID" );
53 + pid_t mypid = getpid();
54 + XChangeProperty(display, wm_window, net_wm_pid, cardinal, 32,
55 + PropModeReplace, (const unsigned char*) &mypid, 1);
58 if( check_for_EWMH_wm( display, &wmname ) ) {
59 if( xcommon_verbose ) {