mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
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.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user