add DC to uicb_*() args

This commit is contained in:
Julien Danjou 2007-09-12 18:11:27 +02:00
parent 1d9353eea7
commit 2c6a71f358
10 changed files with 87 additions and 61 deletions

View File

@ -184,6 +184,7 @@ xerrorstart(Display * dsply __attribute__ ((unused)), XErrorEvent * ee __attribu
void void
uicb_quit(Display *disp __attribute__ ((unused)), uicb_quit(Display *disp __attribute__ ((unused)),
DC *drawcontext __attribute__ ((unused)),
awesome_config *awesomeconf __attribute__((unused)), awesome_config *awesomeconf __attribute__((unused)),
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {

View File

@ -29,7 +29,7 @@ enum
Bool gettextprop(Display *, Window, Atom, char *, unsigned int); /* return text property, UTF-8 compliant */ Bool gettextprop(Display *, Window, Atom, char *, unsigned int); /* return text property, UTF-8 compliant */
void updatebarpos(Display *, Statusbar); /* updates the bar position */ void updatebarpos(Display *, Statusbar); /* updates the bar position */
void uicb_quit(Display *, awesome_config *, const char *); /* quit awesome nicely */ void uicb_quit(Display *, DC *, awesome_config *, const char *); /* quit awesome nicely */
int xerror(Display *, XErrorEvent *); /* awesome's X error handler */ int xerror(Display *, XErrorEvent *); /* awesome's X error handler */
int get_windows_area_x(Statusbar); int get_windows_area_x(Statusbar);
int get_windows_area_y(Statusbar); int get_windows_area_y(Statusbar);

View File

@ -297,6 +297,7 @@ focus(Display *disp, DC *drawcontext, Client * c, Bool selscreen, awesome_config
*/ */
void void
uicb_killclient(Display *disp __attribute__ ((unused)), uicb_killclient(Display *disp __attribute__ ((unused)),
DC *drawcontext __attribute__ ((unused)),
awesome_config *awesomeconf __attribute__ ((unused)), awesome_config *awesomeconf __attribute__ ((unused)),
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -481,6 +482,7 @@ resize(Client * c, int x, int y, int w, int h, Bool sizehints)
void void
uicb_moveresize(Display *disp __attribute__ ((unused)), uicb_moveresize(Display *disp __attribute__ ((unused)),
DC *drawcontext __attribute__ ((unused)),
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg) const char *arg)
{ {
@ -637,6 +639,7 @@ updatesizehints(Client * c)
void void
uicb_settrans(Display *disp __attribute__ ((unused)), uicb_settrans(Display *disp __attribute__ ((unused)),
DC *drawcontext __attribute__ ((unused)),
awesome_config *awesomeconf __attribute__ ((unused)), awesome_config *awesomeconf __attribute__ ((unused)),
const char *arg) const char *arg)
{ {

View File

@ -60,8 +60,8 @@ void unmanage(Client *, DC *, long, awesome_config *); /* unmanage c */
void updatesizehints(Client *); /* update the size hint variables of c */ void updatesizehints(Client *); /* update the size hint variables of c */
void updatetitle(Client *); /* update the name of c */ void updatetitle(Client *); /* update the name of c */
void saveprops(Client * c, int); /* saves client properties */ void saveprops(Client * c, int); /* saves client properties */
void uicb_killclient(Display *, awesome_config *, const char *); /* kill client */ void uicb_killclient(Display *, DC *, awesome_config *, const char *); /* kill client */
void uicb_moveresize(Display *, awesome_config *, const char *); /* move and resize window */ void uicb_moveresize(Display *, DC *, awesome_config *, const char *); /* move and resize window */
void uicb_settrans(Display *, awesome_config *, const char *); void uicb_settrans(Display *, DC *, awesome_config *, const char *);
#endif #endif

View File

@ -69,7 +69,7 @@ typedef struct
{ {
unsigned long mod; unsigned long mod;
KeySym keysym; KeySym keysym;
void (*func) (Display *, awesome_config *, const char *); void (*func) (Display *, DC *, awesome_config *, const char *);
const char *arg; const char *arg;
} Key; } Key;

22
event.c
View File

@ -155,22 +155,22 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
if(ev->button == Button1) if(ev->button == Button1)
{ {
if(ev->state & awesomeconf->modkey) if(ev->state & awesomeconf->modkey)
uicb_tag(e->xany.display, awesomeconf, awesomeconf->tags[i]); uicb_tag(e->xany.display, &dc, awesomeconf, awesomeconf->tags[i]);
else else
uicb_view(e->xany.display, awesomeconf, awesomeconf->tags[i]); uicb_view(e->xany.display, &dc, awesomeconf, awesomeconf->tags[i]);
} }
else if(ev->button == Button3) else if(ev->button == Button3)
{ {
if(ev->state & awesomeconf->modkey) if(ev->state & awesomeconf->modkey)
uicb_toggletag(e->xany.display, awesomeconf, awesomeconf->tags[i]); uicb_toggletag(e->xany.display, &dc, awesomeconf, awesomeconf->tags[i]);
else else
uicb_toggleview(e->xany.display, awesomeconf, awesomeconf->tags[i]); uicb_toggleview(e->xany.display, &dc, awesomeconf, awesomeconf->tags[i]);
} }
return; return;
} }
} }
if((ev->x < x + awesomeconf->statusbar.width) && ev->button == Button1) if((ev->x < x + awesomeconf->statusbar.width) && ev->button == Button1)
uicb_setlayout(e->xany.display, awesomeconf, NULL); uicb_setlayout(e->xany.display, &dc, awesomeconf, NULL);
} }
else if((c = getclient(ev->window))) else if((c = getclient(ev->window)))
{ {
@ -179,23 +179,23 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
return; return;
if(ev->button == Button1 && (IS_ARRANGE(floating) || c->isfloating)) if(ev->button == Button1 && (IS_ARRANGE(floating) || c->isfloating))
{ {
restack(e->xany.display, awesomeconf); restack(e->xany.display, &dc, awesomeconf);
movemouse(c, awesomeconf); movemouse(c, awesomeconf);
} }
else if(ev->button == Button2) else if(ev->button == Button2)
uicb_zoom(e->xany.display, awesomeconf, NULL); uicb_zoom(e->xany.display, &dc, awesomeconf, NULL);
else if(ev->button == Button3 && (IS_ARRANGE(floating) || c->isfloating) && !c->isfixed) else if(ev->button == Button3 && (IS_ARRANGE(floating) || c->isfloating) && !c->isfixed)
{ {
restack(e->xany.display, awesomeconf); restack(e->xany.display, &dc, awesomeconf);
resizemouse(c, awesomeconf); resizemouse(c, awesomeconf);
} }
} }
else if(DefaultRootWindow(e->xany.display) == ev->window && !sel) else if(DefaultRootWindow(e->xany.display) == ev->window && !sel)
{ {
if(ev->button == Button4) if(ev->button == Button4)
uicb_tag_viewnext(e->xany.display, awesomeconf, NULL); uicb_tag_viewnext(e->xany.display, &dc, awesomeconf, NULL);
else if(ev->button == Button5) else if(ev->button == Button5)
uicb_tag_viewprev(e->xany.display, awesomeconf, NULL); uicb_tag_viewprev(e->xany.display, &dc, awesomeconf, NULL);
} }
} }
@ -313,7 +313,7 @@ handle_event_keypress(XEvent * e, awesome_config *awesomeconf)
for(i = 0; i < awesomeconf->nkeys; i++) for(i = 0; i < awesomeconf->nkeys; i++)
if(keysym == awesomeconf->keys[i].keysym if(keysym == awesomeconf->keys[i].keysym
&& CLEANMASK(awesomeconf->keys[i].mod) == CLEANMASK(ev->state) && awesomeconf->keys[i].func) && CLEANMASK(awesomeconf->keys[i].mod) == CLEANMASK(ev->state) && awesomeconf->keys[i].func)
awesomeconf->keys[i].func(e->xany.display, awesomeconf, awesomeconf->keys[i].arg); awesomeconf->keys[i].func(e->xany.display, &dc, awesomeconf, awesomeconf->keys[i].arg);
} }
void void

View File

@ -29,10 +29,9 @@
/* extern */ /* extern */
extern Client *clients, *sel; /* global client list */ extern Client *clients, *sel; /* global client list */
extern DC dc;
void void
arrange(Display * disp, DC *drawcontext, awesome_config *awesomeconf) arrange(Display * disp, DC *drawcontext, awesome_config *awesomeconf)
{ {
Client *c; Client *c;
@ -43,11 +42,12 @@ arrange(Display * disp, DC *drawcontext, awesome_config *awesomeconf)
ban(c); ban(c);
awesomeconf->current_layout->arrange(disp, awesomeconf); awesomeconf->current_layout->arrange(disp, awesomeconf);
focus(disp, drawcontext, NULL, True, awesomeconf); focus(disp, drawcontext, NULL, True, awesomeconf);
restack(disp, awesomeconf); restack(disp, drawcontext, awesomeconf);
} }
void void
uicb_focusnext(Display *disp __attribute__ ((unused)), uicb_focusnext(Display *disp __attribute__ ((unused)),
DC *drawcontext,
awesome_config * awesomeconf, awesome_config * awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -60,13 +60,14 @@ uicb_focusnext(Display *disp __attribute__ ((unused)),
for(c = clients; c && !isvisible(c, awesomeconf->selected_tags, awesomeconf->ntags); c = c->next); for(c = clients; c && !isvisible(c, awesomeconf->selected_tags, awesomeconf->ntags); c = c->next);
if(c) if(c)
{ {
focus(c->display, &dc, c, True, awesomeconf); focus(c->display, drawcontext, c, True, awesomeconf);
restack(c->display, awesomeconf); restack(c->display, drawcontext, awesomeconf);
} }
} }
void void
uicb_focusprev(Display *disp __attribute__ ((unused)), uicb_focusprev(Display *disp __attribute__ ((unused)),
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -82,8 +83,8 @@ uicb_focusprev(Display *disp __attribute__ ((unused)),
} }
if(c) if(c)
{ {
focus(c->display, &dc, c, True, awesomeconf); focus(c->display, drawcontext, c, True, awesomeconf);
restack(c->display, awesomeconf); restack(c->display, drawcontext, awesomeconf);
} }
} }
@ -103,13 +104,13 @@ loadawesomeprops(Display *disp, awesome_config * awesomeconf)
} }
void void
restack(Display * disp, awesome_config *awesomeconf) restack(Display * disp, DC * drawcontext, awesome_config *awesomeconf)
{ {
Client *c; Client *c;
XEvent ev; XEvent ev;
XWindowChanges wc; XWindowChanges wc;
drawstatus(disp, &dc, awesomeconf); drawstatus(disp, drawcontext, awesomeconf);
if(!sel) if(!sel)
return; return;
if(sel->isfloating || IS_ARRANGE(floating)) if(sel->isfloating || IS_ARRANGE(floating))
@ -152,7 +153,10 @@ saveawesomeprops(Display *disp, awesome_config *awesomeconf)
} }
void void
uicb_setlayout(Display *disp, awesome_config * awesomeconf, const char *arg) uicb_setlayout(Display *disp,
DC *drawcontext,
awesome_config * awesomeconf,
const char *arg)
{ {
int i, j; int i, j;
Client *c; Client *c;
@ -174,9 +178,9 @@ uicb_setlayout(Display *disp, awesome_config * awesomeconf, const char *arg)
c->ftview = True; c->ftview = True;
if(sel) if(sel)
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
else else
drawstatus(disp, &dc, awesomeconf); drawstatus(disp, drawcontext, awesomeconf);
saveawesomeprops(disp, awesomeconf); saveawesomeprops(disp, awesomeconf);
@ -187,6 +191,7 @@ uicb_setlayout(Display *disp, awesome_config * awesomeconf, const char *arg)
void void
uicb_togglebar(Display *disp, uicb_togglebar(Display *disp,
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -195,11 +200,11 @@ uicb_togglebar(Display *disp,
else else
awesomeconf->statusbar.position = BarOff; awesomeconf->statusbar.position = BarOff;
updatebarpos(disp, awesomeconf->statusbar); updatebarpos(disp, awesomeconf->statusbar);
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
static void static void
maximize(int x, int y, int w, int h, awesome_config *awesomeconf) maximize(int x, int y, int w, int h, DC *drawcontext, awesome_config *awesomeconf)
{ {
XEvent ev; XEvent ev;
@ -221,24 +226,28 @@ maximize(int x, int y, int w, int h, awesome_config *awesomeconf)
else else
sel->isfloating = False; sel->isfloating = False;
drawstatus(sel->display, &dc, awesomeconf); drawstatus(sel->display, drawcontext, awesomeconf);
while(XCheckMaskEvent(sel->display, EnterWindowMask, &ev)); while(XCheckMaskEvent(sel->display, EnterWindowMask, &ev));
} }
void void
uicb_togglemax(Display *disp, uicb_togglemax(Display *disp,
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
maximize(get_windows_area_x(awesomeconf->statusbar), maximize(get_windows_area_x(awesomeconf->statusbar),
get_windows_area_y(awesomeconf->statusbar), get_windows_area_y(awesomeconf->statusbar),
get_windows_area_width(disp, awesomeconf->statusbar) - 2 * awesomeconf->borderpx, get_windows_area_width(disp, awesomeconf->statusbar) - 2 * awesomeconf->borderpx,
get_windows_area_height(disp, awesomeconf->statusbar) - 2 * awesomeconf->borderpx, awesomeconf); get_windows_area_height(disp, awesomeconf->statusbar) - 2 * awesomeconf->borderpx,
drawcontext,
awesomeconf);
} }
void void
uicb_toggleverticalmax(Display *disp, uicb_toggleverticalmax(Display *disp,
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -247,12 +256,14 @@ uicb_toggleverticalmax(Display *disp,
get_windows_area_y(awesomeconf->statusbar), get_windows_area_y(awesomeconf->statusbar),
sel->w, sel->w,
get_windows_area_height(disp, awesomeconf->statusbar) - 2 * awesomeconf->borderpx, get_windows_area_height(disp, awesomeconf->statusbar) - 2 * awesomeconf->borderpx,
drawcontext,
awesomeconf); awesomeconf);
} }
void void
uicb_togglehorizontalmax(Display *disp, uicb_togglehorizontalmax(Display *disp,
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -261,11 +272,13 @@ uicb_togglehorizontalmax(Display *disp,
sel->y, sel->y,
get_windows_area_height(disp, awesomeconf->statusbar) - 2 * awesomeconf->borderpx, get_windows_area_height(disp, awesomeconf->statusbar) - 2 * awesomeconf->borderpx,
sel->h, sel->h,
drawcontext,
awesomeconf); awesomeconf);
} }
void void
uicb_zoom(Display *disp __attribute__ ((unused)), uicb_zoom(Display *disp __attribute__ ((unused)),
DC *drawcontext __attribute__ ((unused)),
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -273,7 +286,7 @@ uicb_zoom(Display *disp __attribute__ ((unused)),
return; return;
detach(sel); detach(sel);
attach(sel); attach(sel);
focus(sel->display, &dc, sel, True, awesomeconf); focus(sel->display, drawcontext, sel, True, awesomeconf);
arrange(sel->display, &dc, awesomeconf); arrange(sel->display, drawcontext, awesomeconf);
} }

View File

@ -30,15 +30,15 @@
#define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False) #define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False)
void arrange(Display *, DC *, awesome_config *); /* arranges all windows depending on the layout in use */ void arrange(Display *, DC *, awesome_config *); /* arranges all windows depending on the layout in use */
void restack(Display *, awesome_config *); /* restores z layers of all clients */ void restack(Display *, DC *, awesome_config *); /* restores z layers of all clients */
void uicb_focusnext(Display *, awesome_config *, const char *); /* focuses next visible client */ void uicb_focusnext(Display *, DC *, awesome_config *, const char *); /* focuses next visible client */
void uicb_focusprev(Display *, awesome_config *, const char *); /* focuses prev visible client */ void uicb_focusprev(Display *, DC *, awesome_config *, const char *); /* focuses prev visible client */
void uicb_setlayout(Display *, awesome_config *, const char *); /* sets layout, NULL means next layout */ void uicb_setlayout(Display *, DC *, awesome_config *, const char *); /* sets layout, NULL means next layout */
void uicb_togglebar(Display *, awesome_config *, const char *); /* shows/hides the bar */ void uicb_togglebar(Display *, DC *, awesome_config *, const char *); /* shows/hides the bar */
void uicb_togglemax(Display *, awesome_config *, const char *); /* toggles maximization of floating client */ void uicb_togglemax(Display *, DC *, awesome_config *, const char *); /* toggles maximization of floating client */
void uicb_toggleverticalmax(Display *, awesome_config *, const char *); void uicb_toggleverticalmax(Display *, DC *, awesome_config *, const char *);
void uicb_togglehorizontalmax(Display *, awesome_config *, const char *); void uicb_togglehorizontalmax(Display *, DC *, awesome_config *, const char *);
void uicb_zoom(Display *, awesome_config *, const char *); /* set current window first in stack */ void uicb_zoom(Display *, DC *, awesome_config *, const char *); /* set current window first in stack */
void loadawesomeprops(Display *, awesome_config *); void loadawesomeprops(Display *, awesome_config *);
void saveawesomeprops(Display *disp, awesome_config *); void saveawesomeprops(Display *disp, awesome_config *);

29
tag.c
View File

@ -26,7 +26,6 @@
#include "tag.h" #include "tag.h"
extern Client *sel; /* global client list */ extern Client *sel; /* global client list */
extern DC dc;
static Regs *regs = NULL; static Regs *regs = NULL;
@ -144,7 +143,10 @@ isvisible(Client * c, Bool * tags, int ntags)
* \ingroup ui_callback * \ingroup ui_callback
*/ */
void void
uicb_tag(Display *disp, awesome_config *awesomeconf, const char *arg) uicb_tag(Display *disp,
DC *drawcontext,
awesome_config *awesomeconf,
const char *arg)
{ {
int i; int i;
@ -156,7 +158,7 @@ uicb_tag(Display *disp, awesome_config *awesomeconf, const char *arg)
if(i >= 0 && i < awesomeconf->ntags) if(i >= 0 && i < awesomeconf->ntags)
sel->tags[i] = True; sel->tags[i] = True;
saveprops(sel, awesomeconf->ntags); saveprops(sel, awesomeconf->ntags);
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
/** Toggle floating state of a client /** Toggle floating state of a client
@ -166,6 +168,7 @@ uicb_tag(Display *disp, awesome_config *awesomeconf, const char *arg)
*/ */
void void
uicb_togglefloating(Display *disp, uicb_togglefloating(Display *disp,
DC *drawcontext,
awesome_config * awesomeconf, awesome_config * awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -184,7 +187,7 @@ uicb_togglefloating(Display *disp,
sel->rh = sel->h; sel->rh = sel->h;
} }
saveprops(sel, awesomeconf->ntags); saveprops(sel, awesomeconf->ntags);
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
/** Toggle tag view /** Toggle tag view
@ -194,6 +197,7 @@ uicb_togglefloating(Display *disp,
*/ */
void void
uicb_toggletag(Display *disp, uicb_toggletag(Display *disp,
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg) const char *arg)
{ {
@ -208,7 +212,7 @@ uicb_toggletag(Display *disp,
if(j == awesomeconf->ntags) if(j == awesomeconf->ntags)
sel->tags[i] = True; sel->tags[i] = True;
saveprops(sel, awesomeconf->ntags); saveprops(sel, awesomeconf->ntags);
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
/** Add a tag to viewed tags /** Add a tag to viewed tags
@ -218,6 +222,7 @@ uicb_toggletag(Display *disp,
*/ */
void void
uicb_toggleview(Display *disp, uicb_toggleview(Display *disp,
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg) const char *arg)
{ {
@ -230,7 +235,7 @@ uicb_toggleview(Display *disp,
if(j == awesomeconf->ntags) if(j == awesomeconf->ntags)
awesomeconf->selected_tags[i] = True; /* cannot toggle last view */ awesomeconf->selected_tags[i] = True; /* cannot toggle last view */
saveawesomeprops(disp, awesomeconf); saveawesomeprops(disp, awesomeconf);
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
/** View tag /** View tag
@ -241,6 +246,7 @@ uicb_toggleview(Display *disp,
*/ */
void void
uicb_view(Display *disp, uicb_view(Display *disp,
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg) const char *arg)
{ {
@ -258,7 +264,7 @@ uicb_view(Display *disp,
awesomeconf->current_layout = awesomeconf->tag_layouts[i]; awesomeconf->current_layout = awesomeconf->tag_layouts[i];
} }
saveawesomeprops(disp, awesomeconf); saveawesomeprops(disp, awesomeconf);
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
/** View previously selected tags /** View previously selected tags
@ -269,6 +275,7 @@ uicb_view(Display *disp,
*/ */
void void
uicb_viewprevtags(Display * disp, uicb_viewprevtags(Display * disp,
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -281,7 +288,7 @@ uicb_viewprevtags(Display * disp,
awesomeconf->selected_tags[i] = awesomeconf->prev_selected_tags[i]; awesomeconf->selected_tags[i] = awesomeconf->prev_selected_tags[i];
awesomeconf->prev_selected_tags[i] = t; awesomeconf->prev_selected_tags[i] = t;
} }
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
/** View next tag /** View next tag
@ -291,6 +298,7 @@ uicb_viewprevtags(Display * disp,
*/ */
void void
uicb_tag_viewnext(Display *disp, uicb_tag_viewnext(Display *disp,
DC * drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -307,7 +315,7 @@ uicb_tag_viewnext(Display *disp,
firsttag = 0; firsttag = 0;
awesomeconf->selected_tags[firsttag] = True; awesomeconf->selected_tags[firsttag] = True;
saveawesomeprops(disp, awesomeconf); saveawesomeprops(disp, awesomeconf);
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
/** View previous tag /** View previous tag
@ -317,6 +325,7 @@ uicb_tag_viewnext(Display *disp,
*/ */
void void
uicb_tag_viewprev(Display *disp, uicb_tag_viewprev(Display *disp,
DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
@ -333,5 +342,5 @@ uicb_tag_viewprev(Display *disp,
firsttag = awesomeconf->ntags - 1; firsttag = awesomeconf->ntags - 1;
awesomeconf->selected_tags[firsttag] = True; awesomeconf->selected_tags[firsttag] = True;
saveawesomeprops(disp, awesomeconf); saveawesomeprops(disp, awesomeconf);
arrange(disp, &dc, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }

16
tag.h
View File

@ -31,14 +31,14 @@
void compileregs(Rule *, int); /* initialize regexps of rules defined in config.h */ void compileregs(Rule *, int); /* initialize regexps of rules defined in config.h */
Bool isvisible(Client *, Bool *, int); Bool isvisible(Client *, Bool *, int);
void applyrules(Client * c, awesome_config *); /* applies rules to c */ void applyrules(Client * c, awesome_config *); /* applies rules to c */
void uicb_tag(Display *, awesome_config *, const char *); /* tags sel with arg's index */ void uicb_tag(Display *, DC *, awesome_config *, const char *); /* tags sel with arg's index */
void uicb_togglefloating(Display *, awesome_config *, const char *); /* toggles sel between floating/tiled state */ void uicb_togglefloating(Display *, DC *, awesome_config *, const char *); /* toggles sel between floating/tiled state */
void uicb_toggletag(Display *, awesome_config *, const char *); /* toggles sel tags with arg's index */ void uicb_toggletag(Display *, DC *, awesome_config *, const char *); /* toggles sel tags with arg's index */
void uicb_toggleview(Display *, awesome_config *, const char *); /* toggles the tag with arg's index (in)visible */ void uicb_toggleview(Display *, DC *, awesome_config *, const char *); /* toggles the tag with arg's index (in)visible */
void uicb_view(Display *, awesome_config *, const char *); /* views the tag with arg's index */ void uicb_view(Display *, DC *, awesome_config *, const char *); /* views the tag with arg's index */
void uicb_viewprevtags(Display *, awesome_config *, const char *); void uicb_viewprevtags(Display *, DC *, awesome_config *, const char *);
void uicb_tag_viewnext(Display *, awesome_config *, const char *); /* view only tag just after the first selected */ void uicb_tag_viewnext(Display *, DC *, awesome_config *, const char *); /* view only tag just after the first selected */
void uicb_tag_viewprev(Display *, awesome_config *, const char *); /* view only tag just before the first selected */ void uicb_tag_viewprev(Display *, DC *, awesome_config *, const char *); /* view only tag just before the first selected */
typedef struct typedef struct
{ {