From adcadddc46317acdfcf626facd5dd743c08c895a Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 12 Nov 2007 19:35:31 +0100 Subject: [PATCH] define RULE_NOSCREEN -1 --- client.c | 2 +- config.c | 2 +- tag.c | 2 +- tag.h | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client.c b/client.c index 8c99d6c00..c97571615 100644 --- a/client.c +++ b/client.c @@ -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]); } diff --git a/config.c b/config.c index 4c0edf876..9a85591c0 100644 --- a/config.c +++ b/config.c @@ -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[] = diff --git a/tag.c b/tag.c index 75d7be832..4535ee03a 100644 --- a/tag.c +++ b/tag.c @@ -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); diff --git a/tag.h b/tag.h index 2ae039fb7..0c410304d 100644 --- a/tag.h +++ b/tag.h @@ -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))