diff options
author | Tiago Cunha <tcunha@gmx.com> | 2010-06-06 00:30:34 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2010-06-06 00:30:34 +0000 |
commit | 650320718508881ab2f518ae289e1dfd8fcc0c8b (patch) | |
tree | d806554a296e7eff113968f86206abd35f83bf9b /server-client.c | |
parent | 3bba40160931bdad2ad8cd5168a42239477cbe99 (diff) | |
download | rtmux-650320718508881ab2f518ae289e1dfd8fcc0c8b.tar.gz rtmux-650320718508881ab2f518ae289e1dfd8fcc0c8b.tar.bz2 rtmux-650320718508881ab2f518ae289e1dfd8fcc0c8b.zip |
Sync OpenBSD patchset 716:
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.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server-client.c b/server-client.c index df72a818..f738e86e 100644 --- a/server-client.c +++ b/server-client.c @@ -1,4 +1,4 @@ -/* $Id: server-client.c,v 1.32 2010-05-22 21:56:04 micahcowan Exp $ */ +/* $Id: server-client.c,v 1.33 2010-06-06 00:30:34 tcunha Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -560,9 +560,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) |