diff options
-rw-r--r-- | sway/desktop/transaction.c | 5 | ||||
-rw-r--r-- | sway/desktop/xdg_shell.c | 2 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 7b9ab586..2b268e2c 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c @@ -501,7 +501,7 @@ void transaction_notify_view_ready_by_serial(struct sway_view *view, uint32_t serial) { struct sway_transaction_instruction *instruction = view->container->node.instruction; - if (instruction->serial == serial) { + if (instruction != NULL && instruction->serial == serial) { set_instruction_ready(instruction); } } @@ -510,7 +510,8 @@ void transaction_notify_view_ready_by_size(struct sway_view *view, int width, int height) { struct sway_transaction_instruction *instruction = view->container->node.instruction; - if (instruction->container_state.content_width == width && + if (instruction != NULL && + instruction->container_state.content_width == width && instruction->container_state.content_height == height) { set_instruction_ready(instruction); } diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 2bf026f7..df751ef6 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -293,6 +293,8 @@ static void handle_commit(struct wl_listener *listener, void *data) { memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); desktop_damage_view(view); transaction_commit_dirty(); + transaction_notify_view_ready_by_size(view, + new_geo.width, new_geo.height); } else { memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); } diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 743e85bc..c972fd3a 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -383,6 +383,8 @@ static void handle_commit(struct wl_listener *listener, void *data) { memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); desktop_damage_view(view); transaction_commit_dirty(); + transaction_notify_view_ready_by_size(view, + new_geo.width, new_geo.height); } else { memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); } |