summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-12-02 09:29:44 -0500
committerChris Michael <cp.michael@samsung.com>2016-12-02 09:29:44 -0500
commit7d8266995d0e4771f2fbe73e699705d2b8f90dc7 (patch)
tree7387d4a2f7280ffe12165c6d776c890dc06d9f5b
parentcc795bfbda6c3272049bc526156bfb7cfb7f2b8e (diff)
downloadenlightenment-7d8266995d0e4771f2fbe73e699705d2b8f90dc7.tar.gz
verify shell client delete functions are operating on wayland clients.
ref cc795bfbda6c3272049bc526 Fixes T4958 Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/modules/wl_desktop_shell/xdg5.c8
-rw-r--r--src/modules/wl_desktop_shell/xdg6.c3
2 files changed, 9 insertions, 2 deletions
diff --git a/src/modules/wl_desktop_shell/xdg5.c b/src/modules/wl_desktop_shell/xdg5.c
index 7295f16d83..7d21c61963 100644
--- a/src/modules/wl_desktop_shell/xdg5.c
+++ b/src/modules/wl_desktop_shell/xdg5.c
@@ -881,9 +881,13 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data EINA_UNUSED, uint32_t
static void
_xdg5_client_hook_del(void *d EINA_UNUSED, E_Client *ec)
{
- E_Shell_Data *shd = ec->comp_data->shell.data;
+ E_Shell_Data *shd;
+
+ /* make sure this is a wayland client */
+ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
- if (shd && (shd->version != 5)) return;
+ shd = ec->comp_data->shell.data;
+ if (shd && (shd->version != 5)) return;
if (ec->comp_data->shell.surface)
e_shell_surface_cb_destroy(ec->comp_data->shell.surface);
}
diff --git a/src/modules/wl_desktop_shell/xdg6.c b/src/modules/wl_desktop_shell/xdg6.c
index d98bfc9059..22a1455e4f 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -1325,6 +1325,9 @@ _xdg6_client_destroy(E_Client *ec)
{
E_Shell_Data *shd;
+ /* make sure this is a wayland client */
+ if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
+
shd = ec->comp_data->shell.data;
if (shd && (shd->version != 6)) return;
if (ec->comp_data->shell.surface)