Modified to update the position of the focused context after moving IME 31/289731/1
authorInHong Han <inhong1.han@samsung.com>
Tue, 14 Mar 2023 04:54:17 +0000 (13:54 +0900)
committerInHong Han <inhong1.han@samsung.com>
Tue, 14 Mar 2023 05:40:56 +0000 (05:40 +0000)
Change-Id: Ia2aecf0b7fa50800b9fc8e8cea8e0a513bfda81d

ism/extras/wayland_immodule/wayland_imcontext.c

index 2d052a7..424d9fd 100644 (file)
@@ -2392,7 +2392,7 @@ text_input_input_panel_state(void                 *data EINA_UNUSED,
 
 // TIZEN_ONLY(20151221): Support input panel geometry
 static void
-text_input_input_panel_geometry(void                 *data EINA_UNUSED,
+text_input_input_panel_geometry(void                 *data,
                                 struct wl_text_input *text_input EINA_UNUSED,
                                 uint32_t              x,
                                 uint32_t              y,
@@ -2400,6 +2400,10 @@ text_input_input_panel_geometry(void                 *data EINA_UNUSED,
                                 uint32_t              h)
 {
     WaylandIMContext *imcontext = (WaylandIMContext *)data;
+    if (!imcontext || !imcontext->ctx) {
+        LOGE("No context");
+        return;
+    }
 
     if (_keyboard_geometry.x != (int)x || _keyboard_geometry.y != (int)y ||
         _keyboard_geometry.w != (int)w || _keyboard_geometry.h != (int)h)
@@ -2409,6 +2413,9 @@ text_input_input_panel_geometry(void                 *data EINA_UNUSED,
         _keyboard_geometry.w = w;
         _keyboard_geometry.h = h;
 
+        imcontext->input_panel_position.x = x;
+        imcontext->input_panel_position.y = y;
+
         send_keyboard_geometry_event(imcontext->ctx);
     }
     else {