This diff moves dialogs, toolbars and such to the group of the main application window.
Index: client.c =================================================================== RCS file: /cvs/xenocara/app/cwm/client.c,v retrieving revision 1.86 diff -u -p -r1.86 client.c --- client.c 14 Jul 2011 11:39:53 -0000 1.86 +++ client.c 31 Aug 2011 14:13:41 -0000 @@ -58,9 +58,10 @@ client_find(Window win) struct client_ctx * client_new(Window win, struct screen_ctx *sc, int mapped) { - struct client_ctx *cc; + struct client_ctx *cc, *tc; XWindowAttributes wattr; XWMHints *wmhints; + Window trans; int state; if (win == None) @@ -133,6 +134,10 @@ client_new(Window win, struct screen_ctx if (mapped) group_autogroup(cc); + + if (XGetTransientForHint(X_Dpy, win, &trans)) + if ((tc = client_find(trans)) && tc->group) + group_movetogroup(cc, tc->group->shortcut - 1); return (cc); } Index: xevents.c =================================================================== RCS file: /cvs/xenocara/app/cwm/xevents.c,v retrieving revision 1.55 diff -u -p -r1.55 xevents.c --- xevents.c 22 Aug 2011 16:34:34 -0000 1.55 +++ xevents.c 31 Aug 2011 14:13:41 -0000 @@ -181,7 +181,8 @@ xev_handle_propertynotify(XEvent *ee) { XPropertyEvent *e = &ee->xproperty; struct screen_ctx *sc; - struct client_ctx *cc; + struct client_ctx *cc, *tc; + Window trans; if ((cc = client_find(e->window)) != NULL) { switch (e->atom) { @@ -191,6 +192,10 @@ xev_handle_propertynotify(XEvent *ee) case XA_WM_NAME: client_setname(cc); break; + case XA_WM_TRANSIENT_FOR: + if (XGetTransientForHint(X_Dpy, e->window, &trans)) + if ((tc = client_find(trans)) && tc->group) + group_movetogroup(cc, tc->group->shortcut - 1); default: /* do nothing */ break; -- Alexander Polakov | plhk.ru