aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.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/main.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/main.c')
-rw-r--r--sway/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sway/main.c b/sway/main.c
index 1d772b48..1a55b519 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -20,6 +20,7 @@
20#include "sway/commands.h" 20#include "sway/commands.h"
21#include "sway/config.h" 21#include "sway/config.h"
22#include "sway/debug.h" 22#include "sway/debug.h"
23#include "sway/desktop/transaction.h"
23#include "sway/server.h" 24#include "sway/server.h"
24#include "sway/tree/layout.h" 25#include "sway/tree/layout.h"
25#include "sway/ipc-server.h" 26#include "sway/ipc-server.h"
@@ -441,6 +442,7 @@ int main(int argc, char **argv) {
441 free(line); 442 free(line);
442 list_del(config->cmd_queue, 0); 443 list_del(config->cmd_queue, 0);
443 } 444 }
445 transaction_commit_dirty();
444 446
445 if (!terminate_request) { 447 if (!terminate_request) {
446 server_run(&server); 448 server_run(&server);