mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
bindings: defer while initiailizing
This adds the logic to defer binding execution while sway is still initializing. Without this, the binding command would be executed, but the command handler would return CMD_DEFER, which was being treated as a failure to run. To avoid partial executions, this will defer all bindings while config->active is false.
This commit is contained in:
parent
2b5bf78faf
commit
9670ccee68
6 changed files with 47 additions and 2 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "sway/config.h"
|
||||
#include "sway/server.h"
|
||||
#include "sway/swaynag.h"
|
||||
#include "sway/desktop/transaction.h"
|
||||
#include "sway/tree/root.h"
|
||||
#include "sway/ipc-server.h"
|
||||
#include "ipc-client.h"
|
||||
|
|
@ -389,6 +390,8 @@ int main(int argc, char **argv) {
|
|||
config->active = true;
|
||||
load_swaybars();
|
||||
run_deferred_commands();
|
||||
run_deferred_bindings();
|
||||
transaction_commit_dirty();
|
||||
|
||||
if (config->swaynag_config_errors.client != NULL) {
|
||||
swaynag_show(&config->swaynag_config_errors);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue