add wl util function for calculating pixmap id
authorMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 6 Feb 2015 21:01:02 +0000 (16:01 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 6 Feb 2015 23:32:07 +0000 (18:32 -0500)
src/bin/e_comp_wl.c
src/bin/e_comp_wl.h
src/bin/e_win.c

index 8009403abb708491ca717f02d1813dd3c44eb766..0dd17d48263add65c03c9e9772bdf26211019dc6 100644 (file)
@@ -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)))
      {
index f8c764dadd824de293c158dc4c6ae9c6d907c1d4..152fb1ec68e371d440e0d4753d8eec65bbbb36df 100644 (file)
@@ -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
index 91d53949893f0b2a0ccdad2db3a5447463736421..9e9f44b196d1685895f5f27089d5453979f7903b 100644 (file)
@@ -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
           {