diff -ur xxkb-1.10/xxkb.c xxkb-1.10-lodin/xxkb.c --- xxkb-1.10/xxkb.c 2007-10-05 03:30:44 +0400 +++ xxkb-1.10-lodin/xxkb.c 2007-10-05 03:29:33 +0400 @@ -352,7 +352,34 @@ BASE(ev.core.xreparent.parent) == BASE(win) || ev.core.xreparent.override_redirect == TRUE ) break; - AddWindow(win, ev.core.xreparent.parent); + /* This is an ugly hack performed by an IceWM user. + * In order to skip the IceWM's dock, + * we iterate through all 'real' windows + * and only proceed if win is on the list. + */ + + Window rwin, parent, *children, *child, app; + int num; + + XQueryTree(dpy, root, &rwin, &parent, &children, &num); + child = children; + + while (num --> 0) { + app = None; + GetAppWindow(*child, &app); + + if (app == win) { + AddWindow(win, ev.core.xreparent.parent); + break; + } + child++; + }; + + if (children != None) + XFree(children); + + // AddWindow(win, ev.core.xreparent.parent); + break; case DestroyNotify: if (ev.core.xdestroywindow.event == root) break;