[hackers] wmii: new tip (= 1720)

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

changeset: 1720:45a4a644d832
tag: tip
parent: 1717:222b93173000
user: Denis Grelich <denisg_AT_suckless.org>
date: Sat Feb 03 18:42:40 2007 +0100
files: config.mk
description:
no -O2 for debug anymore

diff -r 0410fc597b7f -r 45a4a644d832 client.c
--- a/client.c Sat Feb 03 00:47:15 2007 +0100
+++ b/client.c Sat Feb 03 18:42:40 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;
- int max_height;
+ unsigned 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 + 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->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->area->view == screen->sel)
diff -r 0410fc597b7f -r 45a4a644d832 config.mk
--- a/config.mk Sat Feb 03 00:47:15 2007 +0100
+++ b/config.mk Sat Feb 03 18:42:40 2007 +0100
@@ -19,7 +19,7 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
 # flags
 #CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
 #LDFLAGS = ${LIBS}
-CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
+CFLAGS = -g -Wall ${INCS} -DVERSION=\"${VERSION}\"
 LDFLAGS = -g ${LIBS}
 
 # Solaris
diff -r 0410fc597b7f -r 45a4a644d832 view.c
--- a/view.c Sat Feb 03 00:47:15 2007 +0100
+++ b/view.c Sat Feb 03 18:42:40 2007 +0100
@@ -170,20 +170,12 @@ restack_view(View *v) {
         Area *a;
         Frame *f;
         Client *c;
- unsigned int n, i;
+ unsigned int n=0, i=0;
         static Window *wins = NULL;
- static unsigned int winssz = 0;
-
- i = 0;
- n = 1;
 
         for(c=client; c; c=c->next, i++);
- if(i >= winssz) {
- winssz = 2 * i;
- wins = ixp_erealloc(wins, sizeof(Window) * winssz);
- }
-
- wins[0] = screen->barwin;
+ wins = ixp_erealloc(wins, sizeof(Window) * i);
+
         for(a=v->area; a; a=a->next) {
                 if(a->frame) {
                         if(a == v->area) {
Received on Sat Feb 03 2007 - 18:50:04 UTC

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