-/* $OpenBSD: cmd-display-panes.c,v 1.45 2022/06/30 09:55:53 nicm Exp $ */
+/* $OpenBSD: cmd-display-panes.c,v 1.46 2024/03/21 11:30:42 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
wp = window_pane_at_index(w, index);
if (wp == NULL)
return (1);
- window_unzoom(w);
+ window_unzoom(w, 1);
xasprintf(&expanded, "%%%u", wp->id);
-/* $OpenBSD: cmd-resize-pane.c,v 1.52 2022/02/03 11:06:11 nicm Exp $ */
+/* $OpenBSD: cmd-resize-pane.c,v 1.53 2024/03/21 11:30:42 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
if (args_has(args, 'Z')) {
if (w->flags & WINDOW_ZOOMED)
- window_unzoom(w);
+ window_unzoom(w, 1);
else
window_zoom(wp);
server_redraw_window(w);
-/* $OpenBSD: popup.c,v 1.52 2023/08/15 07:01:47 nicm Exp $ */
+/* $OpenBSD: popup.c,v 1.53 2024/03/21 11:30:42 nicm Exp $ */
/*
* Copyright (c) 2020 Nicholas Marriott <nicholas.marriott@gmail.com>
u_int hlimit;
const char *shell;
- window_unzoom(w);
+ window_unzoom(w, 1);
lc = layout_split_pane(wp, type, -1, 0);
hlimit = options_get_number(s->options, "history-limit");
-/* $OpenBSD: resize.c,v 1.50 2022/02/17 09:58:47 nicm Exp $ */
+/* $OpenBSD: resize.c,v 1.51 2024/03/21 11:30:42 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
/* If the window is zoomed, unzoom. */
zoomed = w->flags & WINDOW_ZOOMED;
if (zoomed)
- window_unzoom(w);
+ window_unzoom(w, 1);
/* Resize the layout first. */
layout_resize(w, sx, sy);
-/* $OpenBSD: server-fn.c,v 1.135 2024/02/13 08:10:23 nicm Exp $ */
+/* $OpenBSD: server-fn.c,v 1.136 2024/03/21 11:30:42 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
void
server_unzoom_window(struct window *w)
{
- if (window_unzoom(w) == 0)
+ if (window_unzoom(w, 1) == 0)
server_redraw_window(w);
}
-/* $OpenBSD: tmux.h,v 1.1212 2024/02/13 08:03:50 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.1213 2024/03/21 11:30:42 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
void window_resize(struct window *, u_int, u_int, int, int);
void window_pane_send_resize(struct window_pane *, u_int, u_int);
int window_zoom(struct window_pane *);
-int window_unzoom(struct window *);
+int window_unzoom(struct window *, int);
int window_push_zoom(struct window *, int, int);
int window_pop_zoom(struct window *);
void window_lost_pane(struct window *, struct window_pane *);
-/* $OpenBSD: window.c,v 1.288 2024/02/13 08:03:50 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.289 2024/03/21 11:30:42 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
{
log_debug("window @%u destroyed (%d references)", w->id, w->references);
- window_unzoom(w);
+ window_unzoom(w, 0);
RB_REMOVE(windows, &windows, w);
if (w->layout_root != NULL)
}
int
-window_unzoom(struct window *w)
+window_unzoom(struct window *w, int notify)
{
struct window_pane *wp;
wp->saved_layout_cell = NULL;
}
layout_fix_panes(w, NULL);
- notify_window("window-layout-changed", w);
+
+ if (notify)
+ notify_window("window-layout-changed", w);
return (0);
}
w->flags |= WINDOW_WASZOOMED;
else
w->flags &= ~WINDOW_WASZOOMED;
- return (window_unzoom(w) == 0);
+ return (window_unzoom(w, 1) == 0);
}
int