From f236a5f0c70015c0c2b3a57a8aec9dcc5dc49bdc Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 11 Oct 2014 13:27:29 +0200 Subject: [PATCH] drawin_update_drawing: Remove optimization for invisible drawins This fixes the following code: local d = drawin({}) d.visible = true The drawin now has a cairo surface assigned d.visible = false d.width = 1234 d.visible = true The width change while the drawin was not visible would not get propagated to the drawable because of the code that this patch removes. The expectation was that drawin_map() would update the drawable later. However, because the drawin was already visible, its drawable also already has a surface assigned. Thus, drawin_map() wouldn't update the drawable either. Fix this by just removing this optimizations. Signed-off-by: Uli Schlachter --- objects/drawin.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/objects/drawin.c b/objects/drawin.c index c08e0e5f8..6cfabc897 100644 --- a/objects/drawin.c +++ b/objects/drawin.c @@ -82,11 +82,6 @@ drawin_unref_simplified(drawin_t **item) static void drawin_update_drawing(drawin_t *w, int widx) { - /* If this drawin isn't visible, we don't need an up-to-date cairo surface - * for it. (drawin_map() will later make sure we are called again) */ - if(!w->visible) - return; - luaA_object_push_item(globalconf.L, widx, w->drawable); drawable_set_geometry(w->drawable, -1, w->geometry); lua_pop(globalconf.L, 1);