From c387945f44f6d8a985b5f9aab4082a8f38ff50ed Mon Sep 17 00:00:00 2001 From: Kevin Lange Date: Tue, 6 Dec 2016 18:56:56 +0900 Subject: [PATCH] Don't redraw fractals in julia on focus change --- userspace/gui/basic/julia.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/userspace/gui/basic/julia.c b/userspace/gui/basic/julia.c index 6a14ecbf..6d8615fc 100644 --- a/userspace/gui/basic/julia.c +++ b/userspace/gui/basic/julia.c @@ -128,6 +128,10 @@ void usage(char * argv[]) { argv[0]); } +static void decors() { + render_decorations(window, ctx, "Julia Fractals"); +} + void redraw() { printf("initer: %f\n", initer); printf("X: %f %f\n", Minx, Maxx); @@ -138,7 +142,7 @@ void redraw() { printf("Y: %f %f\n", Miny, Maxy); printf("conx: %f cony: %f\n", conx, cony); - render_decorations(window, ctx, "Julia Fractals"); + decors(); newcolor = 0; lastcolor = 0; @@ -264,7 +268,7 @@ int main(int argc, char * argv[]) { yutani_window_t * win = hashmap_get(yctx->windows, (void*)wf->wid); if (win) { win->focused = wf->focused; - redraw(); + decors(); yutani_flip(yctx, window); } }