summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-10-31 20:02:40 -0200
committerRafael Antognolli <rafael.antognolli@intel.com>2013-10-31 21:35:13 -0200
commitdd18206d860fa9cd1cea4ce01657c21678318bca (patch)
treeb6ee327486fad1f66fe4a7c6e8f6da2a96e22996
parente56428f4ad7b015c73b1959cf1d6aac154ca4ac0 (diff)
ecore/wayland: Do not use win->id directly.
Use a getter for it instead, so we don't need to expose the Ecore_Wl_Window struct just because of it.
-rw-r--r--src/lib/ecore_wayland/Ecore_Wayland.h2
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c11
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c2
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c2
-rw-r--r--src/modules/ecore_imf/wayland/wayland_imcontext.c4
5 files changed, 17 insertions, 4 deletions
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h
index d190e0f82a..899f80e0c3 100644
--- a/src/lib/ecore_wayland/Ecore_Wayland.h
+++ b/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -626,6 +626,8 @@ EAPI void ecore_wl_window_cursor_from_name_set(Ecore_Wl_Window *win, const char
626EAPI void ecore_wl_window_cursor_default_restore(Ecore_Wl_Window *win); 626EAPI void ecore_wl_window_cursor_default_restore(Ecore_Wl_Window *win);
627EAPI void ecore_wl_window_parent_set(Ecore_Wl_Window *win, Ecore_Wl_Window *parent); 627EAPI void ecore_wl_window_parent_set(Ecore_Wl_Window *win, Ecore_Wl_Window *parent);
628 628
629EAPI int ecore_wl_window_id_get(Ecore_Wl_Window *win);
630
629/** 631/**
630 * Returns a wl_surface with no association to any wl_shell_surface. 632 * Returns a wl_surface with no association to any wl_shell_surface.
631 * 633 *
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index 0de39d9e58..8307f654c1 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -687,6 +687,17 @@ ecore_wl_window_rotation_get(Ecore_Wl_Window *win)
687 return win->rotation; 687 return win->rotation;
688} 688}
689 689
690/* @since 1.8 */
691EAPI int
692ecore_wl_window_id_get(Ecore_Wl_Window *win)
693{
694 LOGFN(__FILE__, __LINE__, __FUNCTION__);
695
696 if (!win) return 0;
697 return win->id;
698}
699
700
690/* local functions */ 701/* local functions */
691static void 702static void
692_ecore_wl_window_cb_ping(void *data EINA_UNUSED, struct wl_shell_surface *shell_surface, unsigned int serial) 703_ecore_wl_window_cb_ping(void *data EINA_UNUSED, struct wl_shell_surface *shell_surface, unsigned int serial)
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index 369d7ca561..6fd5627265 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -182,7 +182,7 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
182 wdata->win = 182 wdata->win =
183 ecore_wl_window_new(p, x, y, w + fw, h + fh, 183 ecore_wl_window_new(p, x, y, w + fw, h + fh,
184 ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW); 184 ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW);
185 ee->prop.window = wdata->win->id; 185 ee->prop.window = ecore_wl_window_id_get(wdata->win);
186 186
187 ee->evas = evas_new(); 187 ee->evas = evas_new();
188 evas_data_attach_set(ee->evas, ee); 188 evas_data_attach_set(ee->evas, ee);
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
index 6cf845e6ca..9e8fc4d2c4 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
@@ -179,7 +179,7 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
179 wdata->win = 179 wdata->win =
180 ecore_wl_window_new(p, x, y, w + fw, h + fh, 180 ecore_wl_window_new(p, x, y, w + fw, h + fh,
181 ECORE_WL_WINDOW_BUFFER_TYPE_SHM); 181 ECORE_WL_WINDOW_BUFFER_TYPE_SHM);
182 ee->prop.window = wdata->win->id; 182 ee->prop.window = ecore_wl_window_id_get(wdata->win);
183 183
184 ee->evas = evas_new(); 184 ee->evas = evas_new();
185 evas_data_attach_set(ee->evas, ee); 185 evas_data_attach_set(ee->evas, ee);
diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c b/src/modules/ecore_imf/wayland/wayland_imcontext.c
index 00a2dde9fa..84d0a50282 100644
--- a/src/modules/ecore_imf/wayland/wayland_imcontext.c
+++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c
@@ -474,8 +474,8 @@ text_input_keysym(void *data,
474 strcpy((char *)e->key, key); 474 strcpy((char *)e->key, key);
475 strcpy((char *)e->string, string); 475 strcpy((char *)e->string, string);
476 476
477 e->window = imcontext->window->id; 477 e->window = ecore_wl_window_id_get(imcontext->window);
478 e->event_window = imcontext->window->id; 478 e->event_window = ecore_wl_window_id_get(imcontext->window);
479 e->timestamp = time; 479 e->timestamp = time;
480 480
481 e->modifiers = 0; 481 e->modifiers = 0;