From 77ec4219c97e7fa055af85ebe2768a4ee900a69f Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 16 Apr 2010 22:57:21 +0200 Subject: [PATCH] make floating an enum (we need three states, not only two) --- include/data.h | 8 ++++---- src/match.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/data.h b/include/data.h index 13ce08b4..bdfcbcc3 100644 --- a/include/data.h +++ b/include/data.h @@ -240,16 +240,16 @@ struct Match { char *instance; xcb_window_t id; Con *con_id; - bool floating; + enum { M_ANY = 0, M_TILING, M_FLOATING } floating; - enum { M_GLOBAL, M_OUTPUT, M_WORKSPACE } levels; + enum { M_GLOBAL = 0, M_OUTPUT, M_WORKSPACE } levels; - enum { M_USER, M_RESTART } source; + enum { M_USER = 0, M_RESTART } source; /* wo das fenster eingefügt werden soll. bei here wird es direkt * diesem Con zugewiesen, also layout saving. bei active ist es * ein assignment, welches an der momentan fokussierten stelle einfügt */ - enum { M_HERE, M_ACTIVE } insert_where; + enum { M_HERE = 0, M_ACTIVE } insert_where; TAILQ_ENTRY(Match) matches; }; diff --git a/src/match.c b/src/match.c index cdabdc3c..763a4e7e 100644 --- a/src/match.c +++ b/src/match.c @@ -18,7 +18,7 @@ bool match_is_empty(Match *match) { match->instance == NULL && match->id == XCB_NONE && match->con_id == NULL && - match->floating == false); + match->floating == M_ANY); } bool match_matches_window(Match *match, i3Window *window) {