From 5f811b1cf2bc86c622a8e1cddcd09cebf25b145d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 13 Dec 2007 10:46:32 +0100 Subject: [PATCH] use VirtScreen arg for tag_client_with_current_selected() --- awesome.c | 1 - client.c | 2 +- screen.c | 2 +- tag.c | 8 ++++---- tag.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/awesome.c b/awesome.c index 07aaa460..f801c8e4 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 0c07f428..711dbac1 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 f71386b0..cbd9cf64 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 f71e141d..5ce31667 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 241621df..0818ab48 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);