simplified unmanage 8aa860d2
Anselm R. Garbe · 2006-09-07 18:12 1 file(s) · +2 −8
client.c +2 −8
414 414
void
415 415
unmanage(Client *c)
416 416
{
417 -
	Client *tc, *fc;
418 -
	Window trans;
419 417
	XGrabServer(dpy);
420 418
	XSetErrorHandler(xerrordummy);
421 419
422 420
	detach(c);
423 421
	if(sel == c) {
424 -
		XGetTransientForHint(dpy, c->win, &trans);
425 -
		if(trans && (tc = getclient(trans)) && isvisible(tc))
426 -
			fc = tc;
427 -
		else
428 -
			fc = getnext(clients);
429 -
		focus(fc);
422 +
		for(sel = stack; sel && !isvisible(sel); sel = sel->snext);
423 +
		focus(sel);
430 424
	}
431 425
432 426
	XUngrabButton(dpy, AnyButton, AnyModifier, c->win);