e_comp_wl: Remove focused list if the surface is destroyed 36/91736/3 accepted/tizen/common/20161011.154405 accepted/tizen/ivi/20161011.234321 accepted/tizen/mobile/20161011.234334 accepted/tizen/tv/20161011.234220 accepted/tizen/wearable/20161011.234236 submit/tizen/20161011.071721
authorJengHyun Kang <jhyuni.kang@samsung.com>
Tue, 11 Oct 2016 06:15:47 +0000 (15:15 +0900)
committerJengHyun Kang <jhyuni.kang@samsung.com>
Tue, 11 Oct 2016 07:09:15 +0000 (16:09 +0900)
Change-Id: Ib01d83eff2ab81b7e15674950399e5c3bc54275f

src/bin/e_comp_wl.c

index 4100cf0..ed5a673 100644 (file)
@@ -2938,9 +2938,19 @@ static void
 _e_comp_wl_surface_destroy(struct wl_resource *resource)
 {
    E_Client *ec;
+   struct wl_resource *res;
+   Eina_List *l, *ll;
 
    if (!(ec = wl_resource_get_user_data(resource))) return;
 
+   EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res)
+     {
+        if (wl_resource_get_client(res) ==
+            wl_resource_get_client(ec->comp_data->surface))
+          e_comp_wl->kbd.focused =
+             eina_list_remove_list(e_comp_wl->kbd.focused, l);
+     }
+
    ec->comp_data->surface = NULL;
    ec->comp_data->wl_surface = NULL;
    e_pixmap_del(ec->pixmap);