diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-02-24 13:22:57 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-02-24 13:22:57 -0500 |
commit | 7262bf655f7a19af1d4c8681be74d70bfc6b8911 (patch) | |
tree | 2f949def2ad25fff6e642fcbd30d8c9d2bc8db21 /sway/commands/focus.c | |
parent | separate config directives and commands (diff) | |
download | sway-7262bf655f7a19af1d4c8681be74d70bfc6b8911.tar.gz sway-7262bf655f7a19af1d4c8681be74d70bfc6b8911.tar.zst sway-7262bf655f7a19af1d4c8681be74d70bfc6b8911.zip |
remove checks for command handlers
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r-- | sway/commands/focus.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index ba47d1e1..f1a8078f 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c | |||
@@ -33,20 +33,6 @@ static bool parse_movement_direction(const char *name, enum movement_direction * | |||
33 | struct cmd_results *cmd_focus(int argc, char **argv) { | 33 | struct cmd_results *cmd_focus(int argc, char **argv) { |
34 | swayc_t *con = config->handler_context.current_container; | 34 | swayc_t *con = config->handler_context.current_container; |
35 | struct sway_seat *seat = config->handler_context.seat; | 35 | struct sway_seat *seat = config->handler_context.seat; |
36 | |||
37 | if (!sway_assert(seat, "'focus' command called without seat context")) { | ||
38 | return cmd_results_new(CMD_FAILURE, "focus", | ||
39 | "Command 'focus' called without seat context (this is a bug in sway)"); | ||
40 | } | ||
41 | |||
42 | if (config->reading) { | ||
43 | return cmd_results_new(CMD_FAILURE, "focus", | ||
44 | "Command 'focus' cannot be used in the config file"); | ||
45 | } | ||
46 | if (con == NULL) { | ||
47 | wlr_log(L_DEBUG, "no container to focus"); | ||
48 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | ||
49 | } | ||
50 | if (con->type < C_WORKSPACE) { | 36 | if (con->type < C_WORKSPACE) { |
51 | return cmd_results_new(CMD_FAILURE, "focus", | 37 | return cmd_results_new(CMD_FAILURE, "focus", |
52 | "Command 'focus' cannot be used above the workspace level"); | 38 | "Command 'focus' cannot be used above the workspace level"); |