remove screen arg from uicb*

This commit is contained in:
Julien Danjou 2007-09-17 13:58:49 +02:00
parent ef69814e29
commit dcec6aa749
16 changed files with 47 additions and 71 deletions

View File

@ -232,7 +232,6 @@ xerrorstart(Display * disp __attribute__ ((unused)), XErrorEvent * ee __attribut
*/ */
void void
uicb_quit(Display *disp __attribute__ ((unused)), uicb_quit(Display *disp __attribute__ ((unused)),
int screen __attribute__ ((unused)),
DC *drawcontext __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

@ -24,7 +24,7 @@
#include "config.h" #include "config.h"
void uicb_quit(Display *, int, DC *, 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 __attribute__ ((deprecated)) get_windows_area_x(Statusbar); int __attribute__ ((deprecated)) get_windows_area_x(Statusbar);
int __attribute__ ((deprecated)) get_windows_area_y(Statusbar); int __attribute__ ((deprecated)) get_windows_area_y(Statusbar);

View File

@ -301,7 +301,6 @@ 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)),
int screen __attribute__ ((unused)),
DC *drawcontext __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)))
@ -491,7 +490,6 @@ 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)),
int screen __attribute__ ((unused)),
DC *drawcontext __attribute__ ((unused)), DC *drawcontext __attribute__ ((unused)),
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg) const char *arg)
@ -660,7 +658,6 @@ set_shape(Client *c)
void void
uicb_settrans(Display *disp __attribute__ ((unused)), uicb_settrans(Display *disp __attribute__ ((unused)),
int screen __attribute__ ((unused)),
DC *drawcontext __attribute__ ((unused)), DC *drawcontext __attribute__ ((unused)),
awesome_config *awesomeconf __attribute__ ((unused)), awesome_config *awesomeconf __attribute__ ((unused)),
const char *arg) const char *arg)

View File

@ -68,8 +68,8 @@ 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 set_shape(Client *); void set_shape(Client *);
void uicb_killclient(Display *, int, DC *, awesome_config *, const char *); /* kill client */ void uicb_killclient(Display *, DC *, awesome_config *, const char *); /* kill client */
void uicb_moveresize(Display *, int, DC *, 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 *, int, DC *, awesome_config *, const char *); void uicb_settrans(Display *, DC *, awesome_config *, const char *);
#endif #endif

View File

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

24
event.c
View File

