don't create new wl shell clients for internal windows
authorMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 12 Mar 2015 18:42:00 +0000 (14:42 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 12 Mar 2015 18:42:00 +0000 (14:42 -0400)
src/modules/wl_desktop_shell/e_mod_main.c

index 70af995..005d08f 100644 (file)
@@ -562,8 +562,9 @@ _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) e_pixmap_ref(ec->pixmap);
-   if (!(ec = e_client_new(NULL, ep, 0, 0)))
+   if (ec && (!ec->internal))
+     e_pixmap_ref(ec->pixmap);
+   if ((!ec) && (!ec->internal) && (!(ec = e_client_new(NULL, ep, 0, 0))))
      {
         wl_resource_post_error(surface_resource,
                                WL_DISPLAY_ERROR_INVALID_OBJECT,
@@ -1136,8 +1137,9 @@ _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) e_pixmap_ref(ec->pixmap);
-   if (!(ec = e_client_new(NULL, ep, 0, 0)))
+   if (ec && (!ec->internal))
+     e_pixmap_ref(ec->pixmap);
+   if ((!ec) && (!ec->internal) && (!(ec = e_client_new(NULL, ep, 0, 0))))
      {
         wl_resource_post_error(surface_resource,
                                WL_DISPLAY_ERROR_INVALID_OBJECT,
@@ -1232,8 +1234,9 @@ _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) e_pixmap_ref(ec->pixmap);
-   if (!(ec = e_client_new(NULL, ep, 0, 0)))
+   if (ec && (!ec->internal))
+     e_pixmap_ref(ec->pixmap);
+   if ((!ec) && (!ec->internal) && (!(ec = e_client_new(NULL, ep, 0, 0))))
      {
         wl_resource_post_error(surface_resource,
                                WL_DISPLAY_ERROR_INVALID_OBJECT,