diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-06-30 14:09:32 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-07-02 09:29:16 +0900 |
commit | 072b334abc6f065080bf944767bbd53d7a590e47 (patch) | |
tree | 113617af8597e174182e4c11736cbb912d151c03 /sway/desktop/transaction.c | |
parent | Add idle inhibit unstable v1 support (diff) | |
download | sway-072b334abc6f065080bf944767bbd53d7a590e47.tar.gz sway-072b334abc6f065080bf944767bbd53d7a590e47.tar.zst sway-072b334abc6f065080bf944767bbd53d7a590e47.zip |
idle_inhibit: stop inhibitor when views become invisible
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r-- | sway/desktop/transaction.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index d2932c87..7050d70c 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <wlr/types/wlr_buffer.h> | 6 | #include <wlr/types/wlr_buffer.h> |
7 | #include <wlr/types/wlr_linux_dmabuf.h> | 7 | #include <wlr/types/wlr_linux_dmabuf.h> |
8 | #include "sway/debug.h" | 8 | #include "sway/debug.h" |
9 | #include "sway/desktop/idle_inhibit_v1.h" | ||
9 | #include "sway/desktop/transaction.h" | 10 | #include "sway/desktop/transaction.h" |
10 | #include "sway/output.h" | 11 | #include "sway/output.h" |
11 | #include "sway/tree/container.h" | 12 | #include "sway/tree/container.h" |
@@ -245,6 +246,7 @@ static void transaction_progress_queue() { | |||
245 | transaction_destroy(transaction); | 246 | transaction_destroy(transaction); |
246 | } | 247 | } |
247 | server.transactions->length = 0; | 248 | server.transactions->length = 0; |
249 | idle_inhibit_v1_check_active(&server); | ||
248 | } | 250 | } |
249 | 251 | ||
250 | static int handle_timeout(void *data) { | 252 | static int handle_timeout(void *data) { |
@@ -320,6 +322,7 @@ void transaction_commit(struct sway_transaction *transaction) { | |||
320 | wlr_log(L_DEBUG, "Transaction %p has nothing to wait for", transaction); | 322 | wlr_log(L_DEBUG, "Transaction %p has nothing to wait for", transaction); |
321 | transaction_apply(transaction); | 323 | transaction_apply(transaction); |
322 | transaction_destroy(transaction); | 324 | transaction_destroy(transaction); |
325 | idle_inhibit_v1_check_active(&server); | ||
323 | return; | 326 | return; |
324 | } | 327 | } |
325 | 328 | ||