diff options
author | 2019-01-14 11:44:18 -0500 | |
---|---|---|
committer | 2019-01-14 11:44:18 -0500 | |
commit | 15cd8b6a86295a445a1037afd0028b1226a14c82 (patch) | |
tree | 56332b9c150459beb5aef94605372ef179ec8854 /sway/commands/input/events.c | |
parent | Merge pull request #3418 from RyanDwyer/remove-resize-axis (diff) | |
parent | Remove now-unused "input" argument of cmd_results_new (diff) | |
download | sway-15cd8b6a86295a445a1037afd0028b1226a14c82.tar.gz sway-15cd8b6a86295a445a1037afd0028b1226a14c82.tar.zst sway-15cd8b6a86295a445a1037afd0028b1226a14c82.zip |
Merge pull request #3403 from mstoeckl/ipcleanup
Remove 'input' field of IPC command return json
Diffstat (limited to 'sway/commands/input/events.c')
-rw-r--r-- | sway/commands/input/events.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sway/commands/input/events.c b/sway/commands/input/events.c index 69f46269..2c6505d8 100644 --- a/sway/commands/input/events.c +++ b/sway/commands/input/events.c | |||
@@ -71,8 +71,7 @@ struct cmd_results *input_cmd_events(int argc, char **argv) { | |||
71 | } | 71 | } |
72 | struct input_config *ic = config->handler_context.input_config; | 72 | struct input_config *ic = config->handler_context.input_config; |
73 | if (!ic) { | 73 | if (!ic) { |
74 | return cmd_results_new(CMD_FAILURE, "events", | 74 | return cmd_results_new(CMD_FAILURE, "No input device defined."); |
75 | "No input device defined."); | ||
76 | } | 75 | } |
77 | 76 | ||
78 | if (strcasecmp(argv[0], "enabled") == 0) { | 77 | if (strcasecmp(argv[0], "enabled") == 0) { |
@@ -83,7 +82,7 @@ struct cmd_results *input_cmd_events(int argc, char **argv) { | |||
83 | ic->send_events = | 82 | ic->send_events = |
84 | LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE; | 83 | LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE; |
85 | } else if (config->reading) { | 84 | } else if (config->reading) { |
86 | return cmd_results_new(CMD_INVALID, "events", | 85 | return cmd_results_new(CMD_INVALID, |
87 | "Expected 'events <enabled|disabled|disabled_on_external_mouse>'"); | 86 | "Expected 'events <enabled|disabled|disabled_on_external_mouse>'"); |
88 | } else if (strcasecmp(argv[0], "toggle") == 0) { | 87 | } else if (strcasecmp(argv[0], "toggle") == 0) { |
89 | if (strcmp(ic->identifier, "*") == 0) { | 88 | if (strcmp(ic->identifier, "*") == 0) { |
@@ -97,10 +96,10 @@ struct cmd_results *input_cmd_events(int argc, char **argv) { | |||
97 | toggle_send_events(ic); | 96 | toggle_send_events(ic); |
98 | } | 97 | } |
99 | } else { | 98 | } else { |
100 | return cmd_results_new(CMD_INVALID, "events", | 99 | return cmd_results_new(CMD_INVALID, |
101 | "Expected 'events <enabled|disabled|disabled_on_external_mouse|" | 100 | "Expected 'events <enabled|disabled|disabled_on_external_mouse|" |
102 | "toggle>'"); | 101 | "toggle>'"); |
103 | } | 102 | } |
104 | 103 | ||
105 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 104 | return cmd_results_new(CMD_SUCCESS, NULL); |
106 | } | 105 | } |