mirror of
https://github.com/0intro/wmii
synced 2025-02-22 01:04:27 +03:00
changed destroy_page return type
This commit is contained in:
parent
e872e07bb7
commit
757a026b2b
@ -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:
|
||||
{
|
||||
|
@ -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]);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user