@ -160,22 +160,22 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
if(ev->button == Button1) if(ev->button == Button1)
{ {
if(ev->state & awesomeconf[screen].modkey) if(ev->state & awesomeconf[screen].modkey)
uicb_tag(e->xany.display, screen, &dc[screen], &awesomeconf[screen], awesomeconf[screen].tags[i]); uicb_tag(e->xany.display, &dc[screen], &awesomeconf[screen], awesomeconf[screen].tags[i]);
else else
uicb_view(e->xany.display, screen, &dc[screen], &awesomeconf[screen], awesomeconf[screen].tags[i]); uicb_view(e->xany.display, &dc[screen], &awesomeconf[screen], awesomeconf[screen].tags[i]);
} }
else if(ev->button == Button3) else if(ev->button == Button3)
{ {
if(ev->state & awesomeconf[screen].modkey) if(ev->state & awesomeconf[screen].modkey)
uicb_toggletag(e->xany.display, screen, &dc[screen], &awesomeconf[screen], awesomeconf[screen].tags[i]); uicb_toggletag(e->xany.display, &dc[screen], &awesomeconf[screen], awesomeconf[screen].tags[i]);
else else
uicb_toggleview(e->xany.display, screen, &dc[screen], &awesomeconf[screen], awesomeconf[screen].tags[i]); uicb_toggleview(e->xany.display, &dc[screen], &awesomeconf[screen], awesomeconf[screen].tags[i]);
} }
return; return;
} }
} }
if((ev->x < x + awesomeconf[screen].statusbar.width) && ev->button == Button1) if((ev->x < x + awesomeconf[screen].statusbar.width) && ev->button == Button1)
uicb_setlayout(e->xany.display, screen, &dc[screen], &awesomeconf[screen], NULL); uicb_setlayout(e->xany.display, &dc[screen], &awesomeconf[screen], NULL);
return; return;
} }
@ -187,7 +187,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
if(ev->button == Button1) if(ev->button == Button1)
{ {
if(!IS_ARRANGE(floating) && !c->isfloating) if(!IS_ARRANGE(floating) && !c->isfloating)
uicb_togglefloating(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen], NULL); uicb_togglefloating(e->xany.display, &dc[c->screen], &awesomeconf[c->screen], NULL);
else else
restack(e->xany.display, &dc[c->screen], &awesomeconf[c->screen]); restack(e->xany.display, &dc[c->screen], &awesomeconf[c->screen]);
movemouse(c, &awesomeconf[c->screen]); movemouse(c, &awesomeconf[c->screen]);
@ -195,14 +195,14 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
else if(ev->button == Button2) else if(ev->button == Button2)
{ {
if(IS_ARRANGE(tile) && !c->isfixed && c->isfloating) if(IS_ARRANGE(tile) && !c->isfixed && c->isfloating)
uicb_togglefloating(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen], NULL); uicb_togglefloating(e->xany.display, &dc[c->screen], &awesomeconf[c->screen], NULL);
else else
uicb_zoom(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen], NULL); uicb_zoom(e->xany.display, &dc[c->screen], &awesomeconf[c->screen], NULL);
} }
else if(ev->button == Button3) else if(ev->button == Button3)
{ {
if(!IS_ARRANGE(floating) && !c->isfloating) if(!IS_ARRANGE(floating) && !c->isfloating)
uicb_togglefloating(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen], NULL); uicb_togglefloating(e->xany.display, &dc[c->screen], &awesomeconf[c->screen], NULL);
else else
restack(e->xany.display, &dc[c->screen], &awesomeconf[c->screen]); restack(e->xany.display, &dc[c->screen], &awesomeconf[c->screen]);
resizemouse(c, &awesomeconf[c->screen]); resizemouse(c, &awesomeconf[c->screen]);
@ -213,9 +213,9 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
if(RootWindow(e->xany.display, screen) == ev->window) if(RootWindow(e->xany.display, screen) == ev->window)
{ {
if(ev->button == Button4) if(ev->button == Button4)
uicb_tag_viewnext(e->xany.display, screen, &dc[screen], &awesomeconf[screen], NULL); uicb_tag_viewnext(e->xany.display, &dc[screen], &awesomeconf[screen], NULL);
else if(ev->button == Button5) else if(ev->button == Button5)
uicb_tag_viewprev(e->xany.display, screen, &dc[screen], &awesomeconf[screen], NULL); uicb_tag_viewprev(e->xany.display, &dc[screen], &awesomeconf[screen], NULL);
} }
} }
@ -347,7 +347,7 @@ handle_event_keypress(XEvent * e, awesome_config *awesomeconf)
for(i = 0; i < awesomeconf[screen].nkeys; i++) for(i = 0; i < awesomeconf[screen].nkeys; i++)
if(keysym == awesomeconf[screen].keys[i].keysym if(keysym == awesomeconf[screen].keys[i].keysym
&& CLEANMASK(awesomeconf[screen].keys[i].mod, screen) == CLEANMASK(ev->state, screen) && awesomeconf[screen].keys[i].func) && CLEANMASK(awesomeconf[screen].keys[i].mod, screen) == CLEANMASK(ev->state, screen) && awesomeconf[screen].keys[i].func)
awesomeconf[screen].keys[i].func(e->xany.display, screen, &dc[screen], &awesomeconf[screen], awesomeconf[screen].keys[i].arg); awesomeconf[screen].keys[i].func(e->xany.display, &dc[screen], &awesomeconf[screen], awesomeconf[screen].keys[i].arg);
} }
void void

View File

