aboutsummaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-10 22:02:11 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-10 22:02:11 -0400
commit76581ac4a67ed1d440a9e9a34d65b04fa494888e (patch)
tree02a09516816e5c01312a0b023474f22ea0ae40e9 /term.c
parent91e64a89e379b8dbdc0252e4bd11627c0a5285a0 (diff)
downloadrunes-76581ac4a67ed1d440a9e9a34d65b04fa494888e.tar.gz
runes-76581ac4a67ed1d440a9e9a34d65b04fa494888e.zip
redraw the window when it's hidden and reshown
Diffstat (limited to 'term.c')
-rw-r--r--term.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/term.c b/term.c
index 2199332..06f4571 100644
--- a/term.c
+++ b/term.c
@@ -4,6 +4,8 @@
void runes_term_init(RunesTerm *t, int argc, char *argv[])
{
+ int x, y;
+
/* doing most of the pty initialization right at the beginning, because
* libuv will set up a bunch of state (including potentially things like
* spawning threads) when that is initialized, and i'm not really sure how
@@ -15,7 +17,9 @@ void runes_term_init(RunesTerm *t, int argc, char *argv[])
runes_pty_backend_loop_init(t);
runes_window_backend_init(t, argc, argv);
- t->cr = cairo_create(runes_window_backend_surface_create(t));
+ t->backend_cr = cairo_create(runes_window_backend_surface_create(t));
+ runes_window_backend_get_size(t, &x, &y);
+ t->cr = cairo_create(cairo_surface_create_similar_image(cairo_get_target(t->backend_cr), CAIRO_FORMAT_RGB24, x, y));
}
void runes_term_cleanup(RunesTerm *t)