aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-15 15:20:21 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-15 22:08:26 +1000
commita120d4c79f9406a2f7cc38c60069d3183c98ea87 (patch)
tree87a568ff97fc94ca82b9ceb4abacb02ea86a9f71 /sway/commands.c
parentMerge pull request #2272 from RyanDwyer/simplify-transactions (diff)
downloadsway-a120d4c79f9406a2f7cc38c60069d3183c98ea87.tar.gz
sway-a120d4c79f9406a2f7cc38c60069d3183c98ea87.tar.zst
sway-a120d4c79f9406a2f7cc38c60069d3183c98ea87.zip
Make focus part of transactions
Rather than maintain copies of the entire focus stack, this PR transactionises the focus by introducing two new properties to the container state and using those when rendering. * `bool focused` means this container has actual focus. Only one container should have this equalling true in its current state. * `struct sway_container *focus_inactive_child` points to the immediate child that was most recently focused (eg. for tabbed and stacked containers).
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 50d949d4..addd64a6 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -9,7 +9,6 @@
9#include "sway/commands.h" 9#include "sway/commands.h"
10#include "sway/config.h" 10#include "sway/config.h"
11#include "sway/criteria.h" 11#include "sway/criteria.h"
12#include "sway/desktop/transaction.h"
13#include "sway/security.h" 12#include "sway/security.h"
14#include "sway/input/input-manager.h" 13#include "sway/input/input-manager.h"
15#include "sway/input/seat.h" 14#include "sway/input/seat.h"
@@ -323,7 +322,6 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) {
323cleanup: 322cleanup:
324 free(exec); 323 free(exec);
325 free(views); 324 free(views);
326 transaction_commit_dirty();
327 if (!results) { 325 if (!results) {
328 results = cmd_results_new(CMD_SUCCESS, NULL, NULL); 326 results = cmd_results_new(CMD_SUCCESS, NULL, NULL);
329 } 327 }