Consume unique value identifying the window on which gesture took place in multi... 65/274565/2
authorLukasz Oleksak <l.oleksak@samsung.com>
Mon, 2 May 2022 12:40:21 +0000 (14:40 +0200)
committerLukasz Oleksak <l.oleksak@samsung.com>
Mon, 2 May 2022 13:51:18 +0000 (15:51 +0200)
Change-Id: Ie439499eb6f2e31958f5cbb6726ead013076c669

include/utils.h
src/navigator.c

index 0eff4eef289ba69724e68818a62b9819c3e4b43f..9e0e5f54981281d97f70f86f6137e53b8b76244b 100644 (file)
@@ -78,6 +78,7 @@ typedef struct {
        pid_t pid;            // pid of process on which gesture took place.
        int state;            // 0 - begin, 1 - ongoing, 2 - ended, 3 - aborted
        int event_time;
+       int resource_id;      // unique value identifying the window on which gesture took place in multi-window environment
 } Gesture_Info;
 
 typedef void (*GestureCB)(void *data, const Eldbus_Message *msg);
index 3e04d0fb7ccdda41496b3bbda084602b2f2b57cd..548df15d67e24569cc4d745f23b7d39bfcdbfd41 100644 (file)
@@ -569,7 +569,7 @@ TIZEN_PROD_STATIC void _focus_widget(NavigatorData *nd, Gesture_Info *info)
 {
        DEBUG("START");
        AtspiAccessible *obj = NULL;
-
+       // TODO: use info->resource_id instead of (x_beg, y_beg) in order to determine window
        _window_at_point_check(nd, info->x_beg, info->y_beg);
 
        if ((nd->last_focus.x == info->x_beg) && (nd->last_focus.y == info->y_beg))
@@ -2252,16 +2252,17 @@ TIZEN_PROD_STATIC void on_gesture_detected(void *data, const Eldbus_Message *msg
                return;
        }
 
-       if (!eldbus_message_arguments_get(msg, "iiiiiiu", &g_type, &info->x_beg,
+       if (!eldbus_message_arguments_get(msg, "iiiiiiuu", &g_type, &info->x_beg,
                                                                          &info->y_beg, &info->x_end, &info->y_end,
-                                                                         &info->state, &info->event_time)) {
+                                                                         &info->state, &info->event_time,
+                                                                         &info->resource_id)) {
                DEBUG("Getting message arguments failed");
                g_free(info);
                return;
        }
        info->type = (Gesture)g_type;
-       DEBUG("Incoming gesture name is %s : %d %d %d %d %d", utils_enum_to_string(info->type),
-                 info->x_beg, info->y_beg, info->x_end, info->y_end, info->state);
+       DEBUG("Incoming gesture name is %s : %d %d %d %d %d %d", utils_enum_to_string(info->type),
+                 info->x_beg, info->y_beg, info->x_end, info->y_end, info->state, info->resource_id);
 
        _on_auto_review_stop(nd);