--- x.c.orig Thu Dec 14 18:33:28 2006 +++ x.c Thu Dec 14 18:38:31 2006 @@ -808,6 +808,14 @@ grabbed=0; } +void ungrab_on_exit(void) +{ + if (grabbed) { + Window warpWindow = DefaultRootWindow(dpy); + ungrabit(-1, -1, warpWindow); + } +} + static void shortsleep(int usec) { struct timeval timeout;