Do not try to consume gestures in null context mode 94/282594/1
authorArtur Świgoń <a.swigon@samsung.com>
Thu, 6 Oct 2022 09:06:37 +0000 (11:06 +0200)
committerArtur Świgoń <a.swigon@samsung.com>
Thu, 6 Oct 2022 09:06:40 +0000 (11:06 +0200)
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 446d2ef7f2643176628c8c3ce8bab43fcfb12136..b14e9218a05fbd692bad6f9d2b5ba42d8984b196 100644 (file)
@@ -2277,7 +2277,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;
        }
@@ -2736,6 +2736,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();