aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-15 00:59:41 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-15 00:59:41 -0400
commit98231f90d60fd75e23ea48e602823d7a341b2a1c (patch)
tree80f76d0761ae1b69f09a24e928e0d1be231317d4
parenta0d4fe6aad61bf018603b55173f5d3526bba60eb (diff)
downloadrunes-98231f90d60fd75e23ea48e602823d7a341b2a1c.tar.gz
runes-98231f90d60fd75e23ea48e602823d7a341b2a1c.zip
fix buffer size when returning from alternate screen
if the window was resized while we were in the alternate screen, it would have resized the alternate screen buffer, but not the normal buffer, which breaks things when we swap the normal buffer back in.
-rw-r--r--display.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/display.c b/display.c
index 747a825..63b7242 100644
--- a/display.c
+++ b/display.c
@@ -385,6 +385,8 @@ void runes_display_use_alternate_buffer(RunesTerm *t)
void runes_display_use_normal_buffer(RunesTerm *t)
{
+ int x, y;
+
if (!t->alternate) {
return;
}
@@ -394,6 +396,10 @@ void runes_display_use_normal_buffer(RunesTerm *t)
cairo_destroy(t->cr);
t->cr = t->alternate_cr;
t->alternate_cr = NULL;
+ t->xpixel = -1;
+ t->ypixel = -1;
+ runes_window_backend_get_size(t, &x, &y);
+ runes_display_set_window_size(t, x, y);
}
void runes_display_set_scroll_region(