Change how panes are resized so that the code is clearer and if the pane

is resized multiple times during one event loop, it is forced to resize
at the end. Also don't zoom/unzoom in switch-client if the pane hasn't
changed. GitHub issue 2260.
This commit is contained in:
nicm
2020-06-05 11:20:51 +00:00
parent 03b2998abe
commit d919fa1ed0
4 changed files with 79 additions and 77 deletions

View File

@@ -116,7 +116,7 @@ cmd_switch_client_exec(struct cmd *self, struct cmdq_item *item)
} else {
if (cmdq_get_client(item) == NULL)
return (CMD_RETURN_NORMAL);
if (wl != NULL && wp != NULL) {
if (wl != NULL && wp != NULL && wp != wl->window->active) {
w = wl->window;
if (window_push_zoom(w, args_has(args, 'Z')))
server_redraw_window(w);