mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
Merge pull request #2975 from RyanDwyer/deny-commands-when-no-outputs
Deny several commands when there's no outputs connected
This commit is contained in:
commit
51ad2676d0
13 changed files with 52 additions and 0 deletions
|
|
@ -224,6 +224,10 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
|
|||
if (config->reading || !config->active) {
|
||||
return cmd_results_new(CMD_DEFER, NULL, NULL);
|
||||
}
|
||||
if (!root->outputs->length) {
|
||||
return cmd_results_new(CMD_INVALID, "focus",
|
||||
"Can't run this command while there's no outputs connected.");
|
||||
}
|
||||
struct sway_node *node = config->handler_context.node;
|
||||
struct sway_container *container = config->handler_context.container;
|
||||
struct sway_workspace *workspace = config->handler_context.workspace;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue