use VirtScreen arg for tag_client_with_current_selected()

This commit is contained in:
Julien Danjou 2007-12-13 10:46:32 +01:00
parent 5cbaaac719
commit 5f811b1cf2
5 changed files with 7 additions and 8 deletions

View File

@ -50,7 +50,6 @@
static int (*xerrorxlib) (Display *, XErrorEvent *);
static Bool running = True;
static inline void
cleanup_buttons(Button *buttons)
{

View File

@ -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;
}
}

View File

@ -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;

8
tag.c
View File

@ -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

2
tag.h
View File

@ -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);