sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit bd79584f659428df5d34f64f3b1cdb4c4388c3c6
parent c08f9bf257c38c92a75988d89fba2d4de6bb2aea
Author: Ryan Dwyer <ryandwyer1@gmail.com>
Date:   Sun, 20 May 2018 08:34:43 +1000

Add assertion in container_at_view

Diffstat:
Msway/tree/container.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/sway/tree/container.c b/sway/tree/container.c @@ -455,6 +455,9 @@ struct sway_container *container_parent(struct sway_container *container, static struct sway_container *container_at_view(struct sway_container *swayc, double ox, double oy, struct wlr_surface **surface, double *sx, double *sy) { + if (!sway_assert(swayc->type == C_VIEW, "Expected a view")) { + return NULL; + } struct sway_view *sview = swayc->sway_view; double view_sx = ox - sview->x; double view_sy = oy - sview->y;