From: Wonkeun Oh Date: Thu, 1 Jun 2017 02:45:07 +0000 (+0900) Subject: Support the floating IME panel using the wl_input_panel_surface_interface X-Git-Tag: submit/tizen_3.0/20170604.223253~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e12e2d131cc304aaba2b7870888a24c19c890850;p=platform%2Fcore%2Fuifw%2Fe-mod-tizen-wl-textinput.git Support the floating IME panel using the wl_input_panel_surface_interface It is better to use the input_panel_surface_interface. because the Input FW doesn't need to care about the IME's panel_type. IME just can set the their input_panel type using the 'wl_input_panel_surface_set_floating_panel' api. Change-Id: I522a0094646ff3266fcadefffa3b8b25762cda48 --- diff --git a/src/e_mod_input_panel.c b/src/e_mod_input_panel.c index 1bd03a3..99dea97 100644 --- a/src/e_mod_input_panel.c +++ b/src/e_mod_input_panel.c @@ -145,10 +145,28 @@ _e_input_panel_surface_cb_ready_set(struct wl_client *client EINA_UNUSED, struct } } +static void + _e_input_panel_surface_cb_floating_panel_set(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t state) +{ + E_Input_Panel_Surface *ips = wl_resource_get_user_data(resource); + + if (!ips) + { + WTI_WARNING(resource, + WL_DISPLAY_ERROR_INVALID_OBJECT, + "No Input Panel Surface For Surface"); + return; + } + + if (ips->ec) + ips->ec->vkbd.floating = !!state; +} + static const struct wl_input_panel_surface_interface _e_input_panel_surface_implementation = { _e_input_panel_surface_cb_toplevel_set, _e_input_panel_surface_cb_overlay_panel_set, - _e_input_panel_surface_cb_ready_set + _e_input_panel_surface_cb_ready_set, + _e_input_panel_surface_cb_floating_panel_set }; static void @@ -228,7 +246,8 @@ _e_input_panel_position_set(E_Client *ec, int w, int h) break; } - e_client_util_move_without_frame(ec, nx, ny); + if (!ec->vkbd.floating) + e_client_util_move_without_frame(ec, nx, ny); } static void