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 <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2014-10-11 13:12:57 +02:00
parent 983d094c76
commit 70fef83e50
1 changed files with 1 additions and 8 deletions

View File

@ -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();