From: Mike Blumenkrantz Date: Tue, 10 Mar 2015 22:27:08 +0000 (-0400) Subject: always create new client for wl shell surfaces X-Git-Tag: upstream/0.20.0~1177 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e4d5ddfc34780e8a9e492b53b11a8ba89e0edac;p=platform%2Fupstream%2Fenlightenment.git always create new client for wl shell surfaces this should be a more correct way of handling (shell) surfaces since there's never a time when we won't want to create a new client --- diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index ee29db0..2a56e98 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -562,19 +562,15 @@ _e_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *reso /* find the client for this pixmap */ ec = e_pixmap_client_get(ep); - if (!ec) + if (ec) e_pixmap_ref(ec->pixmap); + if (!(ec = e_client_new(NULL, ep, 0, 1))) { - /* no client found. not internal window. maybe external client app ? */ - if (!(ec = e_client_new(NULL, ep, 0, 0))) - { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, - "No Client For Pixmap"); - return; - } - - ec->netwm.ping = EINA_TRUE; + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, + "No Client For Pixmap"); + return; } + ec->netwm.ping = EINA_TRUE; /* get the client data */ if (!(cdata = ec->comp_data)) @@ -1140,16 +1136,13 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour /* find the client for this pixmap */ ec = e_pixmap_client_get(ep); - if (!ec) + if (ec) e_pixmap_ref(ec->pixmap); + if (!(ec = e_client_new(NULL, ep, 0, 1))) { - /* no client found. not internal window. maybe external client app ? */ - if (!(ec = e_client_new(NULL, ep, 0, 0))) - { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, - "No Client For Pixmap"); - return; - } + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, + "No Client For Pixmap"); + return; } ec->netwm.ping = EINA_TRUE; @@ -1239,18 +1232,13 @@ _e_xdg_shell_cb_popup_get(struct wl_client *client, struct wl_resource *resource /* find the client for this pixmap */ ec = e_pixmap_client_get(ep); - if (!ec) + if (ec) e_pixmap_ref(ec->pixmap); + if (!(ec = e_client_new(NULL, ep, 0, 1))) { - /* no client found. create one */ - if (!(ec = e_client_new(NULL, ep, 0, 1))) - { - wl_resource_post_error(surface_resource, - WL_DISPLAY_ERROR_INVALID_OBJECT, - "No Client For Pixmap"); - return; - } - - /* e_pixmap_ref(ep); */ + wl_resource_post_error(surface_resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, + "No Client For Pixmap"); + return; } /* get the client data */