---
 config.def.h | 6 ++++++
 x.c          | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/config.def.h b/config.def.h
index 82b1b09..f3424c4 100644
--- a/config.def.h
+++ b/config.def.h
@@ -137,6 +137,12 @@ static unsigned int cursorshape = 2;
 static unsigned int cols = 80;
 static unsigned int rows = 24;
 
+/*
+ * Minimum columns and rows numbers
+ */
+static unsigned int mincols = 1;
+static unsigned int minrows = 1;
+
 /*
  * Default colour and shape of the mouse cursor
  */
diff --git a/x.c b/x.c
index 00cb6b1..9a7e35d 100644
--- a/x.c
+++ b/x.c
@@ -797,8 +797,8 @@ xhints(void)
        sizeh->width_inc = win.cw;
        sizeh->base_height = 2 * borderpx;
        sizeh->base_width = 2 * borderpx;
-       sizeh->min_height = win.ch + 2 * borderpx;
-       sizeh->min_width = win.cw + 2 * borderpx;
+       sizeh->min_height = minrows * win.ch + 2 * borderpx;
+       sizeh->min_width = mincols * win.cw + 2 * borderpx;
        if (xw.isfixed) {
                sizeh->flags |= PMaxSize;
                sizeh->min_width = sizeh->max_width = win.w;
-- 
2.18.0


Reply via email to