define RULE_NOSCREEN -1

This commit is contained in:
Julien Danjou 2007-11-12 19:35:31 +01:00
parent 9f21fb3c9e
commit adcadddc46
4 changed files with 5 additions and 3 deletions

View file

@ -363,7 +363,7 @@ client_manage(Window w, XWindowAttributes *wa, awesome_config *awesomeconf)
/* rearrange to display new window */
arrange(awesomeconf);
if(newscreen != -1)
if(newscreen != RULE_NOSCREEN)
arrange(&awesomeconf[newscreen - awesomeconf->screen]);
}

View file

@ -283,7 +283,7 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf)
CFG_STR((char *) "name", (char *) "", CFGF_NONE),
CFG_STR((char *) "tags", (char *) "", CFGF_NONE),
CFG_BOOL((char *) "float", cfg_false, CFGF_NONE),
CFG_INT((char *) "screen", -1, CFGF_NONE),
CFG_INT((char *) "screen", RULE_NOSCREEN, CFGF_NONE),
CFG_END()
};
static cfg_opt_t rules_opts[] =

2
tag.c
View file

@ -58,7 +58,7 @@ applyrules(Client *c, awesome_config *awesomeconf)
}
else
c->tags[j] = False;
if(r->screen != -1 && r->screen != awesomeconf->screen)
if(r->screen != RULE_NOSCREEN && r->screen != awesomeconf->screen)
{
screen = r->screen;
move_client_to_screen(c, &awesomeconf[r->screen - awesomeconf->screen], True);

2
tag.h
View file

@ -24,6 +24,8 @@
#include "client.h"
#define RULE_NOSCREEN -1
/** Check if a client is tiled */
#define IS_TILED(client, screen, tags, ntags) (client && !client->isfloating && isvisible(client, screen, tags, ntags))