From: Michael Stapelberg Date: Fri, 16 Apr 2010 20:57:21 +0000 (+0200) Subject: make floating an enum (we need three states, not only two) X-Git-Tag: tree-pr1~248 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=77ec4219c97e7fa055af85ebe2768a4ee900a69f;p=i3%2Fi3 make floating an enum (we need three states, not only two) --- 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) {