mirror of
https://github.com/swaywm/sway.git
synced 2026-04-01 07:16:02 -04:00
Deny several commands when there's no outputs connected
This commit is contained in:
parent
ea2497d35c
commit
885963f11f
13 changed files with 52 additions and 0 deletions
|
|
@ -15,6 +15,10 @@ struct cmd_results *cmd_floating(int argc, char **argv) {
|
|||
if ((error = checkarg(argc, "floating", EXPECTED_EQUAL_TO, 1))) {
|
||||
return error;
|
||||
}
|
||||
if (!root->outputs->length) {
|
||||
return cmd_results_new(CMD_INVALID, "floating",
|
||||
"Can't run this command while there's no outputs connected.");
|
||||
}
|
||||
struct sway_container *container = config->handler_context.container;
|
||||
struct sway_workspace *workspace = config->handler_context.workspace;
|
||||
if (!container && workspace->tiling->length == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue