summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2014-01-02 20:58:21 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2014-01-02 20:58:21 +0000
commit0b1afcfbe1ab45dbaa4895ef3f9f107fcf3fe183 (patch)
treea427a24eb81aa5ecf7905005fb3aa42bab0562b5 /app
parentae48866d1a1c7c62f4e00ff45f3d91a927b6130b (diff)
When a client doesn't specify size hints, nothing prevents a resize to
0x0 - don't allow this situation during mouse resize (check already in place for kbd resize). Reported by brynet@
Diffstat (limited to 'app')
-rw-r--r--app/cwm/client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/cwm/client.c b/app/cwm/client.c
index df25f72e7..f4b4cb356 100644
--- a/app/cwm/client.c
+++ b/app/cwm/client.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: client.c,v 1.165 2013/12/17 16:10:43 okan Exp $
+ * $OpenBSD: client.c,v 1.166 2014/01/02 20:58:20 okan Exp $
*/
#include <sys/param.h>
@@ -832,6 +832,9 @@ client_applysizehints(struct client_ctx *cc)
cc->geom.w = MIN(cc->geom.w, cc->hint.maxw);
if (cc->hint.maxh)
cc->geom.h = MIN(cc->geom.h, cc->hint.maxh);
+
+ cc->geom.w = MAX(cc->geom.w, 1);
+ cc->geom.h = MAX(cc->geom.h, 1);
}
static void