diff options
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 17 | ||||
-rw-r--r-- | sway/desktop/wl_shell.c | 2 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 2 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 2 |
4 files changed, 16 insertions, 7 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 47461736..907ad6c9 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -784,8 +784,8 @@ void output_damage_surface(struct sway_output *output, double ox, double oy, damage_surface_iterator, &data); } -void output_damage_view(struct sway_output *output, struct sway_view *view, - bool whole) { +static void output_damage_view(struct sway_output *output, + struct sway_view *view, bool whole) { if (!sway_assert(view->swayc != NULL, "expected a view in the tree")) { return; } @@ -805,6 +805,11 @@ void output_damage_view(struct sway_output *output, struct sway_view *view, damage_surface_iterator, &data); } +void output_damage_from_view(struct sway_output *output, + struct sway_view *view) { + output_damage_view(output, view, false); +} + static void output_damage_whole_container_iterator(struct sway_container *con, void *data) { struct sway_output *output = data; @@ -827,8 +832,12 @@ void output_damage_whole_container(struct sway_output *output, }; wlr_output_damage_add_box(output->damage, &box); - container_descendants(con, C_VIEW, output_damage_whole_container_iterator, - output); + if (con->type == C_VIEW) { + output_damage_whole_container_iterator(con, output); + } else { + container_descendants(con, C_VIEW, + output_damage_whole_container_iterator, output); + } } static void damage_handle_destroy(struct wl_listener *listener, void *data) { diff --git a/sway/desktop/wl_shell.c b/sway/desktop/wl_shell.c index e97a898e..99e8947b 100644 --- a/sway/desktop/wl_shell.c +++ b/sway/desktop/wl_shell.c @@ -85,7 +85,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { // TODO: Let floating views do whatever view_update_size(view, wl_shell_view->pending_width, wl_shell_view->pending_height); - view_damage(view, false); + view_damage_from(view); } static void handle_destroy(struct wl_listener *listener, void *data) { diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index fcee8ce9..8ecb330d 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c @@ -177,7 +177,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { view_update_size(view, xdg_shell_v6_view->pending_width, xdg_shell_v6_view->pending_height); view_update_title(view, false); - view_damage(view, false); + view_damage_from(view); } static void handle_new_popup(struct wl_listener *listener, void *data) { diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index b4eda71f..8f935760 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -222,7 +222,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { // TODO: Let floating views do whatever view_update_size(view, xwayland_view->pending_width, xwayland_view->pending_height); - view_damage(view, false); + view_damage_from(view); view_update_title(view, false); } |