aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/transaction.c
diff options
context:
space:
mode:
authorAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-03-04 20:38:04 -0500
committerKirill Primak <vyivel@eclair.cafe>2024-01-18 18:36:54 +0300
commit08c484f46f130aa7e590ef4bcb39d2ceed7160f6 (patch)
tree99e5ce939c0defaa53ead587545cb13559a518b0 /sway/desktop/transaction.c
parent6d7b1321db54155cf78305dbafdcfc7de9b78415 (diff)
transaction: ready signals will return success bools
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r--sway/desktop/transaction.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index 6947e138..bb725795 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -499,16 +499,18 @@ static void set_instruction_ready(
transaction_progress();
}
-void transaction_notify_view_ready_by_serial(struct sway_view *view,
+bool transaction_notify_view_ready_by_serial(struct sway_view *view,
uint32_t serial) {
struct sway_transaction_instruction *instruction =
view->container->node.instruction;
if (instruction != NULL && instruction->serial == serial) {
set_instruction_ready(instruction);
+ return true;
}
+ return false;
}
-void transaction_notify_view_ready_by_geometry(struct sway_view *view,
+bool transaction_notify_view_ready_by_geometry(struct sway_view *view,
double x, double y, int width, int height) {
struct sway_transaction_instruction *instruction =
view->container->node.instruction;
@@ -518,7 +520,9 @@ void transaction_notify_view_ready_by_geometry(struct sway_view *view,
instruction->container_state.content_width == width &&
instruction->container_state.content_height == height) {
set_instruction_ready(instruction);
+ return true;
}
+ return false;
}
static void _transaction_commit_dirty(bool server_request) {