summaryrefslogtreecommitdiff
path: root/src/wkb-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wkb-main.c')
-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);