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 <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-10-11 13:27:29 +02:00
parent 6673ecb167
commit f236a5f0c7
1 changed files with 0 additions and 5 deletions

View File

@ -82,11 +82,6 @@ drawin_unref_simplified(drawin_t **item)
static void static void
drawin_update_drawing(drawin_t *w, int widx) 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); luaA_object_push_item(globalconf.L, widx, w->drawable);
drawable_set_geometry(w->drawable, -1, w->geometry); drawable_set_geometry(w->drawable, -1, w->geometry);
lua_pop(globalconf.L, 1); lua_pop(globalconf.L, 1);