wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 54e19dc2839c1a5f5bccf56203a1dd0fd333d17b
parent 1783f7313217b2607bd4863268ae5ee8f3c4ed38
Author: Sander van Dijk <sander@wmii.de>
Date:   Fri, 26 May 2006 19:15:04 +0000

simplification in match_sizehints, remove some obsolete code


Diffstat:
cmd/wm/area.c | 4----
cmd/wm/client.c | 11+++++------
2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/cmd/wm/area.c b/cmd/wm/area.c @@ -245,10 +245,6 @@ attach_to_area(Area *a, Client *c) if(a->frame.size) scale_column(a, a->rect.height - h); } - else if(c->fixedsize) { - c->rect.width = c->size.min_width; - c->rect.height = c->size.min_height; - } f = create_frame(a, c); diff --git a/cmd/wm/client.c b/cmd/wm/client.c @@ -475,20 +475,20 @@ sel_client() } static void -match_sizehints(Client *c, int aidx) +match_sizehints(Client *c) { XSizeHints *s = &c->size; Frame *f = c->frame.data[c->sel]; unsigned int dx = 2 * def.border; unsigned int dy = def.border + height_of_bar(); - if(aidx && (s->flags & PMinSize)) { + if(c->floating && (s->flags & PMinSize)) { if(f->rect.width < s->min_width + dx) f->rect.width = s->min_width + dx; if(f->rect.height < s->min_height + dy) f->rect.height = s->min_height + dy; } - if(aidx && (s->flags & PMaxSize)) { + if(c->floating && (s->flags & PMaxSize)) { if(f->rect.width > s->max_width + dx) f->rect.width = s->max_width + dx; if(f->rect.height > s->max_height + dy) @@ -522,14 +522,13 @@ resize_client(Client *c, XRectangle *r, Bool ignore_xcall) { Frame *f = c->frame.data[c->sel]; int fidx = idx_of_frame(f); - int aidx = idx_of_area(f->area); f->rect = *r; if((f->area->mode != Colstack) || (f->area->sel == fidx)) - match_sizehints(c, aidx); + match_sizehints(c); if(!ignore_xcall) { - if(!aidx && + if(c->floating && (c->rect.width >= rect.width) && (c->rect.height >= rect.height)) {