rework IS_TILED with screen

This commit is contained in:
Julien Danjou 2007-09-16 12:23:07 +02:00
parent ab75756d62
commit a010212f97
4 changed files with 10 additions and 6 deletions

View File

@ -38,10 +38,14 @@ arrange(Display * disp, int screen, DC *drawcontext, awesome_config *awesomeconf
Client *c; Client *c;
for(c = clients; c; c = c->next) for(c = clients; c; c = c->next)
{
if(c->screen != screen)
continue;
if(isvisible(c, awesomeconf->selected_tags, awesomeconf->ntags)) if(isvisible(c, awesomeconf->selected_tags, awesomeconf->ntags))
unban(c); unban(c);
else else
ban(c); ban(c);
}
awesomeconf->current_layout->arrange(disp, screen, awesomeconf); awesomeconf->current_layout->arrange(disp, screen, awesomeconf);
focus(disp, screen, drawcontext, NULL, True, awesomeconf); focus(disp, screen, drawcontext, NULL, True, awesomeconf);
restack(disp, screen, drawcontext, 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) 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; continue;
XConfigureWindow(disp, c->win, CWSibling | CWStackMode, &wc); XConfigureWindow(disp, c->win, CWSibling | CWStackMode, &wc);
wc.sibling = c->win; wc.sibling = c->win;

View File

@ -38,12 +38,12 @@ fibonacci(Display *disp, int screen, awesome_config *awesomeconf, int shape)
nw = get_windows_area_width(disp, awesomeconf->statusbar); nw = get_windows_area_width(disp, awesomeconf->statusbar);
nh = get_windows_area_height(disp, awesomeconf->statusbar); nh = get_windows_area_height(disp, awesomeconf->statusbar);
for(n = 0, c = clients; c; c = c->next) 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++; n++;
for(i = 0, c = clients; c; c = c->next) for(i = 0, c = clients; c; c = c->next)
{ {
if(c->screen != screen) if(!IS_TILED(c, screen, awesomeconf->selected_tags, awesomeconf->ntags))
continue; continue;
c->ismax = False; c->ismax = False;

View File

@ -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); screens_info = get_screen_info(disp, screen, awesomeconf->statusbar, &screen_numbers);
for(n = 0, c = clients; c; c = c->next) 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++; n++;
for(i = 0, c = clients; c; c = c->next) 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; continue;
if(use_screen == -1 if(use_screen == -1

2
tag.h
View File

@ -26,7 +26,7 @@
#include "client.h" #include "client.h"
/** Check if a client is tiled */ /** 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 */ void compileregs(Rule *, int); /* initialize regexps of rules defined in config.h */
Bool isvisible(Client *, Bool *, int); Bool isvisible(Client *, Bool *, int);