input_panel: re-locate the input panel surface whenever it's resized. 75/77175/2
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 29 Jun 2016 04:10:59 +0000 (13:10 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Wed, 29 Jun 2016 04:13:17 +0000 (13:13 +0900)
Change-Id: I6eb08262beabfe007f1988c05f0ac22c178f43a9

src/e_mod_input_panel.c

index 1b8ca4916e961fc9f8c3fdfa742a60192d4e0888..34a19d27d4d08f49ba7b01aefea1978c254f5d6a 100644 (file)
@@ -307,6 +307,21 @@ end:
    return ECORE_CALLBACK_PASS_ON;
 }
 
+static void
+_e_ips_cb_evas_resize(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
+{
+   E_Client *ec;
+   int w, h;
+
+   ec = data;
+   if (e_object_is_del(E_OBJECT(ec)))
+     return;
+
+   evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+
+   _e_input_panel_position_set(ec, w, h);
+}
+
 static void
 _e_input_panel_cb_surface_get(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface_resource)
 {
@@ -376,6 +391,8 @@ _e_input_panel_cb_surface_get(struct wl_client *client, struct wl_resource *reso
    evas_object_layer_set(ec->frame, E_LAYER_CLIENT_ABOVE);
    evas_object_raise(ec->frame);
 
+   evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESIZE, _e_ips_cb_evas_resize, ec);
+
    cdata->surface = surface_resource;
    cdata->shell.configure_send = NULL;
    cdata->shell.configure = _e_input_panel_surface_configure;