atspi: use is_first_rotary_control only if screen-read is enabled 76/158476/1
authorShinwoo Kim <cinoo.kim@samsung.com>
Wed, 1 Nov 2017 07:26:43 +0000 (16:26 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Wed, 1 Nov 2017 07:29:01 +0000 (16:29 +0900)
The is_first_rotary_cotrol is used for ignoring the first bezel event,
if the screen-reader is enabled, because the first bezel event should
give highlight to the first item of rotary_selector.

When the screen-reader is disabled, the first bezel event should select
the second item of rotary_selector.

The is_first_rotary_control logic worked even though the screen-reader
is disabled. So the first bezel event did NOT select the second item
of rotary_selector.

Change-Id: I00c6fdcdc48b9e78cdb30af247b5c70f80b18c92

src/wearable/efl_extension_rotary_selector.c

index b21b0b0c9f07c7e625fa53055ad1dcf7e7566e76..42fce93d17d8fb64d01a0a186468d18b7a239d29 100644 (file)
@@ -1406,7 +1406,7 @@ _rotary_selector_rotary_cb(void *data, Evas_Object *obj, Eext_Rotary_Event_Info
           {
              if (!rsd->acceleration)
                {
-                  if (rsd->is_first_rotary_control)
+                  if (elm_atspi_bridge_utils_is_screen_reader_enabled() && rsd->is_first_rotary_control)
                     {
                        rsd->is_first_rotary_control = EINA_FALSE;
                        rsd->selected_index = 0;
@@ -2827,9 +2827,9 @@ eext_rotary_selector_add(Evas_Object *parent)
      {
         evas_object_smart_callback_add(rotary_selector, "more,option,opened", _rotary_selector_moreoption_opened_cb, rsd);
         evas_object_smart_callback_add(rotary_selector, "more,option,closed", _rotary_selector_moreoption_closed_cb, rsd);
+        _rotary_selector_from_moreoption_set(rotary_selector, EINA_FALSE);
+        rsd->is_first_rotary_control = EINA_TRUE;
      }
-   _rotary_selector_from_moreoption_set(rotary_selector, EINA_FALSE);
-   rsd->is_first_rotary_control = EINA_TRUE;
    //
    return rotary_selector;
 }