e_comp_screen: move cursor position when output is rotated 14/316114/1
authorduna.oh <duna.oh@samsung.com>
Thu, 13 Jun 2024 07:26:47 +0000 (16:26 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 10 Dec 2024 08:59:23 +0000 (17:59 +0900)
Change-Id: I189e9aa150a8dafe2309de7eb52713e05c200b07

src/bin/e_comp_screen.c

index 61e324cc1911503e37a4ec4348e525875b835e26..05355177cf9584121d22256c6e8bee6be909d9c7 100644 (file)
@@ -141,6 +141,7 @@ _e_comp_screen_input_rotation_set(int rotation)
      {
         const Eina_List *l;
         E_Input_Device *dev;
+        int ptr_x = 0, ptr_y = 0;
 
         EINA_LIST_FOREACH(e_input_devices_get(), l, dev)
           {
@@ -149,6 +150,16 @@ _e_comp_screen_input_rotation_set(int rotation)
 
              ELOGF("COMP_SCREEN","EE Input Device Rotate: %d", NULL, rotation);
           }
+
+        /* pointer */
+        e_input_device_pointer_xy_get(NULL, &ptr_x, &ptr_y);
+
+        ELOGF("COMP_SCREEN", "EE Pointer Set to Center (%d, %d) -> (%d, %d)", NULL,
+              wl_fixed_to_int(e_comp_wl->ptr.x), wl_fixed_to_int(e_comp_wl->ptr.y), ptr_x, ptr_y);
+        e_comp_wl->ptr.x = wl_fixed_from_int(ptr_x);
+        e_comp_wl->ptr.y = wl_fixed_from_int(ptr_y);
+
+        e_pointer_mouse_move(e_comp->pointer, ptr_x, ptr_y);
      }
 }