summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@open.eurogiciel.org>2014-05-16 15:56:32 +0200
committerManuel Bachmann <manuel.bachmann@open.eurogiciel.org>2014-05-16 16:46:28 +0200
commit6a004a289c46124840c43c70728a4a1ab935565d (patch)
tree97afbf3235036b7a5100856b567b3d53b557f6f6
parente05b589f960ccff44c43996915b9e88447fde94c (diff)
downloadweekeyboard-sandbox/mbachmann/tizen.tar.gz
weekeyboard-sandbox/mbachmann/tizen.tar.bz2
weekeyboard-sandbox/mbachmann/tizen.zip
Make weekeyboard work with both EFL 1.7.x & 1.9.x.sandbox/mbachmann/tizen
Change-Id: I226eb1213f599a9879f7fce822e7a8dc40fe3a7e Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-rw-r--r--src/wkb-main.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/wkb-main.c b/src/wkb-main.c
index 1030631..a3d4c3b 100644
--- a/src/wkb-main.c
+++ b/src/wkb-main.c
@@ -437,12 +437,19 @@ _wkb_ui_setup(struct weekeyboard *wkb)
if (wkb->win)
{
int x, y, w, h;
- struct wl_region *input = wl_compositor_create_region(wkb->win->display->wl.compositor);
+ struct wl_region *input;
edje_object_part_geometry_get(wkb->edje_obj, "background", &x, &y, &w, &h);
+
+#if (EFL_VERSION_MAJOR == 1) && (EFL_VERSION_MINOR >= 8)
+ ecore_wl_window_input_region_set(wkb->win, x, y, w, h);
+#else
+ input = wl_compositor_create_region(wkb->win->display->wl.compositor);
+
wl_region_add(input, x, y, w, h);
wl_surface_set_input_region(wkb->surface, input);
wl_region_destroy(input);
+#endif
}
/* special keys */
@@ -465,7 +472,11 @@ end:
static void
_wkb_setup(struct weekeyboard *wkb)
{
+#if (EFL_VERSION_MAJOR == 1) && (EFL_VERSION_MINOR >= 8)
+ Eina_List *globals;
+#else
struct wl_list *globals;
+#endif
struct wl_registry *registry;
Ecore_Wl_Global *global;
@@ -473,7 +484,11 @@ _wkb_setup(struct weekeyboard *wkb)
globals = ecore_wl_globals_get();
registry = ecore_wl_registry_get();
+#if (EFL_VERSION_MAJOR == 1) && (EFL_VERSION_MINOR >= 8)
+ EINA_INLIST_FOREACH(globals, global)
+#else
wl_list_for_each(global, globals, link)
+#endif
{
if (strcmp(global->interface, "wl_input_panel") == 0)
wkb->ip = wl_registry_bind(registry, global->id, &wl_input_panel_interface, 1);