From a120d4c79f9406a2f7cc38c60069d3183c98ea87 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 15 Jul 2018 15:20:21 +1000 Subject: 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). --- sway/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sway/main.c') 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 @@ #include "sway/commands.h" #include "sway/config.h" #include "sway/debug.h" +#include "sway/desktop/transaction.h" #include "sway/server.h" #include "sway/tree/layout.h" #include "sway/ipc-server.h" @@ -441,6 +442,7 @@ int main(int argc, char **argv) { free(line); list_del(config->cmd_queue, 0); } + transaction_commit_dirty(); if (!terminate_request) { server_run(&server); -- cgit v1.2.3-54-g00ecf