aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/input/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/input/events.c')
-rw-r--r--sway/commands/input/events.c9
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}