]> git.sur5r.net Git - i3/i3/commit - src/commands_parser.c
Refactor the interface of commands.c
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 7 Feb 2012 22:38:21 +0000 (17:38 -0500)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 15 Feb 2012 20:57:25 +0000 (20:57 +0000)
commite114b3dba2485606cf5a3d044c0de8430c9f80b4
tree093c680b207c504d5039157aabec690781a63ad2
parent58ecd1490088da428e89ce732c583cb8cefaf320
Refactor the interface of commands.c

This change has two implications:

1) tree_render() will now be called precisely once for input which consists of
   multiple commands (like "focus left; focus right"). Also, the caller of
   parse_command() has to call it. This makes us able to fix tickets such as
   ticket #608 (where multiple tree_render() calls are noticable).

2) The output of a command is now a JSON array of return values of the
   individual subcommands. In the case of "focus left; focus right", this is:

   [{"success":true}, {"success":true}]

   While this is incompatible with what i3 returned before, the return value of
   commands was undocumented and therefore not subject to our API stability.
generate-command-parser.pl
include/commands.h
include/commands_parser.h
src/assignments.c
src/commands.c
src/commands_parser.c
src/handlers.c
src/ipc.c
testcases/lib/i3test.pm