aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorRouven Czerwinski <rouven@czerwinskis.de>2018-10-10 11:28:37 +0200
committerRouven Czerwinski <rouven@czerwinskis.de>2018-10-10 12:45:21 +0200
commit41991542cac1d909a55fc834d231fe747097b1a4 (patch)
tree0e0eba7984d8e98b70c29159a2792ec1e39b9351 /sway/commands
parent87bc707e9b21a6b06c8aec2c0ff1e823abf9bda4 (diff)
downloadsway-41991542cac1d909a55fc834d231fe747097b1a4.tar.xz
Add mouse_warping container
This option always moves the cursor into the middle of the container if the warp variable is true in seat_set_focus_warp. Fixes #2577
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/mouse_warping.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/commands/mouse_warping.c b/sway/commands/mouse_warping.c
index eef32ce7..d067bc65 100644
--- a/sway/commands/mouse_warping.c
+++ b/sway/commands/mouse_warping.c
@@ -6,13 +6,15 @@ struct cmd_results *cmd_mouse_warping(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "mouse_warping", EXPECTED_EQUAL_TO, 1))) {
return error;
+ } else if (strcasecmp(argv[0], "container") == 0) {
+ config->mouse_warping = WARP_CONTAINER;
} else if (strcasecmp(argv[0], "output") == 0) {
- config->mouse_warping = true;
+ config->mouse_warping = WARP_OUTPUT;
} else if (strcasecmp(argv[0], "none") == 0) {
- config->mouse_warping = false;
+ config->mouse_warping = WARP_NO;
} else {
return cmd_results_new(CMD_FAILURE, "mouse_warping",
- "Expected 'mouse_warping output|none'");
+ "Expected 'mouse_warping output|container|none'");
}
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}