diff options
Diffstat (limited to 'sway')
-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, | |||
501 | uint32_t serial) { | 501 | uint32_t serial) { |
502 | struct sway_transaction_instruction *instruction = | 502 | struct sway_transaction_instruction *instruction = |
503 | view->container->node.instruction; | 503 | view->container->node.instruction; |
504 | if (instruction->serial == serial) { | 504 | if (instruction != NULL && instruction->serial == serial) { |
505 | set_instruction_ready(instruction); | 505 | set_instruction_ready(instruction); |
506 | } | 506 | } |
507 | } | 507 | } |
@@ -510,7 +510,8 @@ void transaction_notify_view_ready_by_size(struct sway_view *view, | |||
510 | int width, int height) { | 510 | int width, int height) { |
511 | struct sway_transaction_instruction *instruction = | 511 | struct sway_transaction_instruction *instruction = |
512 | view->container->node.instruction; | 512 | view->container->node.instruction; |
513 | if (instruction->container_state.content_width == width && | 513 | if (instruction != NULL && |
514 | instruction->container_state.content_width == width && | ||
514 | instruction->container_state.content_height == height) { | 515 | instruction->container_state.content_height == height) { |
515 | set_instruction_ready(instruction); | 516 | set_instruction_ready(instruction); |
516 | } | 517 | } |
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) { | |||
293 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); | 293 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); |
294 | desktop_damage_view(view); | 294 | desktop_damage_view(view); |
295 | transaction_commit_dirty(); | 295 | transaction_commit_dirty(); |
296 | transaction_notify_view_ready_by_size(view, | ||
297 | new_geo.width, new_geo.height); | ||
296 | } else { | 298 | } else { |
297 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); | 299 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); |
298 | } | 300 | } |
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) { | |||
383 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); | 383 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); |
384 | desktop_damage_view(view); | 384 | desktop_damage_view(view); |
385 | transaction_commit_dirty(); | 385 | transaction_commit_dirty(); |
386 | transaction_notify_view_ready_by_size(view, | ||
387 | new_geo.width, new_geo.height); | ||
386 | } else { | 388 | } else { |
387 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); | 389 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); |
388 | } | 390 | } |