Fix elm apps crashing from invalid e_remember
authorChris Michael <cp.michael@samsung.com>
Sun, 3 Aug 2014 14:34:38 +0000 (10:34 -0400)
committerChris Michael <cp.michael@samsung.com>
Tue, 26 Aug 2014 14:10:38 +0000 (10:10 -0400)
Don't set changes.icon during surface creation. There are functions
that get called when icccm.class changes and That is the place to set
changes.icon.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
Additional authors: zmike

src/modules/wl_desktop_shell/e_mod_main.c

index 96bb014..2505a35 100644 (file)
@@ -97,7 +97,7 @@ _e_shell_surface_cb_destroy(struct wl_resource *resource)
 {
    E_Client *ec;
 
-   DBG("Shell Surface Destroy: %d", wl_resource_get_id(resource));
+   /* DBG("Shell Surface Destroy: %d", wl_resource_get_id(resource)); */
 
    /* get the client for this resource */
    if ((ec = wl_resource_get_user_data(resource)))
@@ -260,7 +260,6 @@ _e_shell_surface_cb_toplevel_set(struct wl_client *client EINA_UNUSED, struct wl
    ec->borderless = !ec->internal;
    ec->lock_border = EINA_TRUE;
    ec->border.changed = ec->changes.border = !ec->borderless;
-   ec->changes.icon = !!ec->icccm.class;
    ec->netwm.type = E_WINDOW_TYPE_NORMAL;
    ec->comp_data->set_win_type = EINA_TRUE;
    if ((!ec->lock_user_maximize) && (ec->maximized))
@@ -724,7 +723,7 @@ _e_xdg_shell_surface_cb_app_id_set(struct wl_client *client EINA_UNUSED, struct
    /* set class */
    eina_stringshare_replace(&ec->icccm.class, id);
    /* eina_stringshare_replace(&ec->netwm.name, id); */
-   ec->changes.icon = EINA_TRUE;
+   ec->changes.icon = !!ec->icccm.class;
    EC_CHANGED(ec);
 }
 
@@ -1226,7 +1225,6 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour
    ec->borderless = !ec->internal;
    ec->lock_border = EINA_TRUE;
    ec->border.changed = ec->changes.border = !ec->borderless;
-   ec->changes.icon = !!ec->icccm.class;
    ec->netwm.type = E_WINDOW_TYPE_NORMAL;
    ec->comp_data->set_win_type = EINA_TRUE;
    EC_CHANGED(ec);