summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-06-05 16:47:11 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-06-05 16:47:11 +0000
commit510ec3fb9e14d5d611d13650f935c945025b12c9 (patch)
treed84a1585c26541c842f9edded60e5b353fbb0a80 /server-client.c
parentceed5cc9a936840a4e40718e0e30f44e71534c5a (diff)
Fix problems with window sizing seen by Raghavendra D Prabhu when
starting tmux from .xinitrc. One of the very few things the server relies on the client for now is to pass through a message on SIGWINCH, but there is a condition where potentially a SIGWINCH may be lost during the transition from unattached (main.c) to attached (client.c). So trigger a size change immediately after the client installs its SIGWINCH handler. Also, when the terminal is resized, reset the scroll region and cursor position. Previously, we were clearing our saved idea of these, but in fact some terminals do not reset them on resize, so this caused problems during redraw. While here make a resize to the same size not cause a redraw and rename the tmux.out output log file to include the tmux PID.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/server-client.c b/server-client.c
index 9d550386..301c986a 100644
--- a/server-client.c
+++ b/server-client.c
@@ -561,9 +561,10 @@ server_client_msg_dispatch(struct client *c)
if (datalen != 0)
fatalx("bad MSG_RESIZE size");
- tty_resize(&c->tty);
- recalculate_sizes();
- server_redraw_client(c);
+ if (tty_resize(&c->tty)) {
+ recalculate_sizes();
+ server_redraw_client(c);
+ }
break;
case MSG_EXITING:
if (datalen != 0)