Send 'GestureDetected' with a resource id 53/274553/2 accepted/tizen/unified/20220706.120443 submit/tizen/20220525.045847 submit/tizen/20220705.103158
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 2 May 2022 07:56:31 +0000 (16:56 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Mon, 2 May 2022 08:01:23 +0000 (17:01 +0900)
The resource id is unique value in the entire system.
It will be used to get a window under the x,y position.
It will be very correct in the multi-window case instead of
tracking window extents and its stack.

Change-Id: I03f75470b4eea7316f76eab21ba87b6b449c5662

src/e_mod_main.c

index 8cb00f0..f19ed80 100644 (file)
@@ -103,7 +103,8 @@ static const Eldbus_Signal signals[] = {
                                 ELDBUS_ARGS({"i", "type"},
                                             {"i", "x_beg"},{"i", "y_beg"},
                                             {"i", "x_end"}, {"i", "y_end"},
-                                            {"i", "state"}, {"u", "event_time"}),
+                                            {"i", "state"}, {"u", "event_time"},
+                                            {"u", "resID"}),
                                             0},
    [MOUSE_DOWN_SIGNAL] = {"MouseDown", ELDBUS_ARGS({"i", "deviceId"}), 0},
    [MOUSE_UP_SIGNAL] = {"MouseUp", ELDBUS_ARGS({"i", "deviceId"}), 0},
@@ -235,11 +236,14 @@ int _e_mod_atspi_dbus_broadcast(Gesture_Info *gi)
     }
 //
 
+   E_Client *client = e_client_under_position_get(desk, gi->x_beg, gi->y_beg, NULL);
+   uint32_t resID = e_pixmap_res_id_get(client->pixmap);
+
    eldbus_service_signal_emit(g_context->iface, GESTURE_DETECTED_SIGNAL, (int)gi->type, gi->x_beg, gi->y_beg,
-                              gi->x_end, gi->y_end, gi->state, gi->event_time);
+                              gi->x_end, gi->y_end, gi->state, gi->event_time, resID);
 
-   INFO("GestureDetected %s %d (%d %d %d %d %d %u)", gesture_enum_to_string(gi->type),
-        (int)gi->type, gi->x_beg, gi->y_beg, gi->x_end, gi->y_end, gi->state, gi->event_time);
+   INFO("GestureDetected %s %d (%d %d %d %d %d %u) resID: %u", gesture_enum_to_string(gi->type),
+        (int)gi->type, gi->x_beg, gi->y_beg, gi->x_end, gi->y_end, gi->state, gi->event_time, resID);
 
    return 0;
 }