From 092c834c5e0ef76a774befcdfc7a3aaff24f2237 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 19 Jan 2016 12:11:27 -0500 Subject: [PATCH] Revert "Fix issue of compositor surface create passing wrong parameter to" This reverts commit 67170f40a1a901101591c8102631dbec8e49794b. this was changed intentionally to use the resource pointer in order to fix an issue where external clients would reuse the same surface id, thereby breaking the compositor with duplicate entries in the pixmap hash. note, however, that internal windows in wayland DO use an int type pixmap id. this is easily detected by checking the pid of the client for a window before doing checks. this is necessary in order to be able to flag internal clients as internal while still being able to match them with their surface id also, uintptr_t is NOT indicative of an int type being used, it's an int type which has the same size as a pointer, allowing casts between ints and pointer. --- src/bin/e_comp_wl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index c282ef889..579c4ff48 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1480,7 +1480,7 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso E_Pixmap *ep; /* try to create new pixmap */ - if (!(ep = e_pixmap_new(E_PIXMAP_TYPE_WL, (uintptr_t)id))) + if (!(ep = e_pixmap_new(E_PIXMAP_TYPE_WL, res))) { ERR("Could not create new pixmap"); wl_resource_destroy(res);