[hackers] [wmii] Don't resize floating clients to 0 height.

From: Kris Maglione <jg_AT_suckless.org>
Date: Wed Feb 21 23:26:19 2007

changeset: 1926:17c771ae1725
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Feb 21 17:21:45 2007 -0500
summary: Don't resize floating clients to 0 height.

diff -r aef7e616b0eb -r 17c771ae1725 event.c
--- a/event.c Wed Feb 21 16:34:12 2007 -0500
+++ b/event.c Wed Feb 21 17:21:45 2007 -0500
@@ -339,7 +339,7 @@ motionnotify(XEvent *e) {
         
         if((f = frame_of_win(ev->window))) {
                 if(!ispointinrect(ev->x, ev->y, &f->titlebar)
- &&!ispointinrect(ev->x, ev->y, &f->crect)) {
+ &&!ev->subwindow) {
                         cur = cursor_of_quad(quadofcoord(&f->rect, ev->x_root, ev->y_root));
                         set_cursor(f->client, cur);
                 }else
diff -r aef7e616b0eb -r 17c771ae1725 frame.c
--- a/frame.c Wed Feb 21 16:34:12 2007 -0500
+++ b/frame.c Wed Feb 21 17:21:45 2007 -0500
@@ -78,6 +78,12 @@ resize_frame(Frame *f, XRectangle *r) {
         f->rect = *r;
         f->crect = *r;
         match_sizehints(c, &f->crect, f->area->floating, stickycorner);
+
+ if(f->rect.height < frame_delta_h()) {
+ f->rect.height = frame_delta_h();
+ f->collapsed = True;
+ }else
+ f->collapsed = False;
 
         if(f->area->floating)
                 f->rect = f->crect;
Received on Wed Feb 21 2007 - 23:26:19 UTC

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