From f1b47ca2af0460b9a26808b4d56e7304d68d4f11 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 12 Mar 2015 14:42:00 -0400 Subject: [PATCH] don't create new wl shell clients for internal windows --- src/modules/wl_desktop_shell/e_mod_main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index 70af995f8..005d08f84 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -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,