Stop sending HighlightedObjectInfo in null context mode 17/306717/2
authorArtur Świgoń <a.swigon@samsung.com>
Thu, 9 Feb 2023 11:01:11 +0000 (12:01 +0100)
committerMaria Bialota <m.bialota@samsung.com>
Mon, 26 Feb 2024 14:34:29 +0000 (15:34 +0100)
When control is handed over to a non-atspi application (e.g. DALi on Tizen
6.0), the highlight stays on the old application (non-atspi apps are opaque
to Screen Reader and they use their own highlight). This may cause the old
app to keep sending org.tizen.GestureNavigation.HighlightedObjectInfo D-Bus
messages (in parallel to the non-atspi app, causing a race condition), which
in turn may cause the double-tap-and-hold gesture information to be sent
with wrong coordinates.

Change-Id: I5129dd5bc49edcaab29e8e76ccf1e5cd177fb306

src/navigator.c

index 9a5913e655f5aaa9673015180e4de02cb06028b8..d0f7cbf69e6335e34f0b378b0ca5d184751d04b1 100644 (file)
@@ -2244,11 +2244,13 @@ TIZEN_PROD_STATIC void on_gesture_detected(void *data, const Eldbus_Message *msg
                DEBUG("One finger single tap aborted");
                nd->prepared = true;
 
-               AtspiAccessible *obj = _get_currently_controlled_accessible(nd->current_obj);
-               if (_is_slider(obj))
-                       _highlight_on_slider(EINA_TRUE);
-               _send_highlighted_object_info(nd, obj, info);
-               g_object_unref(obj);
+               if (!app_tracker_null_context_is(nd->app_tracker_data)) {
+                       AtspiAccessible *obj = _get_currently_controlled_accessible(nd->current_obj);
+                       if (_is_slider(obj))
+                               _highlight_on_slider(EINA_TRUE);
+                       _send_highlighted_object_info(nd, obj, info);
+                       g_object_unref(obj);
+               }
 
                if (vc_get_sound_feedback())
                        smart_notification(LONG_PRESS_NOTIFICATION_EVENT, 0, 0);