diff --git a/awesome.c b/awesome.c index 07aaa4608..f801c8e42 100644 --- a/awesome.c +++ b/awesome.c @@ -50,7 +50,6 @@ static int (*xerrorxlib) (Display *, XErrorEvent *); static Bool running = True; - static inline void cleanup_buttons(Button *buttons) { diff --git a/client.c b/client.c index 0c07f428e..711dbac1c 100644 --- a/client.c +++ b/client.c @@ -601,7 +601,7 @@ tag_client_with_rules(Client *c, awesome_config *awesomeconf) c->tags[i] = False; if(!matched) - tag_client_with_current_selected(c, awesomeconf, c->screen); + tag_client_with_current_selected(c, &awesomeconf->screens[c->screen]); break; } } diff --git a/screen.c b/screen.c index f71386b08..cbd9cf64a 100644 --- a/screen.c +++ b/screen.c @@ -187,7 +187,7 @@ move_client_to_screen(Client *c, awesome_config *awesomeconf, int new_screen, Bo awesomeconf->screens[old_screen].tags[i].client_sel = NULL; /* tag client with new screen tags */ - tag_client_with_current_selected(c, awesomeconf, new_screen); + tag_client_with_current_selected(c, &awesomeconf->screens[new_screen]); c->screen = new_screen; diff --git a/tag.c b/tag.c index f71e141d4..5ce316677 100644 --- a/tag.c +++ b/tag.c @@ -50,13 +50,13 @@ isvisible(Client * c, int screen, Tag * tags, int ntags) } void -tag_client_with_current_selected(Client *c, awesome_config *awesomeconf, int screen) +tag_client_with_current_selected(Client *c, VirtScreen *screen) { int i; - p_realloc(&c->tags, awesomeconf->screens[screen].ntags); - for(i = 0; i < awesomeconf->screens[screen].ntags; i++) - c->tags[i] = awesomeconf->screens[screen].tags[i].selected; + p_realloc(&c->tags, screen->ntags); + for(i = 0; i < screen->ntags; i++) + c->tags[i] = screen->tags[i].selected; } /** Tag selected window with tag diff --git a/tag.h b/tag.h index 241621dfe..0818ab485 100644 --- a/tag.h +++ b/tag.h @@ -28,7 +28,7 @@ #define IS_TILED(client, screen, tags, ntags) (client && !client->isfloating && isvisible(client, screen, tags, ntags)) Bool isvisible(Client *, int, Tag *, int); -void tag_client_with_current_selected(Client *, awesome_config *, int); +void tag_client_with_current_selected(Client *, VirtScreen *); UICB_PROTO(uicb_client_tag); UICB_PROTO(uicb_client_togglefloating);