From 70fef83e50336c5e0105d90cb14e83f6631214d0 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 11 Oct 2014 13:12:57 +0200 Subject: [PATCH] drawin: Don't special-case moves The code in drawin_moveresize() tries to be clever and only updates the drawing state of the drawable when it is resized, not when it is moved around. This used to be necessary because once upon a time, drawin_update_drawing() threw away all of the drawing state and thus forcing a repaint. These days it just calls drawable_set_geometry() as well and that function special-cases moves. So this old code in drawin_moveresize() is no longer necessary and actually caused problems. These problems occurred because drawin_update_drawing() is being clever and doesn't do anything for .visible = false drawins, because their drawing state will be updated once they become visible. However, not skipping drawable_set_geometry() means that this broke, because drawin_map() thought that the drawing state was up to date while in reality it wasn't. References: http://article.gmane.org/gmane.comp.window-managers.awesome/10852 Signed-off-by: Uli Schlachter --- objects/drawin.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/objects/drawin.c b/objects/drawin.c index 765d5dff9..5f1b85182 100644 --- a/objects/drawin.c +++ b/objects/drawin.c @@ -129,14 +129,7 @@ drawin_moveresize(lua_State *L, int udx, area_t geometry) mask_vals |= XCB_CONFIG_WINDOW_HEIGHT; } - if(mask_vals & (XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT)) - 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); - } + drawin_update_drawing(w, udx); /* Activate BMA */ client_ignore_enterleave_events();