drawin: Update the drawable's geometry on move

We only need to update a drawin's drawing related resources when its size
changes. Thus, when a drawin is just moved, drawin_update_drawing() is not
called. However, this function was used for telling the drawin's drawable about
its geometry. This means that the drawable had an outdated idea about what its
geometry was.

Fix this by making sure to always call drawable_set_geometry().

Thanks to Javafant for reporting this bug on IRC.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2012-10-26 21:11:27 +02:00
parent 57746d7a62
commit c6658742ff
1 changed files with 6 additions and 0 deletions

View File

@ -197,6 +197,12 @@ drawin_moveresize(lua_State *L, int udx, area_t geometry)
if(mask_vals & (XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT)) if(mask_vals & (XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT))
drawin_update_drawing(w, udx); drawin_update_drawing(w, udx);
else {
/* We still have to set x/y */
luaA_object_push_item(L, udx, w->drawable);
drawable_set_geometry(w->drawable, -1, w->geometry);
lua_pop(L, 1);
}
/* Activate BMA */ /* Activate BMA */
client_ignore_enterleave_events(); client_ignore_enterleave_events();