aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h1
-rw-r--r--config.h1
-rw-r--r--monsterwm.c4
3 files changed, 5 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h
index b90a9ef..1dd58aa 100644
--- a/config.def.h
+++ b/config.def.h
@@ -41,6 +41,7 @@
#define UNFOCUS "#444444" /* unfocused window border color */
#define DESKTOPS 4 /* number of desktops - edit DESKTOPCHANGE keys to suit */
#define DEFAULT_DESKTOP 0 /* the desktop to focus on exec */
+#define MINWSZ 50 /* minimum window size in pixels */
/** open applications to specified desktop **/
static const AppRule rules[] = { \
diff --git a/config.h b/config.h
index 434f124..626a657 100644
--- a/config.h
+++ b/config.h
@@ -41,6 +41,7 @@
#define UNFOCUS "#444444" /* unfocused window border color */
#define DESKTOPS 4 /* number of desktops - edit DESKTOPCHANGE keys to suit */
#define DEFAULT_DESKTOP 0 /* the desktop to focus on exec */
+#define MINWSZ 50 /* minimum window size in pixels */
/** open applications to specified desktop **/
static const AppRule rules[] = { \
diff --git a/monsterwm.c b/monsterwm.c
index f1773fb..4a1bb45 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -454,7 +454,9 @@ void removeclient(client *c) {
}
void resize_master(const Arg *arg) {
- master_size += arg->i;
+ int msz = master_size + arg->i;
+ if((mode == BSTACK ? sh : sw) - msz <= MINWSZ || msz <= MINWSZ) return;
+ master_size = msz;
tile();
}