summaryrefslogtreecommitdiffstats
path: root/sway/commands/input/click_method.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2017-11-18 11:22:02 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2017-11-18 11:22:02 -0500
commit733993a651c71f7e2198d505960d6bbd31e0e107 (patch)
treee51732c5872b624e73355f9e5b3f762101f3cd0d /sway/commands/input/click_method.c
parentInitial (awful) pass on xdg shell support (diff)
downloadsway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.gz
sway-733993a651c71f7e2198d505960d6bbd31e0e107.tar.zst
sway-733993a651c71f7e2198d505960d6bbd31e0e107.zip
Move everything to sway/old/
Diffstat (limited to 'sway/commands/input/click_method.c')
-rw-r--r--sway/commands/input/click_method.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/sway/commands/input/click_method.c b/sway/commands/input/click_method.c
deleted file mode 100644
index 5e9d3dcb..00000000
--- a/sway/commands/input/click_method.c
+++ /dev/null
@@ -1,30 +0,0 @@
1#include <string.h>
2#include <strings.h>
3#include "sway/commands.h"
4#include "sway/input.h"
5#include "log.h"
6
7struct cmd_results *input_cmd_click_method(int argc, char **argv) {
8 sway_log(L_DEBUG, "click_method for device: %d %s", current_input_config==NULL, current_input_config->identifier);
9 struct cmd_results *error = NULL;
10 if ((error = checkarg(argc, "click_method", EXPECTED_AT_LEAST, 1))) {
11 return error;
12 }
13 if (!current_input_config) {
14 return cmd_results_new(CMD_FAILURE, "click_method", "No input device defined.");
15 }
16 struct input_config *new_config = new_input_config(current_input_config->identifier);
17
18 if (strcasecmp(argv[0], "none") == 0) {
19 new_config->click_method = LIBINPUT_CONFIG_CLICK_METHOD_NONE;
20 } else if (strcasecmp(argv[0], "button_areas") == 0) {
21 new_config->click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
22 } else if (strcasecmp(argv[0], "clickfinger") == 0) {
23 new_config->click_method = LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
24 } else {
25 return cmd_results_new(CMD_INVALID, "click_method", "Expected 'click_method <none|button_areas|clickfinger'");
26 }
27
28 input_cmd_apply(new_config);
29 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
30}