void EExit(int exitcode) { int i; if (EDebug(EDBUG_TYPE_SESSION)) Eprintf("%s: %d\n", __func__, exitcode); if (disp) { EUngrabServer(); GrabPointerRelease(); XAllowEvents(disp, AsyncBoth, CurrentTime); /* XSetInputFocus(disp, NoXID, RevertToParent, CurrentTime); */ /* I think this is a better way to release the grabs: (felix) */ XSetInputFocus(disp, PointerRoot, RevertToPointerRoot, CurrentTime); ESelectInput(VROOT, 0); EDisplayClose(); } if (Mode.wm.master) { for (i = 0; i < Mode.wm.child_count; i++) kill(Mode.wm.children[i], SIGINT); } else { exitcode = 0; } exit(exitcode); }
static void _MagwinGrabRelease(MagWindow * mw) { GrabPointerRelease(); GrabKeyboardRelease(); mw->grabbing = 0; }