[hackers] [wmii] Don't resize to zero width either (duh).

From: Kris Maglione <jg_AT_suckless.org>
Date: Wed Feb 21 23:31:20 2007

changeset: 1927:f113f8584682
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Feb 21 17:30:54 2007 -0500
summary: Don't resize to zero width either (duh).

diff -r 17c771ae1725 -r f113f8584682 frame.c
--- a/frame.c Wed Feb 21 17:21:45 2007 -0500
+++ b/frame.c Wed Feb 21 17:30:54 2007 -0500
@@ -79,14 +79,20 @@ resize_frame(Frame *f, XRectangle *r) {
         f->crect = *r;
         match_sizehints(c, &f->crect, f->area->floating, stickycorner);
         
- if(f->rect.height < frame_delta_h()) {
+ if(f->area->floating)
+ f->rect = f->crect;
+
+ if(f->rect.height < frame_delta_h() + labelh(&def.font)) {
                 f->rect.height = frame_delta_h();
                 f->collapsed = True;
         }else
                 f->collapsed = False;
-
- if(f->area->floating)
- f->rect = f->crect;
+
+ if(f->rect.width < 2 * def.border) {
+ f->rect.width = frame_delta_h();
+ f->collapsed = True;
+ }
+
         if(!f->collapsed) {
                 f->crect.width -= def.border * 2;
                 f->crect.height -= frame_delta_h();
Received on Wed Feb 21 2007 - 23:31:20 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:40 UTC