diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-15 01:27:06 -0500 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-01-15 09:06:42 +0100 |
commit | a68bc5f449960a907b316e96a348c8eed69756f5 (patch) | |
tree | 5e1ca2df8f15ee311ba2004bc0bb08bc1bc0b4e1 | |
parent | Handle hidden scratchpad containers in commands (diff) | |
download | sway-a68bc5f449960a907b316e96a348c8eed69756f5.tar.gz sway-a68bc5f449960a907b316e96a348c8eed69756f5.tar.zst sway-a68bc5f449960a907b316e96a348c8eed69756f5.zip |
Do not damage view child when container is NULL
In `view_child_damage`, do not damage the surface if it has been
unmapped or if the container is NULL.
-rw-r--r-- | sway/tree/view.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 5371ee20..e65968c6 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -735,6 +735,9 @@ static void view_subsurface_create(struct sway_view *view, | |||
735 | } | 735 | } |
736 | 736 | ||
737 | static void view_child_damage(struct sway_view_child *child, bool whole) { | 737 | static void view_child_damage(struct sway_view_child *child, bool whole) { |
738 | if (!child || !child->mapped || !child->view || !child->view->container) { | ||
739 | return; | ||
740 | } | ||
738 | int sx, sy; | 741 | int sx, sy; |
739 | child->impl->get_root_coords(child, &sx, &sy); | 742 | child->impl->get_root_coords(child, &sx, &sy); |
740 | desktop_damage_surface(child->surface, | 743 | desktop_damage_surface(child->surface, |