mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
remove checks for command handlers
This commit is contained in:
parent
5b219a1598
commit
7262bf655f
5 changed files with 0 additions and 37 deletions
|
|
@ -33,20 +33,6 @@ static bool parse_movement_direction(const char *name, enum movement_direction *
|
|||
struct cmd_results *cmd_focus(int argc, char **argv) {
|
||||
swayc_t *con = config->handler_context.current_container;
|
||||
struct sway_seat *seat = config->handler_context.seat;
|
||||
|
||||
if (!sway_assert(seat, "'focus' command called without seat context")) {
|
||||
return cmd_results_new(CMD_FAILURE, "focus",
|
||||
"Command 'focus' called without seat context (this is a bug in sway)");
|
||||
}
|
||||
|
||||
if (config->reading) {
|
||||
return cmd_results_new(CMD_FAILURE, "focus",
|
||||
"Command 'focus' cannot be used in the config file");
|
||||
}
|
||||
if (con == NULL) {
|
||||
wlr_log(L_DEBUG, "no container to focus");
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
if (con->type < C_WORKSPACE) {
|
||||
return cmd_results_new(CMD_FAILURE, "focus",
|
||||
"Command 'focus' cannot be used above the workspace level");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue