//
}
+static void
+adjust_keyboard_size(WaylandIMContext *imcontext, int *width, int *height)
+{
+ int win_x, win_y, win_w, win_h;
+ ecore_wl2_window_geometry_get(imcontext->window, &win_x, &win_y, &win_w, &win_h);
+
+ int screen_w, screen_h;
+ Ecore_Wl2_Display *wl2_display = ecore_wl2_connected_display_get(NULL);
+
+ if (!wl2_display)
+ {
+ LOGW("Failed to get display");
+ return;
+ }
+
+ ecore_wl2_display_screen_size_get(wl2_display, &screen_w, &screen_h);
+ double scaling_factor = (double)win_w / (double)*width;
+
+ if (screen_w != win_w && screen_h != win_h)
+ {
+ LOGD("scaling : %f", scaling_factor);
+ *width = (int)(*width * scaling_factor);
+ *height = (int)(*height * scaling_factor);
+ }
+}
+
// TIZEN_ONLY(20151221): Support input panel geometry
static void
text_input_input_panel_geometry(void *data,
return;
}
+ int new_w = (int)w;
+ int new_h = (int)h;
+ adjust_keyboard_size(imcontext, &new_w, &new_h);
+
if (_keyboard_geometry.x != (int)x || _keyboard_geometry.y != (int)y ||
- _keyboard_geometry.w != (int)w || _keyboard_geometry.h != (int)h)
+ _keyboard_geometry.w != (int)new_w || _keyboard_geometry.h != new_h)
{
_keyboard_geometry.x = x;
_keyboard_geometry.y = y;
- _keyboard_geometry.w = w;
- _keyboard_geometry.h = h;
+ _keyboard_geometry.w = new_w;
+ _keyboard_geometry.h = new_h;
imcontext->input_panel_position.x = x;
imcontext->input_panel_position.y = y;