@ -52,7 +52,6 @@ arrange(Display * disp, DC *drawcontext, awesome_config *awesomeconf)
void void
uicb_focusnext(Display *disp __attribute__ ((unused)), uicb_focusnext(Display *disp __attribute__ ((unused)),
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config * awesomeconf, awesome_config * awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
@ -61,9 +60,9 @@ uicb_focusnext(Display *disp __attribute__ ((unused)),
if(!sel) if(!sel)
return; return;
for(c = sel->next; c && !isvisible(c, screen, awesomeconf->selected_tags, awesomeconf->ntags); c = c->next); for(c = sel->next; c && !isvisible(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags); c = c->next);
if(!c) if(!c)
for(c = clients; c && !isvisible(c, screen, awesomeconf->selected_tags, awesomeconf->ntags); c = c->next); for(c = clients; c && !isvisible(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags); c = c->next);
if(c) if(c)
{ {
focus(c->display, drawcontext, c, True, awesomeconf); focus(c->display, drawcontext, c, True, awesomeconf);
@ -73,7 +72,6 @@ uicb_focusnext(Display *disp __attribute__ ((unused)),
void void
uicb_focusprev(Display *disp __attribute__ ((unused)), uicb_focusprev(Display *disp __attribute__ ((unused)),
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
@ -82,11 +80,11 @@ uicb_focusprev(Display *disp __attribute__ ((unused)),
if(!sel) if(!sel)
return; return;
for(c = sel->prev; c && !isvisible(c, screen, awesomeconf->selected_tags, awesomeconf->ntags); c = c->prev); for(c = sel->prev; c && !isvisible(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags); c = c->prev);
if(!c) if(!c)
{ {
for(c = clients; c && c->next; c = c->next); for(c = clients; c && c->next; c = c->next);
for(; c && !isvisible(c, screen, awesomeconf->selected_tags, awesomeconf->ntags); c = c->prev); for(; c && !isvisible(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags); c = c->prev);
} }
if(c) if(c)
{ {
@ -161,7 +159,6 @@ saveawesomeprops(Display *disp, int screen, awesome_config *awesomeconf)
void void
uicb_setlayout(Display *disp, uicb_setlayout(Display *disp,
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config * awesomeconf, awesome_config * awesomeconf,
const char *arg) const char *arg)
@ -190,7 +187,7 @@ uicb_setlayout(Display *disp,
else else
drawstatusbar(disp, DefaultScreen(disp), drawcontext, awesomeconf); drawstatusbar(disp, DefaultScreen(disp), drawcontext, awesomeconf);
saveawesomeprops(disp, screen, awesomeconf); saveawesomeprops(disp, awesomeconf->screen, awesomeconf);
for(j = 0; j < awesomeconf->ntags; j++) for(j = 0; j < awesomeconf->ntags; j++)
if (awesomeconf->selected_tags[j]) if (awesomeconf->selected_tags[j])
@ -227,7 +224,6 @@ maximize(int x, int y, int w, int h, DC *drawcontext, awesome_config *awesomecon
void void
uicb_togglemax(Display *disp, uicb_togglemax(Display *disp,
int screen __attribute__ ((unused)),
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
@ -242,7 +238,6 @@ uicb_togglemax(Display *disp,
void void
uicb_toggleverticalmax(Display *disp, uicb_toggleverticalmax(Display *disp,
int screen __attribute__ ((unused)),
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
@ -259,7 +254,6 @@ uicb_toggleverticalmax(Display *disp,
void void
uicb_togglehorizontalmax(Display *disp, uicb_togglehorizontalmax(Display *disp,
int screen __attribute__ ((unused)),
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
@ -275,7 +269,6 @@ uicb_togglehorizontalmax(Display *disp,
void void
uicb_zoom(Display *disp __attribute__ ((unused)), uicb_zoom(Display *disp __attribute__ ((unused)),
int screen __attribute__ ((unused)),
DC *drawcontext __attribute__ ((unused)), DC *drawcontext __attribute__ ((unused)),
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))

View File

@ -31,13 +31,13 @@
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 *, DC *, awesome_config *); /* restores z layers of all clients */ void restack(Display *, DC *, awesome_config *); /* restores z layers of all clients */
void uicb_focusnext(Display *, int, DC *, 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 *, int, DC *, 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 *, int, DC *, 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_togglemax(Display *, int, DC *, 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 *, int, DC *, awesome_config *, const char *); void uicb_toggleverticalmax(Display *, DC *, awesome_config *, const char *);
void uicb_togglehorizontalmax(Display *, int, DC *, awesome_config *, const char *); void uicb_togglehorizontalmax(Display *, DC *, awesome_config *, const char *);
void uicb_zoom(Display *, int, DC *, 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 *, int, awesome_config *); void loadawesomeprops(Display *, int, awesome_config *);
void saveawesomeprops(Display *disp, int, awesome_config *); void saveawesomeprops(Display *disp, int, awesome_config *);

View File

@ -33,7 +33,6 @@ extern Client *sel, *clients;
void void
uicb_setnmaster(Display *disp, uicb_setnmaster(Display *disp,
int screen,
DC * drawcontext, DC * drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char * arg) const char * arg)
@ -49,7 +48,6 @@ uicb_setnmaster(Display *disp,
void void
uicb_setncols(Display *disp, uicb_setncols(Display *disp,
int screen,
DC * drawcontext, DC * drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char * arg) const char * arg)
@ -65,7 +63,6 @@ uicb_setncols(Display *disp,
void void
uicb_setmwfact(Display *disp, uicb_setmwfact(Display *disp,
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config * awesomeconf, awesome_config * awesomeconf,
const char *arg) const char *arg)

View File

@ -25,9 +25,9 @@
#include <config.h> #include <config.h>
void uicb_setnmaster(Display *, int, DC *, awesome_config *, const char *); /* change number of master windows */ void uicb_setnmaster(Display *, DC *, awesome_config *, const char *); /* change number of master windows */
void uicb_setncols(Display *, int, DC *, awesome_config *, const char *); void uicb_setncols(Display *, DC *, awesome_config *, const char *);
void uicb_setmwfact(Display *, int, DC *, awesome_config *, const char *); /* sets master width factor */ void uicb_setmwfact(Display *, DC *, awesome_config *, const char *); /* sets master width factor */
void tile(Display *, int, awesome_config *); void tile(Display *, int, awesome_config *);
void tileleft(Display *, int, awesome_config *); void tileleft(Display *, int, awesome_config *);

View File

@ -142,7 +142,6 @@ updatebarpos(Display *disp, Statusbar statusbar)
void void
uicb_togglebar(Display *disp, uicb_togglebar(Display *disp,
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))

View File

@ -27,6 +27,6 @@
void initstatusbar(Display *, int, DC *, Statusbar *); void initstatusbar(Display *, int, DC *, Statusbar *);
void drawstatusbar(Display *, int, DC *, awesome_config *); void drawstatusbar(Display *, int, DC *, awesome_config *);
void updatebarpos(Display *, Statusbar); void updatebarpos(Display *, Statusbar);
void uicb_togglebar(Display *, int, DC *, awesome_config *, const char *); void uicb_togglebar(Display *, DC *, awesome_config *, const char *);
#endif #endif

16
tag.c
View File

@ -145,7 +145,6 @@ isvisible(Client * c, int screen, Bool * tags, int ntags)
*/ */
void void
uicb_tag(Display *disp, uicb_tag(Display *disp,
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg) const char *arg)
@ -170,7 +169,6 @@ uicb_tag(Display *disp,
*/ */
void void
uicb_togglefloating(Display *disp, uicb_togglefloating(Display *disp,
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config * awesomeconf, awesome_config * awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
@ -200,7 +198,6 @@ uicb_togglefloating(Display *disp,
*/ */
void void
uicb_toggletag(Display *disp, uicb_toggletag(Display *disp,
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg) const char *arg)
@ -226,7 +223,6 @@ uicb_toggletag(Display *disp,
*/ */
void void
uicb_toggleview(Display *disp, uicb_toggleview(Display *disp,
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg) const char *arg)
@ -239,7 +235,7 @@ uicb_toggleview(Display *disp,
for(j = 0; j < awesomeconf->ntags && !awesomeconf->selected_tags[j]; j++); for(j = 0; j < awesomeconf->ntags && !awesomeconf->selected_tags[j]; j++);
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, screen, awesomeconf); saveawesomeprops(disp, awesomeconf->screen, awesomeconf);
arrange(disp, drawcontext, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
@ -251,7 +247,6 @@ uicb_toggleview(Display *disp,
*/ */
void void
uicb_view(Display *disp, uicb_view(Display *disp,
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg) const char *arg)
@ -269,7 +264,7 @@ uicb_view(Display *disp,
awesomeconf->selected_tags[i] = True; awesomeconf->selected_tags[i] = True;
awesomeconf->current_layout = awesomeconf->tag_layouts[i]; awesomeconf->current_layout = awesomeconf->tag_layouts[i];
} }
saveawesomeprops(disp, screen, awesomeconf); saveawesomeprops(disp, awesomeconf->screen, awesomeconf);
arrange(disp, drawcontext, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
@ -281,7 +276,6 @@ uicb_view(Display *disp,
*/ */
void void
uicb_viewprevtags(Display * disp, uicb_viewprevtags(Display * disp,
int screen,
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
@ -305,7 +299,6 @@ uicb_viewprevtags(Display * disp,
*/ */
void void
uicb_tag_viewnext(Display *disp, uicb_tag_viewnext(Display *disp,
int screen,
DC * drawcontext, DC * drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
@ -322,7 +315,7 @@ uicb_tag_viewnext(Display *disp,
if(++firsttag >= awesomeconf->ntags) if(++firsttag >= awesomeconf->ntags)
firsttag = 0; firsttag = 0;
awesomeconf->selected_tags[firsttag] = True; awesomeconf->selected_tags[firsttag] = True;
saveawesomeprops(disp, screen, awesomeconf); saveawesomeprops(disp, awesomeconf->screen, awesomeconf);
arrange(disp, drawcontext, awesomeconf); arrange(disp, drawcontext, awesomeconf);
} }
@ -333,7 +326,6 @@ uicb_tag_viewnext(Display *disp,
*/ */
void void
uicb_tag_viewprev(Display *disp, uicb_tag_viewprev(Display *disp,
int screen __attribute__ ((unused)),
DC *drawcontext, DC *drawcontext,
awesome_config *awesomeconf, awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
@ -350,6 +342,6 @@ uicb_tag_viewprev(Display *disp,
if(--firsttag < 0) if(--firsttag < 0)
firsttag = awesomeconf->ntags - 1; firsttag = awesomeconf->ntags - 1;
awesomeconf->selected_tags[firsttag] = True; awesomeconf->selected_tags[firsttag] = True;
saveawesomeprops(disp, screen, awesomeconf); saveawesomeprops(disp, awesomeconf->screen, awesomeconf);
arrange(disp, drawcontext, 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 *, int, Bool *, int); Bool isvisible(Client *, int, 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 *, int, DC *, 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 *, int, DC *, 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 *, int, DC *, 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 *, int, DC *, 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 *, int, DC *, 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 *, int, DC *, awesome_config *, const char *); void uicb_viewprevtags(Display *, DC *, awesome_config *, const char *);
void uicb_tag_viewnext(Display *, int, DC *, 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 *, int, DC *, 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
{ {

3
util.c
View File

@ -54,7 +54,6 @@ eprint(const char *fmt, ...)
void void
uicb_spawn(Display * disp, uicb_spawn(Display * disp,
int screen,
DC *drawcontext __attribute__ ((unused)), DC *drawcontext __attribute__ ((unused)),
awesome_config * awesomeconf __attribute__ ((unused)), awesome_config * awesomeconf __attribute__ ((unused)),
const char *arg) const char *arg)
@ -73,7 +72,7 @@ uicb_spawn(Display * disp,
display = strdup(tmp); display = strdup(tmp);
if((tmp = strrchr(display, '.'))) if((tmp = strrchr(display, '.')))
*tmp = '\0'; *tmp = '\0';
snprintf(newdisplay, sizeof(newdisplay), "%s.%d", display, screen); snprintf(newdisplay, sizeof(newdisplay), "%s.%d", display, awesomeconf->screen);
setenv("DISPLAY", newdisplay, 1); setenv("DISPLAY", newdisplay, 1);
} }

2
util.h
View File

@ -120,7 +120,7 @@ static inline char *a_strdup(const char *s)
void die(const char *, ...) __attribute__ ((noreturn)) __attribute__ ((format(printf, 1, 2))); void die(const char *, ...) __attribute__ ((noreturn)) __attribute__ ((format(printf, 1, 2)));
void eprint(const char *, ...) __attribute__ ((noreturn)) __attribute__ ((format(printf, 1, 2))); void eprint(const char *, ...) __attribute__ ((noreturn)) __attribute__ ((format(printf, 1, 2)));
void uicb_spawn(Display *, int, DC *, awesome_config *, const char *); void uicb_spawn(Display *, DC *, awesome_config *, const char *);
Bool xgettextprop(Display *, Window, Atom, char *, unsigned int); Bool xgettextprop(Display *, Window, Atom, char *, unsigned int);
double compute_new_value_from_arg(const char *, double); double compute_new_value_from_arg(const char *, double);