From 0ca229ceb3d53067ebe1b0fff5c3e67f54bb608c Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 8 Jul 2011 00:17:48 +0200 Subject: [PATCH] migrate-config: also make force_focus_wrapping a v4-only statement --- i3-migrate-config-to-v4.pl | 4 +++- src/cfgparse.y | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/i3-migrate-config-to-v4.pl b/i3-migrate-config-to-v4.pl index eee730d1..02981457 100755 --- a/i3-migrate-config-to-v4.pl +++ b/i3-migrate-config-to-v4.pl @@ -60,7 +60,9 @@ sub need_to_convert { for my $line (@lines) { # only v4 configfiles can use bindcode or workspace_layout - return 0 if $line =~ /^bindcode/ || $line =~ /^workspace_layout/; + return 0 if $line =~ /^bindcode/ || + $line =~ /^workspace_layout/ || + $line =~ /^force_focus_wrapping/; # have a look at bindings next unless $line =~ /^bind/; diff --git a/src/cfgparse.y b/src/cfgparse.y index 42438893..83d95fc5 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -65,6 +65,7 @@ static int detect_version(char *buf) { /* check for some v4-only statements */ if (strncasecmp(line, "bindcode", strlen("bindcode")) == 0 || + strncasecmp(line, "force_focus_wrapping", strlen("force_focus_wrapping")) == 0 || strncasecmp(line, "# i3 config file (v4)", strlen("# i3 config file (v4)")) == 0 || strncasecmp(line, "workspace_layout", strlen("workspace_layout")) == 0) { printf("deciding for version 4 due to this line: %.*s\n", (int)(walk-line), line);