diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-04 19:22:26 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-04 19:22:26 +0000 |
commit | f2b18ac417285ca03693f93456d469dbfdc532b9 (patch) | |
tree | ac071997d48d410cf5c88dd03c0bb941921df7b3 /screen.c | |
parent | 1f9a8e70d90265de8a3e1b0a981d3ef5b1352e52 (diff) | |
download | rtmux-f2b18ac417285ca03693f93456d469dbfdc532b9.tar.gz rtmux-f2b18ac417285ca03693f93456d469dbfdc532b9.tar.bz2 rtmux-f2b18ac417285ca03693f93456d469dbfdc532b9.zip |
Don't resize if sx AND sy haven't changed. Also tweak some logging, and reset attrs after clear.
Diffstat (limited to 'screen.c')
-rw-r--r-- | screen.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: screen.c,v 1.20 2007-10-04 19:03:51 nicm Exp $ */ +/* $Id: screen.c,v 1.21 2007-10-04 19:22:26 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -74,7 +74,7 @@ screen_resize(struct screen *s, u_int sx, u_int sy) { u_int i, ox, oy, ny; - if (sx == s->sx || sy == s->sy) + if (sx == s->sx && sy == s->sy) return; if (sx < 1) @@ -84,14 +84,15 @@ screen_resize(struct screen *s, u_int sx, u_int sy) ox = s->sx; oy = s->sy; + + log_debug("resizing screen (%u, %u) -> (%u, %u)", ox, oy, sx, sy); + s->sx = sx; s->sy = sy; s->ry_upper = 0; s->ry_lower = screen_last_y(s); - log_debug("resizing screen (%u, %u) -> (%u, %u)", ox, oy, sx, sy); - if (sy < oy) { ny = oy - sy; if (ny > s->cy) |