mirror of
https://github.com/tmux/tmux.git
synced 2026-06-04 09:20:26 +00:00
Fixed vestigal compile errors
This commit is contained in:
@@ -159,7 +159,7 @@ cmd_float_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
u_int sx, sy;
|
u_int sx, sy;
|
||||||
struct layout_cell *lc;
|
struct layout_cell *lc;
|
||||||
|
|
||||||
if (wp->flags & PANE_FLOATING) {
|
if (window_pane_is_floating(wp)) {
|
||||||
cmdq_error(item, "pane is already floating");
|
cmdq_error(item, "pane is already floating");
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
@@ -207,7 +207,7 @@ cmd_float_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
lc->sy = sy;
|
lc->sy = sy;
|
||||||
layout_make_leaf(lc, wp); /* sets wp->layout_cell = lc, lc->wp = wp */
|
layout_make_leaf(lc, wp); /* sets wp->layout_cell = lc, lc->wp = wp */
|
||||||
|
|
||||||
wp->flags |= PANE_FLOATING;
|
lc->flags |= LAYOUT_CELL_FLOATING;
|
||||||
TAILQ_REMOVE(&w->z_index, wp, zentry);
|
TAILQ_REMOVE(&w->z_index, wp, zentry);
|
||||||
TAILQ_INSERT_HEAD(&w->z_index, wp, zentry);
|
TAILQ_INSERT_HEAD(&w->z_index, wp, zentry);
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ cmd_tile_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
struct layout_cell *float_lc, *lc;
|
struct layout_cell *float_lc, *lc;
|
||||||
int was_hidden;
|
int was_hidden;
|
||||||
|
|
||||||
if (!(wp->flags & PANE_FLOATING)) {
|
if (!window_pane_is_floating(wp)) {
|
||||||
cmdq_error(item, "pane is not floating");
|
cmdq_error(item, "pane is not floating");
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
@@ -275,12 +275,13 @@ cmd_tile_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
* than becoming a disconnected root.
|
* than becoming a disconnected root.
|
||||||
*/
|
*/
|
||||||
target_wp = NULL;
|
target_wp = NULL;
|
||||||
if (w->active != NULL && !(w->active->flags & PANE_FLOATING) &&
|
if (w->active != NULL && !window_pane_is_floating(w->active) &&
|
||||||
!(w->active->flags & PANE_HIDDEN))
|
!(w->active->flags & PANE_HIDDEN))
|
||||||
target_wp = w->active;
|
target_wp = w->active;
|
||||||
if (target_wp == NULL) {
|
if (target_wp == NULL) {
|
||||||
TAILQ_FOREACH(wpiter, &w->last_panes, sentry) {
|
TAILQ_FOREACH(wpiter, &w->last_panes, sentry) {
|
||||||
if (!(wpiter->flags & (PANE_FLOATING|PANE_HIDDEN)) &&
|
if (!(wpiter->flags & PANE_HIDDEN) &&
|
||||||
|
!window_pane_is_floating(wpiter) &&
|
||||||
window_pane_visible(wpiter)) {
|
window_pane_visible(wpiter)) {
|
||||||
target_wp = wpiter;
|
target_wp = wpiter;
|
||||||
break;
|
break;
|
||||||
@@ -289,7 +290,8 @@ cmd_tile_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
}
|
}
|
||||||
if (target_wp == NULL) {
|
if (target_wp == NULL) {
|
||||||
TAILQ_FOREACH(wpiter, &w->panes, entry) {
|
TAILQ_FOREACH(wpiter, &w->panes, entry) {
|
||||||
if (!(wpiter->flags & (PANE_FLOATING|PANE_HIDDEN)) &&
|
if (!(wpiter->flags & PANE_HIDDEN) &&
|
||||||
|
!window_pane_is_floating(wpiter) &&
|
||||||
window_pane_visible(wpiter)) {
|
window_pane_visible(wpiter)) {
|
||||||
target_wp = wpiter;
|
target_wp = wpiter;
|
||||||
break;
|
break;
|
||||||
@@ -299,7 +301,7 @@ cmd_tile_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
/* Fall back to any tiled pane (even hidden) to stay in the tree. */
|
/* Fall back to any tiled pane (even hidden) to stay in the tree. */
|
||||||
if (target_wp == NULL) {
|
if (target_wp == NULL) {
|
||||||
TAILQ_FOREACH(wpiter, &w->panes, entry) {
|
TAILQ_FOREACH(wpiter, &w->panes, entry) {
|
||||||
if (!(wpiter->flags & PANE_FLOATING)) {
|
if (!window_pane_is_floating(wpiter)) {
|
||||||
target_wp = wpiter;
|
target_wp = wpiter;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -344,7 +346,7 @@ cmd_tile_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
if (was_hidden)
|
if (was_hidden)
|
||||||
wp->saved_layout_cell = wp->layout_cell;
|
wp->saved_layout_cell = wp->layout_cell;
|
||||||
|
|
||||||
wp->flags &= ~PANE_FLOATING;
|
lc->flags &= ~LAYOUT_CELL_FLOATING;
|
||||||
TAILQ_REMOVE(&w->z_index, wp, zentry);
|
TAILQ_REMOVE(&w->z_index, wp, zentry);
|
||||||
TAILQ_INSERT_TAIL(&w->z_index, wp, zentry);
|
TAILQ_INSERT_TAIL(&w->z_index, wp, zentry);
|
||||||
|
|
||||||
|
|||||||
11
layout.c
11
layout.c
@@ -611,8 +611,6 @@ layout_destroy_cell(struct window *w, struct layout_cell *lc,
|
|||||||
struct layout_cell **lcroot)
|
struct layout_cell **lcroot)
|
||||||
{
|
{
|
||||||
struct layout_cell *lcother, *lcparent;
|
struct layout_cell *lcother, *lcparent;
|
||||||
int direction;
|
|
||||||
int is_hidden;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If no parent, this is either a floating pane or the last
|
* If no parent, this is either a floating pane or the last
|
||||||
@@ -641,9 +639,6 @@ layout_destroy_cell(struct window *w, struct layout_cell *lc,
|
|||||||
TAILQ_REMOVE(&lcparent->cells, lc, entry);
|
TAILQ_REMOVE(&lcparent->cells, lc, entry);
|
||||||
layout_free_cell(lc);
|
layout_free_cell(lc);
|
||||||
|
|
||||||
if (lcparent->type == LAYOUT_FLOATING)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* In tiled layouts, if the parent now has one cell, remove
|
* In tiled layouts, if the parent now has one cell, remove
|
||||||
* the parent from the tree and replace it by that cell.
|
* the parent from the tree and replace it by that cell.
|
||||||
@@ -687,10 +682,8 @@ layout_hide_cell(struct window *w, struct layout_cell *lc)
|
|||||||
int direction;
|
int direction;
|
||||||
|
|
||||||
lcparent = lc->parent;
|
lcparent = lc->parent;
|
||||||
if (lcparent == NULL ||
|
if (lcparent == NULL)
|
||||||
lcparent->type == LAYOUT_FLOATING) {
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/* Merge the space into the nearest non-hidden sibling. */
|
/* Merge the space into the nearest non-hidden sibling. */
|
||||||
{
|
{
|
||||||
@@ -730,7 +723,7 @@ layout_show_cell(struct window *w, struct layout_cell *lc)
|
|||||||
if (lc == NULL)
|
if (lc == NULL)
|
||||||
return;
|
return;
|
||||||
lcparent = lc->parent;
|
lcparent = lc->parent;
|
||||||
if (lcparent == NULL || lcparent->type == LAYOUT_FLOATING)
|
if (lcparent == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -610,7 +610,7 @@ screen_redraw_make_pane_status(struct client *c, struct window_pane *wp,
|
|||||||
else
|
else
|
||||||
border_option = "pane-border-style";
|
border_option = "pane-border-style";
|
||||||
style_apply(&gc, wp->options, border_option, ft);
|
style_apply(&gc, wp->options, border_option, ft);
|
||||||
if (wp->flags & PANE_FLOATING)
|
if (window_pane_is_floating(wp))
|
||||||
style_add(&gc, wp->options, "floating-pane-border-style", ft);
|
style_add(&gc, wp->options, "floating-pane-border-style", ft);
|
||||||
fmt = options_get_string(wp->options, "pane-border-format");
|
fmt = options_get_string(wp->options, "pane-border-format");
|
||||||
|
|
||||||
|
|||||||
6
tty.c
6
tty.c
@@ -2233,7 +2233,7 @@ tty_sixelimage_draw(struct tty *tty, const struct tty_ctx *ctx,
|
|||||||
breaks[nb++] = ry;
|
breaks[nb++] = ry;
|
||||||
|
|
||||||
TAILQ_FOREACH(fp, &w->z_index, zentry) {
|
TAILQ_FOREACH(fp, &w->z_index, zentry) {
|
||||||
if (~fp->flags & PANE_FLOATING)
|
if (!window_pane_is_floating(fp))
|
||||||
continue;
|
continue;
|
||||||
fp_tb = (int)((fp->yoff > 0) ? fp->yoff - 1 : 0);
|
fp_tb = (int)((fp->yoff > 0) ? fp->yoff - 1 : 0);
|
||||||
fp_bb1 = (int)fp->yoff + (int)fp->sy + 1;
|
fp_bb1 = (int)fp->yoff + (int)fp->sy + 1;
|
||||||
@@ -3186,12 +3186,12 @@ tty_style_changed(struct window_pane *wp)
|
|||||||
|
|
||||||
tty_window_default_style(&wp->cached_active_gc, wp);
|
tty_window_default_style(&wp->cached_active_gc, wp);
|
||||||
style_add(&wp->cached_active_gc, oo, "window-active-style", ft);
|
style_add(&wp->cached_active_gc, oo, "window-active-style", ft);
|
||||||
if (wp->flags & PANE_FLOATING)
|
if (window_pane_is_floating(wp))
|
||||||
style_add(&wp->cached_active_gc, oo, "floating-pane-style", ft);
|
style_add(&wp->cached_active_gc, oo, "floating-pane-style", ft);
|
||||||
|
|
||||||
tty_window_default_style(&wp->cached_gc, wp);
|
tty_window_default_style(&wp->cached_gc, wp);
|
||||||
style_add(&wp->cached_gc, oo, "window-style", ft);
|
style_add(&wp->cached_gc, oo, "window-style", ft);
|
||||||
if (wp->flags & PANE_FLOATING)
|
if (window_pane_is_floating(wp))
|
||||||
style_add(&wp->cached_active_gc, oo, "floating-pane-style", ft);
|
style_add(&wp->cached_active_gc, oo, "floating-pane-style", ft);
|
||||||
|
|
||||||
format_free(ft);
|
format_free(ft);
|
||||||
|
|||||||
4
window.c
4
window.c
@@ -730,7 +730,7 @@ window_zoom(struct window_pane *wp)
|
|||||||
wp1->flags &= ~PANE_HIDDEN;
|
wp1->flags &= ~PANE_HIDDEN;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (wp1->flags & PANE_FLOATING) {
|
if (window_pane_is_floating(wp1)) {
|
||||||
wp1->saved_flags |= (wp1->flags & PANE_HIDDEN);
|
wp1->saved_flags |= (wp1->flags & PANE_HIDDEN);
|
||||||
wp1->flags |= PANE_HIDDEN;
|
wp1->flags |= PANE_HIDDEN;
|
||||||
continue;
|
continue;
|
||||||
@@ -765,7 +765,7 @@ window_unzoom(struct window *w, int notify)
|
|||||||
w->saved_layout_root = NULL;
|
w->saved_layout_root = NULL;
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
||||||
if (wp->flags & PANE_FLOATING) {
|
if (window_pane_is_floating(wp)) {
|
||||||
wp->flags &= ~PANE_HIDDEN | (wp->saved_flags & PANE_HIDDEN);
|
wp->flags &= ~PANE_HIDDEN | (wp->saved_flags & PANE_HIDDEN);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user