[hackers] wmii: new tip (= 1721)

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Sat, 03 Feb 2007 19:40:04 +0100

changeset: 1721:251c7539ffb9
tag: tip
parent: 1719:0410fc597b7f
parent: 1720:45a4a644d832
user: Denis Grelich <denisg_AT_suckless.org>
date: Sat Feb 03 19:30:08 2007 +0100
description:
merge

diff -r 45a4a644d832 -r 251c7539ffb9 client.c
--- a/client.c Sat Feb 03 18:42:40 2007 +0100
+++ b/client.c Sat Feb 03 19:30:08 2007 +0100
@@ -465,7 +465,7 @@ resize_client(Client *c, XRectangle *r,
 resize_client(Client *c, XRectangle *r, Bool ignore_xcall) {
         Frame *f = c->sel;
         Bool floating = f->area->floating;
- unsigned int max_height;
+ int max_height;
 
         BlitzAlign stickycorner = 0;
         if(f->rect.x != r->x && f->rect.x + f->rect.width == r->x + r->width)
@@ -491,14 +491,14 @@ resize_client(Client *c, XRectangle *r,
                                         f->rect.height = max_height;
                                 if(f->rect.width > screen->rect.width)
                                         f->rect.width = screen->rect.width;
- if(f->rect.x + f->rect.width > screen->rect.width)
- f->rect.x = screen->rect.width - f->rect.width;
- if(f->rect.y + f->rect.height > max_height)
- f->rect.y = max_height - f->rect.height;
- if(f->rect.x < 0)
- f->rect.x = 0;
- if(f->rect.y < 0)
- f->rect.y = 0;
+ if(f->rect.x + screen->brect.height > screen->rect.width)
+ f->rect.x = screen->rect.width - screen->brect.height;
+ if(f->rect.y + screen->brect.height > max_height)
+ f->rect.y = max_height - screen->brect.height;
+ if(f->rect.x + f->rect.width < screen->brect.height)
+ f->rect.x = screen->brect.height - f->rect.width;
+ if(f->rect.y + f->rect.height < screen->brect.height)
+ f->rect.y = screen->brect.height - f->rect.height;
                         }
                 }
                 if(f->area->view == screen->sel)
diff -r 45a4a644d832 -r 251c7539ffb9 view.c
--- a/view.c Sat Feb 03 18:42:40 2007 +0100
+++ b/view.c Sat Feb 03 19:30:08 2007 +0100
@@ -170,12 +170,20 @@ restack_view(View *v) {
         Area *a;
         Frame *f;
         Client *c;
- unsigned int n=0, i=0;
+ unsigned int n, i;
         static Window *wins = NULL;
+ static unsigned int winssz = 0;
+
+ i = 0;
+ n = 1;
 
         for(c=client; c; c=c->next, i++);
- wins = ixp_erealloc(wins, sizeof(Window) * i);
-
+ if(i >= winssz) {
+ winssz = 2 * i;
+ wins = ixp_erealloc(wins, sizeof(Window) * winssz);
+ }
+
+ wins[0] = screen->barwin;
         for(a=v->area; a; a=a->next) {
                 if(a->frame) {
                         if(a == v->area) {
Received on Sat Feb 03 2007 - 19:40:04 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:54:51 UTC