mirror of
https://github.com/swaywm/sway.git
synced 2025-11-23 06:59:48 -05:00
transaction: ready signals will return success bools
This commit is contained in:
parent
6d7b1321db
commit
08c484f46f
2 changed files with 15 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue