diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-11-28 12:18:41 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-11-28 12:18:41 +0000 |
commit | 5f5f029e3b3a782dc616778739b2801b00b17c0e (patch) | |
tree | fad35dccc37c54e45d0ecc497d3b915dd7b835aa /cmd-resize-window.c | |
parent | c13838436e6883d191374f1628e675bfbb8c8aeb (diff) | |
parent | fa409194d3dfe0095bf6572a253772f2825f5dec (diff) | |
download | rtmux-5f5f029e3b3a782dc616778739b2801b00b17c0e.tar.gz rtmux-5f5f029e3b3a782dc616778739b2801b00b17c0e.tar.bz2 rtmux-5f5f029e3b3a782dc616778739b2801b00b17c0e.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-resize-window.c')
-rw-r--r-- | cmd-resize-window.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cmd-resize-window.c b/cmd-resize-window.c index c5a7c5a1..9cc74e82 100644 --- a/cmd-resize-window.c +++ b/cmd-resize-window.c @@ -53,6 +53,7 @@ cmd_resize_window_exec(struct cmd *self, struct cmdq_item *item) const char *errstr; char *cause; u_int adjust, sx, sy; + int xpixel = -1, ypixel = -1; if (args->argc == 0) adjust = 1; @@ -97,13 +98,16 @@ cmd_resize_window_exec(struct cmd *self, struct cmdq_item *item) } else if (args_has(args, 'D')) sy += adjust; - if (args_has(args, 'A')) - default_window_size(NULL, s, w, &sx, &sy, WINDOW_SIZE_LARGEST); - else if (args_has(args, 'a')) - default_window_size(NULL, s, w, &sx, &sy, WINDOW_SIZE_SMALLEST); + if (args_has(args, 'A')) { + default_window_size(NULL, s, w, &sx, &sy, &xpixel, &ypixel, + WINDOW_SIZE_LARGEST); + } else if (args_has(args, 'a')) { + default_window_size(NULL, s, w, &sx, &sy, &xpixel, &ypixel, + WINDOW_SIZE_SMALLEST); + } options_set_number(w->options, "window-size", WINDOW_SIZE_MANUAL); - resize_window(w, sx, sy); + resize_window(w, sx, sy, xpixel, ypixel); return (CMD_RETURN_NORMAL); } |