wl_desktop_shell: fix the bug that couldn't hide a not deleted client when xdg_shell... 24/87124/2 accepted/tizen/common/20160906.131411 accepted/tizen/ivi/20160907.060402 accepted/tizen/mobile/20160907.060245 accepted/tizen/tv/20160907.060313 accepted/tizen/wearable/20160907.060340 submit/tizen/20160906.071027
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 6 Sep 2016 10:53:18 +0000 (19:53 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 6 Sep 2016 11:35:52 +0000 (04:35 -0700)
Change-Id: Ieec65c5dbbefeba878ab32afeaee6d75763fbb40

src/modules/wl_desktop_shell/e_mod_main.c

index 8198fea8e1e79bb25c2cfc15879f9d661a99f22f..41233496fa22257be3d2e53b446b05f6c9e90450 100644 (file)
@@ -96,13 +96,11 @@ _e_shell_surface_destroy(struct wl_resource *resource)
    /* get the client for this resource */
    if ((ec = wl_resource_get_user_data(resource)))
      {
-        if (ec->comp_data)
-          ec->comp_data->shell.surface = NULL;
+        if (!ec->comp_data)
+          return;
 
-        if (!e_object_unref(E_OBJECT(ec))) return;
-        if (e_object_is_del(E_OBJECT(ec))) return;
-
-        if (ec->comp_data)
+        if ((e_object_unref(E_OBJECT(ec))) &&
+            (!e_object_is_del(E_OBJECT(ec))))
           {
              if (ec->comp_data->mapped)
                {
@@ -113,10 +111,11 @@ _e_shell_surface_destroy(struct wl_resource *resource)
              if (ec->parent)
                {
                   ec->parent->transients =
-                    eina_list_remove(ec->parent->transients, ec);
+                     eina_list_remove(ec->parent->transients, ec);
                }
              /* wl_resource_destroy(ec->comp_data->shell.surface); */
           }
+        ec->comp_data->shell.surface = NULL;
      }
 }