version 1.102, 2014/02/22 18:01:10 |
version 1.103, 2014/03/31 21:41:07 |
|
|
void |
void |
window_pane_active_lost(struct window_pane *wp, struct window_pane *nextwp) |
window_pane_active_lost(struct window_pane *wp, struct window_pane *nextwp) |
{ |
{ |
struct layout_cell *lc, *lc2; |
struct layout_cell *lc, *lc2, *lcparent; |
|
|
|
/* Get the parent cell. */ |
|
lcparent = nextwp->layout_cell->parent; |
|
if (lcparent == NULL) |
|
return; |
|
|
/* Save the target pane in its parent. */ |
/* Save the target pane in its parent. */ |
nextwp->layout_cell->parent->lastwp = nextwp; |
lcparent->lastwp = nextwp; |
|
|
/* |
/* |
* Save the source pane in all of its parents up to, but not including, |
* Save the source pane in all of its parents up to, but not including, |
|
|
if (wp == NULL) |
if (wp == NULL) |
return; |
return; |
for (lc = wp->layout_cell->parent; lc != NULL; lc = lc->parent) { |
for (lc = wp->layout_cell->parent; lc != NULL; lc = lc->parent) { |
lc2 = nextwp->layout_cell->parent; |
for (lc2 = lcparent; lc2 != NULL; lc2 = lc2->parent) { |
for (; lc2 != NULL; lc2 = lc2->parent) { |
|
if (lc == lc2) |
if (lc == lc2) |
return; |
return; |
} |
} |