set width of layouts correctly on dynamic width

fix #110
This commit is contained in:
Sascha Kruse 2013-06-29 00:32:54 +02:00
parent 2c21ea0dfe
commit a098b9476f

2
x.c
View File

@ -221,7 +221,7 @@ static dimension_t calculate_dimensions(GSList *layouts)
if (total_width > scr.dim.w) { if (total_width > scr.dim.w) {
/* set width to screen width */ /* set width to screen width */
dim.w = scr.dim.w - xctx.geometry.x * 2; dim.w = scr.dim.w - xctx.geometry.x * 2;
} else if (total_width < xctx.geometry.w && settings.shrink) { } else if (have_dynamic_width() || (total_width < xctx.geometry.w && settings.shrink)) {
/* set width to text width */ /* set width to text width */
dim.w = total_width + 2 * settings.frame_width; dim.w = total_width + 2 * settings.frame_width;
} }