Do not try to consume gestures in null context mode 15/306715/2
authorArtur Świgoń <a.swigon@samsung.com>
Thu, 6 Oct 2022 09:06:37 +0000 (11:06 +0200)
committerMaria Bialota <m.bialota@samsung.com>
Mon, 26 Feb 2024 14:34:29 +0000 (15:34 +0100)
Screen Reader tries to perform the gesture on the special null context object
(currently, the desktop). The DoGesture call in such a case will always fail
(and count as not consumed), so there is no need to even attempt it.

Change-Id: I59f62b7dcb2235852a6960099091976ae79865e8

src/navigator.c

index 25a8a862a87b4512abb90fb0a00014cbab0b0351..9a5913e655f5aaa9673015180e4de02cb06028b8 100644 (file)
@@ -2262,7 +2262,7 @@ TIZEN_PROD_STATIC void on_gesture_detected(void *data, const Eldbus_Message *msg
        }
 
        /* check if object consumes gesture */
-       if (_gesture_is_consumed(nd, info)) {
+       if (!app_tracker_null_context_is(nd->app_tracker_data) && _gesture_is_consumed(nd, info)) {
                g_free(info);
                return;
        }
@@ -2672,6 +2672,7 @@ NavigatorData *navigator_init(void)
        app_tracker_new_obj_highlighted_callback_register(nd->app_tracker_data,
                                                          _new_highlighted_obj_changed,
                                                          nd);
+       app_tracker_null_context_switch(nd->app_tracker_data);
        nd->keyboard_tracker_data = keyboard_tracker_init();
        keyboard_tracker_register_top_window_info_get(nd->keyboard_tracker_data, app_tracker_top_window_info_get_opaque, nd->app_tracker_data);
        smart_notification_init();