From e478fcf515519303674e580efc5bef9cb4099c27 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 12 Oct 2019 18:48:53 +0300 Subject: [PATCH] make sowm crash when a window is resized to 0px big. --- sowm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sowm.c b/sowm.c index 0104a31..bdca3b4 100644 --- a/sowm.c +++ b/sowm.c @@ -10,7 +10,6 @@ #include #include -#define MAX(a, b) ((a) > (b) ? (a) : (b)) #define TABLENGTH(X) (sizeof(X)/sizeof(*X)) typedef union { @@ -276,8 +275,8 @@ void notify_motion(XEvent *e) { XMoveResizeWindow(dis, start.subwindow, attr.x + (start.button==1 ? xdiff : 0), attr.y + (start.button==1 ? ydiff : 0), - MAX(1, attr.width + (start.button==3 ? xdiff : 0)), - MAX(1, attr.height + (start.button==3 ? ydiff : 0))); + attr.width + (start.button==3 ? xdiff : 0), + attr.height + (start.button==3 ? ydiff : 0)); } }