wmii

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

commit 9fb1c4379c0bc7f6338d4014733fe308d20833e4
parent 1e96f98c3849f0d10c4a1c7f128d5217622ae944
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Sat, 21 Jan 2006 19:01:28 +0200

some more small changes in wmiibar and page.c


Diffstat:
cmd/wm/page.c | 6++++--
cmd/wmiibar2.c | 10+++++-----
2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/cmd/wm/page.c b/cmd/wm/page.c @@ -60,7 +60,8 @@ alloc_page() invoke_wm_event(def[WM_EVENT_PAGE_UPDATE]); pageid++; npages++; - XChangeProperty(dpy, root, net_atoms[NET_NUMBER_OF_DESKTOPS], XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &npages, 1); + XChangeProperty(dpy, root, net_atoms[NET_NUMBER_OF_DESKTOPS], XA_CARDINAL, + 32, PropModeReplace, (unsigned char *) &npages, 1); return new; } @@ -123,7 +124,8 @@ destroy_page(Page * p) if(!newselpage) newselpage = pages; npages--; - XChangeProperty(dpy, root, net_atoms[NET_NUMBER_OF_DESKTOPS], XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &npages, 1); + XChangeProperty(dpy, root, net_atoms[NET_NUMBER_OF_DESKTOPS], XA_CARDINAL, + 32, PropModeReplace, (unsigned char *) &npages, 1); focus_page(newselpage); } diff --git a/cmd/wmiibar2.c b/cmd/wmiibar2.c @@ -133,7 +133,7 @@ exit_cleanup() } static unsigned long long -make_qpath(unsigned char type, unsigned short item, unsigned short file) +mkqpath(unsigned char type, unsigned short item, unsigned short file) { return ((unsigned long long) file << 24) | ((unsigned long long) item << 8) | (unsigned long long) type; } @@ -194,7 +194,7 @@ mkqid(Qid * dir, char *wname, Qid * new) *new = root_qid; return True; } else if(!strncmp(wname, "default", 8)) { - new->path = make_qpath(Ditem, 0, NONE); + new->path = mkqpath(Ditem, 0, NONE); return True; } /* check if wname is a number, otherwise file not found */ @@ -202,11 +202,11 @@ mkqid(Qid * dir, char *wname, Qid * new) if(errstr || nitems < idx) return False; /* found */ - new->path = make_qpath(Ditem, idx, NONE); + new->path = mkqpath(Ditem, idx, NONE); } else { new->type = IXP_QTFILE; new->path = - make_qpath(qfilelist[idx].type, qpath_item(dir->path), idx); + mkqpath(qfilelist[idx].type, qpath_item(dir->path), idx); } return True; } @@ -519,7 +519,7 @@ main(int argc, char *argv[]) } root_qid.type = IXP_QTDIR; root_qid.version = 0; - root_qid.path = make_qpath(Droot, NONE, NONE); + root_qid.path = mkqpath(Droot, NONE, NONE); mypid = getpid(); atexit(exit_cleanup);