| 431 |
handleDestroyNotify (XDestroyWindowEvent * ev) |
handleDestroyNotify (XDestroyWindowEvent * ev) |
| 432 |
{ |
{ |
| 433 |
Client *c; |
Client *c; |
|
int not_warp_to_next; |
|
| 434 |
|
|
| 435 |
#ifdef DEBUG |
#ifdef DEBUG |
| 436 |
printf ("entering handleDestroyNotify\n"); |
printf ("entering handleDestroyNotify\n"); |
| 439 |
c = clientGetFromWindow (ev->window, WINDOW); |
c = clientGetFromWindow (ev->window, WINDOW); |
| 440 |
if (c) |
if (c) |
| 441 |
{ |
{ |
|
not_warp_to_next = c->not_warp_to_next || c->transientFor; |
|
| 442 |
clientUnframe (c, False); |
clientUnframe (c, False); |
| 443 |
if (clients) |
if (clients) |
| 444 |
{ |
{ |
| 447 |
c = clientGetTopMost (WIN_LAYER_NORMAL); |
c = clientGetTopMost (WIN_LAYER_NORMAL); |
| 448 |
|
|
| 449 |
clientSetFocus (c, True); |
clientSetFocus (c, True); |
|
if (c && !(not_warp_to_next || c->non_focusing)) |
|
|
clientWarpMouse (c); |
|
| 450 |
} |
} |
| 451 |
else |
else |
| 452 |
clientSetFocus (NULL, True); |
clientSetFocus (NULL, True); |
| 457 |
handleUnmapNotify (XUnmapEvent * ev) |
handleUnmapNotify (XUnmapEvent * ev) |
| 458 |
{ |
{ |
| 459 |
Client *c; |
Client *c; |
|
int not_warp_to_next; |
|
| 460 |
|
|
| 461 |
#ifdef DEBUG |
#ifdef DEBUG |
| 462 |
printf ("entering handleUnmapNotify\n"); |
printf ("entering handleUnmapNotify\n"); |
| 465 |
c = clientGetFromWindow (ev->window, WINDOW); |
c = clientGetFromWindow (ev->window, WINDOW); |
| 466 |
if (c) |
if (c) |
| 467 |
{ |
{ |
|
not_warp_to_next = c->not_warp_to_next || c->transientFor; |
|
| 468 |
if (c->ignore_unmap) |
if (c->ignore_unmap) |
| 469 |
c->ignore_unmap--; |
c->ignore_unmap--; |
| 470 |
else |
else |
| 476 |
if (!c) |
if (!c) |
| 477 |
c = clientGetTopMost (WIN_LAYER_NORMAL); |
c = clientGetTopMost (WIN_LAYER_NORMAL); |
| 478 |
clientSetFocus (c, True); |
clientSetFocus (c, True); |
|
if (c && !(not_warp_to_next || c->non_focusing)) |
|
|
clientWarpMouse (c); |
|
| 479 |
} |
} |
| 480 |
else |
else |
| 481 |
clientSetFocus (NULL, True); |
clientSetFocus (NULL, True); |