e_pointer: set e_pointer init coordinate to center 68/275868/1
authorJunkyeong, Kim <jk0430.kim@samsung.com>
Fri, 3 Jun 2022 06:21:43 +0000 (15:21 +0900)
committerJunseok Kim <juns.kim@samsung.com>
Fri, 3 Jun 2022 09:02:19 +0000 (18:02 +0900)
tizen concept - pointer's init position is a center of output.
it's implemented in e_input_evdev.c _device_calibration_set.
but e_pointer's init coordinate is 0.
so e_pointer's init coordinate also have to be set like e_input_evdev.

Change-Id: Iaeeb2e79c9504c2ab1cba3043be604c61dabc7e6
Signed-off-by: Junkyeong, Kim <jk0430.kim@samsung.com>
src/bin/e_pointer.c

index da08f9b6630e1bb8b95f8e4a4d81916b4657bdd5..2c738b28b3ea585a104ea796f0bf6a1550d8d175 100644 (file)
@@ -178,6 +178,7 @@ EINTERN E_Pointer *
 e_pointer_canvas_new(Ecore_Evas *ee, Eina_Bool filled)
 {
    E_Pointer *ptr = NULL;
+   E_Output *output = NULL;
 
    EINA_SAFETY_ON_FALSE_RETURN_VAL(ee, NULL);
    if (!_initted) return NULL;
@@ -190,6 +191,12 @@ e_pointer_canvas_new(Ecore_Evas *ee, Eina_Bool filled)
    ptr->canvas = EINA_TRUE;
    ptr->w = ptr->h = e_config->cursor_size;
    ptr->e_cursor = e_config->use_e_cursor;
+   output = e_output_find_by_index(0);
+   if (output)
+     {
+        ptr->x = output->config.mode.w / 2;
+        ptr->y = output->config.mode.h / 2;
+     }
 
    ptr->ee = ee;
    ptr->evas = ecore_evas_get(ee);