428 |
handleDestroyNotify (XDestroyWindowEvent * ev) |
handleDestroyNotify (XDestroyWindowEvent * ev) |
429 |
{ |
{ |
430 |
Client *c; |
Client *c; |
431 |
|
int not_warp_to_next; |
432 |
|
|
433 |
#ifdef DEBUG |
#ifdef DEBUG |
434 |
printf ("entering handleDestroyNotify\n"); |
printf ("entering handleDestroyNotify\n"); |
437 |
c = clientGetFromWindow (ev->window, WINDOW); |
c = clientGetFromWindow (ev->window, WINDOW); |
438 |
if (c) |
if (c) |
439 |
{ |
{ |
440 |
|
not_warp_to_next = c->not_warp_to_next; |
441 |
clientUnframe (c, False); |
clientUnframe (c, False); |
442 |
if (clients) |
if (clients) |
443 |
clientSetFocus (clientGetNext (clients->prev, 0), True); |
{ |
444 |
|
c = clientGetTopMost(WIN_LAYER_NORMAL); |
445 |
|
clientSetFocus (c, True); |
446 |
|
if (!not_warp_to_next) |
447 |
|
clientWarpMouse (c); |
448 |
|
} |
449 |
else |
else |
450 |
clientSetFocus (NULL, True); |
clientSetFocus (NULL, True); |
451 |
} |
} |
455 |
handleUnmapNotify (XUnmapEvent * ev) |
handleUnmapNotify (XUnmapEvent * ev) |
456 |
{ |
{ |
457 |
Client *c; |
Client *c; |
458 |
|
int not_warp_to_next; |
459 |
|
|
460 |
#ifdef DEBUG |
#ifdef DEBUG |
461 |
printf ("entering handleUnmapNotify\n"); |
printf ("entering handleUnmapNotify\n"); |
464 |
c = clientGetFromWindow (ev->window, WINDOW); |
c = clientGetFromWindow (ev->window, WINDOW); |
465 |
if (c) |
if (c) |
466 |
{ |
{ |
467 |
|
not_warp_to_next = c->not_warp_to_next; |
468 |
if (c->ignore_unmap) |
if (c->ignore_unmap) |
469 |
c->ignore_unmap--; |
c->ignore_unmap--; |
470 |
else |
else |
471 |
{ |
{ |
472 |
clientUnframe (c, False); |
clientUnframe (c, False); |
473 |
if (clients) |
if (clients) |
474 |
clientSetFocus (clientGetNext (clients->prev, 0), True); |
{ |
475 |
|
c = clientGetTopMost(WIN_LAYER_NORMAL); |
476 |
|
clientSetFocus (c, True); |
477 |
|
if (!not_warp_to_next) |
478 |
|
clientWarpMouse (c); |
479 |
|
} |
480 |
else |
else |
481 |
clientSetFocus (NULL, True); |
clientSetFocus (NULL, True); |
482 |
} |
} |