From 1be650d78a5612164fff9b3b20c5a2a89f13bdf0 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Wed, 25 Oct 2017 07:12:25 -0400 Subject: [PATCH] xwm: only emit unmap notify once --- xwayland/xwm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 6850f56b..7827295e 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -578,8 +578,10 @@ static void handle_unmap_notify(struct wlr_xwm *xwm, } xsurface->surface = NULL; - xsurface->mapped = false; - wl_signal_emit(&xsurface->events.unmap_notify, xsurface); + if (xsurface->mapped) { + xsurface->mapped = false; + wl_signal_emit(&xsurface->events.unmap_notify, xsurface); + } } static void handle_property_notify(struct wlr_xwm *xwm,