[hackers] [st][PATCH Resend] Add min rows/cols config option

From: Jules Maselbas <jules.maselbas_AT_grenoble-inp.org>
Date: Sat, 14 Jul 2018 13:12:26 +0200

---
 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
_AT_@ -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
_AT_@ -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
Received on Sat Jul 14 2018 - 13:12:26 CEST

This archive was generated by hypermail 2.3.0 : Sat Jul 14 2018 - 13:24:21 CEST