libgui: Add support to update buffer geometry.