Index: ChangeLog =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/ChangeLog,v retrieving revision 1.415 diff -u -r1.415 ChangeLog --- ChangeLog 5 Jan 2006 04:36:07 -0000 1.415 +++ ChangeLog 18 Jan 2006 11:56:46 -0000 @@ -1,1 +1,7 @@ +2006-01-18 Bernhard R. Link + + * src/events.c: look for _NET_WM_PID notify events + and adopt the intended frame number accordingly. + * src/window.{c,h}: make get_child_info accessible from events.c + 2006-01-04 Shawn Betts Index: src/events.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/events.c,v retrieving revision 1.124 diff -u -r1.124 events.c --- src/events.c 5 Nov 2005 21:23:33 -0000 1.124 +++ src/events.c 18 Jan 2006 11:56:46 -0000 @@ -582,6 +582,7 @@ property_notify (XEvent *ev) { rp_window *win; + rp_child_info *child_info; PRINT_DEBUG (("atom: %ld\n", ev->xproperty.atom)); @@ -597,7 +598,21 @@ if (win) { - switch (ev->xproperty.atom) + if (ev->xproperty.atom == _net_wm_pid) + { + PRINT_DEBUG (("updating _NET_WM_PID\n")); + child_info = get_child_info(win->w); + if (child_info ) + { + if (child_info->frame) + { + PRINT_DEBUG (("frame=%p\n", frame)); + win->intended_frame_number = child_info->frame->number; + } + /* TODO: also adopt group information? */ + } + } + else switch (ev->xproperty.atom) { case XA_WM_NAME: PRINT_DEBUG (("updating window name\n")); Index: src/window.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/window.c,v retrieving revision 1.33 diff -u -r1.33 window.c --- src/window.c 5 Jan 2006 04:36:07 -0000 1.33 +++ src/window.c 18 Jan 2006 11:56:46 -0000 @@ -108,7 +108,7 @@ /* FIXME: we need to verify that the window is running on the same host as something. otherwise there could be overlapping PIDs. */ -static struct rp_child_info * +struct rp_child_info * get_child_info (Window w) { rp_child_info *cur; Index: src/window.h =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/window.h,v retrieving revision 1.10 diff -u -r1.10 window.h --- src/window.h 4 Dec 2004 03:33:24 -0000 1.10 +++ src/window.h 18 Jan 2006 11:56:46 -0000 @@ -67,4 +67,6 @@ void set_active_window_force (rp_window *win); void set_active_window_body (rp_window *win, int force); + +struct rp_child_info *get_child_info (Window w); #endif /* ! _RATPOISON_LIST_H */