[hackers] wmii: new tip (= 1719)

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

changeset: 1719:0410fc597b7f
tag: tip
user: Denis Grelich <denisg_AT_suckless.org>
date: Sat Feb 03 00:47:15 2007 +0100
files: view.c
description:
the bar is never covered by windows

diff -r ab927bc5115f -r 0410fc597b7f view.c
--- a/view.c Sat Feb 03 00:21:56 2007 +0100
+++ b/view.c Sat Feb 03 00:47:15 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 - 00:50:04 UTC

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