removed extra/ subdir, pkeys is obsolete

This commit is contained in:
Anselm R. Garbe 2006-02-11 15:58:47 +01:00
parent 1c7505d00f
commit 30728dd3aa
5 changed files with 19 additions and 26 deletions

View File

@ -60,38 +60,44 @@ destroy_page(Page *p)
destroy_area(p->area[i]);
free(p->area);
for(i = 0; (i < npage) && (p != page[i]); i++);
if(sel && (sel == i))
if((sel + 1 == npage) && (sel - 1 >= 0))
sel--;
free(p);
cext_array_detach((void **)page, p, &pagesz);
npage--;
free(p);
for(i = 0; i < npage; i++);
XChangeProperty(dpy, root, net_atoms[NET_NUMBER_OF_DESKTOPS], XA_CARDINAL,
32, PropModeReplace, (unsigned char *) &i, 1);
/* determine what to focus and do that */
if(page[sel])
if(npage)
focus_page(page[sel]);
else
do_pend_fcall("PN -\n");
}
int
page_to_index(Page *p)
{
int i;
for(i = 0; i < npage; i++)
if(p == page[i])
return i;
return -1;
}
void
focus_page(Page *p)
{
size_t i;
Page *old = page ? page[sel] : nil;
char buf[16];
Client *c;
int i = page_to_index(p);
if(!page)
if(!npage || (i == -1))
return;
for(i = 0; (i < npage) && (page[i] != p); i++);
if(i == sel)
return;
sel = i;
for(i = 0; i < nclient; i++) {
c = client[i];

View File

@ -51,7 +51,7 @@ scale_rect(XRectangle * from_dim, XRectangle * to_dim,
static void
draw_pager_client(Client *c, Draw *d)
{
if(c == sel_client())
if(c == sel_client_of_page(c->area->page))
d->color = def.sel;
else
d->color = def.norm;

View File

@ -265,6 +265,7 @@ void focus_page(Page *p);
XRectangle *rectangles(unsigned int *num);
int pid_to_index(unsigned short id);
void select_page(char *arg);
int page_to_index(Page *p);
/* spawn.c */
void spawn(char *cmd);

View File

@ -1,8 +0,0 @@
Scripts in this directory have been contributed by various different
people. For License information look into the source code of the
appropriate script.
Name: pkeys
Purpose: Print the current key bindings.
Requirements: 9base

View File

@ -1,6 +0,0 @@
#!/usr/local/9/bin/rc
mdir=/keys/mode/
for (mode in `{wmiir read $mdir})
for (key in `{wmiir read $mdir$mode})
echo $mode$key '->' `{wmiir read $mdir$mode$key}