diff --git a/layout.c b/layout.c index 1331026f..52133bbf 100644 --- a/layout.c +++ b/layout.c @@ -38,10 +38,14 @@ arrange(Display * disp, int screen, DC *drawcontext, awesome_config *awesomeconf Client *c; for(c = clients; c; c = c->next) + { + if(c->screen != screen) + continue; if(isvisible(c, awesomeconf->selected_tags, awesomeconf->ntags)) unban(c); else ban(c); + } awesomeconf->current_layout->arrange(disp, screen, awesomeconf); focus(disp, screen, drawcontext, NULL, True, awesomeconf); restack(disp, screen, drawcontext, awesomeconf); @@ -130,7 +134,7 @@ restack(Display * disp, int screen, DC * drawcontext, awesome_config *awesomecon } for(c = clients; c; c = c->next) { - if(!IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags) || c == sel) + if(!IS_TILED(c, screen, awesomeconf->selected_tags, awesomeconf->ntags) || c == sel) continue; XConfigureWindow(disp, c->win, CWSibling | CWStackMode, &wc); wc.sibling = c->win; diff --git a/layouts/spiral.c b/layouts/spiral.c index a87621c4..9836d291 100644 --- a/layouts/spiral.c +++ b/layouts/spiral.c @@ -38,12 +38,12 @@ fibonacci(Display *disp, int screen, awesome_config *awesomeconf, int shape) nw = get_windows_area_width(disp, awesomeconf->statusbar); nh = get_windows_area_height(disp, awesomeconf->statusbar); for(n = 0, c = clients; c; c = c->next) - if(IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags) && c->screen == screen) + if(IS_TILED(c, screen, awesomeconf->selected_tags, awesomeconf->ntags)) n++; for(i = 0, c = clients; c; c = c->next) { - if(c->screen != screen) + if(!IS_TILED(c, screen, awesomeconf->selected_tags, awesomeconf->ntags)) continue; c->ismax = False; diff --git a/layouts/tile.c b/layouts/tile.c index d464cb95..949395eb 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -99,12 +99,12 @@ _tile(Display *disp, int screen, awesome_config *awesomeconf, const Bool right) screens_info = get_screen_info(disp, screen, awesomeconf->statusbar, &screen_numbers); for(n = 0, c = clients; c; c = c->next) - if(IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags) && c->screen == screen) + if(IS_TILED(c, screen, awesomeconf->selected_tags, awesomeconf->ntags)) n++; for(i = 0, c = clients; c; c = c->next) { - if(!IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags) || c->screen != screen) + if(!IS_TILED(c, screen, awesomeconf->selected_tags, awesomeconf->ntags)) continue; if(use_screen == -1 diff --git a/tag.h b/tag.h index f8dd5aa3..9d19888a 100644 --- a/tag.h +++ b/tag.h @@ -26,7 +26,7 @@ #include "client.h" /** Check if a client is tiled */ -#define IS_TILED(client, tags, ntags) (client && !client->isfloating && isvisible(client, tags, ntags)) +#define IS_TILED(client, screen, tags, ntags) (client && !client->isfloating && isvisible(client, tags, ntags) && client->screen == screen) void compileregs(Rule *, int); /* initialize regexps of rules defined in config.h */ Bool isvisible(Client *, Bool *, int);