From 0680250d720649a95fd3d9631c7baf6829a1a665 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 21 Jul 2016 13:09:12 -0500 Subject: [PATCH] Fix wayland clients not deleting when they're hidden We kept an extra reference for wayland clients and dropped it on their final render to stop crashes. However, if they're not on screen at the time of their deletion this reference still needed to be dropped. Fixes clients remaining on the deskmirror after dying on another desktop. --- src/bin/e_comp_wl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index c5ddf3292..dbf6b482b 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2471,6 +2471,13 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) if (ec->internal_elm_win) evas_object_hide(ec->frame); + + /* WL clients take an extra ref at startup so they don't get deleted while + * visible. Since we drop that in the render loop we need to make sure + * it's dropped here if the client isn't going to be rendered. + */ + if (!e_pixmap_is_x(ec->pixmap) && ec->hidden) e_object_unref(E_OBJECT(ec)); + _e_comp_wl_focus_check(); }