diff options
author | 2019-11-28 09:45:15 +0000 | |
---|---|---|
committer | 2019-11-28 09:45:15 +0000 | |
commit | 4a8b0ea508ec8e7097113da4d3016e95759381f3 (patch) | |
tree | ee0ca6188d35c152446efbf4943c93b16eb957e8 /usr.bin/tmux/server-client.c | |
parent | Store xpixel/ypixel from TIOCGWINSZ and add formats. (diff) | |
download | wireguard-openbsd-4a8b0ea508ec8e7097113da4d3016e95759381f3.tar.xz wireguard-openbsd-4a8b0ea508ec8e7097113da4d3016e95759381f3.zip |
Make a best effort to set xpixel and ypixel for each pane and add
formats for them.
Diffstat (limited to 'usr.bin/tmux/server-client.c')
-rw-r--r-- | usr.bin/tmux/server-client.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index f93d17a66dd..71bc1e33343 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.296 2019/11/01 20:26:21 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.297 2019/11/28 09:45:16 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1321,7 +1321,6 @@ static int server_client_resize_force(struct window_pane *wp) { struct timeval tv = { .tv_usec = 100000 }; - struct winsize ws; /* * If we are resizing to the same size as when we entered the loop @@ -1342,12 +1341,8 @@ server_client_resize_force(struct window_pane *wp) wp->sy <= 1) return (0); - memset(&ws, 0, sizeof ws); - ws.ws_col = wp->sx; - ws.ws_row = wp->sy - 1; - if (wp->fd != -1 && ioctl(wp->fd, TIOCSWINSZ, &ws) == -1) - fatal("ioctl failed"); log_debug("%s: %%%u forcing resize", __func__, wp->id); + window_pane_send_resize(wp, -1); evtimer_add(&wp->resize_timer, &tv); wp->flags |= PANE_RESIZEFORCE; @@ -1358,14 +1353,8 @@ server_client_resize_force(struct window_pane *wp) static void server_client_resize_pane(struct window_pane *wp) { - struct winsize ws; - - memset(&ws, 0, sizeof ws); - ws.ws_col = wp->sx; - ws.ws_row = wp->sy; - if (wp->fd != -1 && ioctl(wp->fd, TIOCSWINSZ, &ws) == -1) - fatal("ioctl failed"); log_debug("%s: %%%u resize to %u,%u", __func__, wp->id, wp->sx, wp->sy); + window_pane_send_resize(wp, 0); wp->flags &= ~PANE_RESIZE; |