diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2020-04-10 18:32:56 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2020-04-11 15:13:51 +0200 |
commit | 08b25407f0ef32f7fdfdd25db1443dc22573d0cc (patch) | |
tree | aac5c847ab79b4c135e2daf3ce8b817524db2eac /src/match.c | |
parent | 1eb7cb248b9c0b8b9f4b3c82f030690b3586eaf5 (diff) | |
download | i3-orestisfl/A_I3_FLOATING_WINDOW.tar.gz i3-orestisfl/A_I3_FLOATING_WINDOW.zip |
use floating_from="auto" or "user" (and tiling_from) syntaxorestisfl/A_I3_FLOATING_WINDOW
Diffstat (limited to 'src/match.c')
-rw-r--r-- | src/match.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/match.c b/src/match.c index a4ef05a3..6ac312e5 100644 --- a/src/match.c +++ b/src/match.c @@ -395,25 +395,36 @@ void match_parse_property(Match *match, const char *ctype, const char *cvalue) { return; } - if (strcmp(ctype, "tiling_auto") == 0) { + if (strcmp(ctype, "tiling_from") == 0 && + cvalue != NULL && + strcmp(cvalue, "auto") == 0) { match->window_mode = WM_TILING_AUTO; return; } - if (strcmp(ctype, "tiling_user") == 0) { + + if (strcmp(ctype, "tiling_from") == 0 && + cvalue != NULL && + strcmp(cvalue, "user") == 0) { match->window_mode = WM_TILING_USER; return; } - if (strcmp(ctype, "floating_auto") == 0) { - match->window_mode = WM_FLOATING_AUTO; + + if (strcmp(ctype, "floating") == 0) { + match->window_mode = WM_FLOATING; return; } - if (strcmp(ctype, "floating_user") == 0) { - match->window_mode = WM_FLOATING_USER; + + if (strcmp(ctype, "floating_from") == 0 && + cvalue != NULL && + strcmp(cvalue, "auto") == 0) { + match->window_mode = WM_FLOATING_AUTO; return; } - if (strcmp(ctype, "floating") == 0) { - match->window_mode = WM_FLOATING; + if (strcmp(ctype, "floating_from") == 0 && + cvalue != NULL && + strcmp(cvalue, "user") == 0) { + match->window_mode = WM_FLOATING_USER; return; } |