wmii

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

commit 757a026b2bb73f300ab4db19b7bc82ebd5f31ae3
parent e872e07bb745522b12b53eab286d5534e9d14507
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Tue, 28 Feb 2006 13:38:24 +0100

changed destroy_page return type


Diffstat:
cmd/wm/fs.c | 7+++++--
cmd/wm/page.c | 4++--
cmd/wm/wm.h | 6+++++-
3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c @@ -601,8 +601,11 @@ xremove(IXPConn *c, Fcall *fcall) return Enofile; switch(type) { case Dpage: - if(destroy_page(page[i1]) == page[i1]) - return Enoperm; + { + char *ret = destroy_page(page[i1]); + if(ret) + return ret; + } break; case Dlabel: { diff --git a/cmd/wm/page.c b/cmd/wm/page.c @@ -27,7 +27,7 @@ alloc_page() return p; } -Page * +char * destroy_page(Page *p) { unsigned int i; @@ -36,7 +36,7 @@ destroy_page(Page *p) for(i = 0; i < p->narea; i++) if(p->area[i]->nclient) - return p; + return "page not empty"; while(p->narea) destroy_area(p->area[0]); diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h @@ -59,6 +59,8 @@ typedef struct Area Area; typedef struct Page Page; typedef struct Client Client; +typedef enum { COL_MAX, COL_EQUAL, COL_STACK } ColumnMode; + struct Area { unsigned short id; Client **client; @@ -66,6 +68,8 @@ struct Area { size_t clientsz; size_t sel; size_t nclient; + size_t maxclient; + ColumnMode mode; XRectangle rect; }; @@ -261,7 +265,7 @@ char *warp_mouse(char *arg); /* page.c */ Page *alloc_page(); -Page *destroy_page(Page *p); +char *destroy_page(Page *p); void focus_page(Page *p); XRectangle *rectangles(unsigned int *num); int pid_to_index(unsigned short id);