discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=270bc92f8192e9162122ad3f7b6e1decaf969043

commit 270bc92f8192e9162122ad3f7b6e1decaf969043
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Feb 6 16:01:02 2015 -0500

    add wl util function for calculating pixmap id
---
 src/bin/e_comp_wl.c | 2 +-
 src/bin/e_comp_wl.h | 6 ++++++
 src/bin/e_win.c     | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 8009403..0dd17d4 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1193,7 +1193,7 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client 
*client, struct wl_reso
                                   _e_comp_wl_surface_destroy);
 
    wl_client_get_credentials(client, &pid, NULL, NULL);
-   win = ((uint64_t)id << 32) + pid;
+   win = e_comp_wl_id_get(id, pid);
    /* check for existing pixmap */
    if (!(ep = e_pixmap_find(E_PIXMAP_TYPE_WL, win)))
      {
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index f8c764d..152fb1e 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -279,5 +279,11 @@ EINTERN void 
e_comp_wl_buffer_reference(E_Comp_Wl_Buffer_Ref *ref, E_Comp_Wl_Buf
 EAPI struct wl_signal e_comp_wl_surface_create_signal_get(E_Comp *comp);
 EAPI double e_comp_wl_idle_time_get(void);
 
+static inline uint64_t
+e_comp_wl_id_get(uint32_t id, pid_t pid)
+{
+   return ((uint64_t)id << 32) + pid;
+}
+
 # endif
 #endif
diff --git a/src/bin/e_win.c b/src/bin/e_win.c
index 91d5394..9e9f44b 100644
--- a/src/bin/e_win.c
+++ b/src/bin/e_win.c
@@ -75,7 +75,7 @@ _e_elm_win_trap_show(void *data, Evas_Object *o)
              type = E_PIXMAP_TYPE_WL;
              ctx->pointer = e_comp->pointer;
              elm_win_borderless_set(o, 1);
-             win = ((uint64_t)win << 32) + getpid();
+             win = e_comp_wl_id_get(win, getpid());
           }
         else
           {

-- 


Reply via email to