fixes: unnecessary activate being sent on highlighted widget when activation happens in keyboard.
Test: Double tap on spinner, entry is shown, now select any number by double tapping on keyboard, the number should get entered in to spinner.
Change-Id: I0efddbebf61aa62030dfa121f59867af313793e2
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
typedef void (*Keyboard_Tracker_Cb) (void *data, Key k);
void keyboard_tracker_init(void);
void keyboard_tracker_shutdown(void);
+#ifndef X11_ENABLED
+void keyboard_geometry_set(int x, int y, int width, int height);
+void keyboard_geometry_get(int *x, int *y, int *width, int *height);
+Eina_Bool keyboard_event_status(int x, int y);
+#endif
#include "app_tracker.h"
#include "screen_reader_tts.h"
#include "logger.h"
+#ifndef X11_ENABLED
+#include "keyboard_tracker.h"
+#endif
typedef struct {
AtspiAccessible *base_root;
}
_print_event_object_info(event);
-
+#ifndef X11_ENABLED
+ if (!strcmp(event->type, "object:bounds-changed")
+ && (atspi_accessible_get_role(event->source, NULL) == ATSPI_ROLE_INPUT_METHOD_WINDOW)) {
+ AtspiRect *rect;
+ rect = (AtspiRect *)g_value_get_boxed(&event->any_data);
+ if (rect) {
+ keyboard_geometry_set(rect->x, rect->y, rect->width, rect->height);
+ DEBUG("keyboard_geometry: %d %d %d %d", rect->x, rect->y, rect->width, rect->height);
+ }
+ }
+#endif
if (!strcmp(event->type, "object:property-change:accessible-name") && _object_has_highlighted_state(event->source)) {
gchar *name = atspi_accessible_get_name(event->source, NULL);
DEBUG("New name for object, read:%s", name);
ATSPI_ROLE_HEADER,
ATSPI_ROLE_HEADING,
ATSPI_ROLE_ICON,
+ ATSPI_ROLE_INPUT_METHOD_WINDOW,
ATSPI_ROLE_ENTRY,
ATSPI_ROLE_LABEL,
ATSPI_ROLE_LINK,
case ATSPI_ROLE_PANEL:
case ATSPI_ROLE_TREE_TABLE:
case ATSPI_ROLE_PAGE_TAB_LIST:
+ case ATSPI_ROLE_INPUT_METHOD_WINDOW:
return EINA_FALSE;
case ATSPI_ROLE_DIALOG:
if (!_has_escape_action(obj))
#include "screen_reader_tts.h"
static AtspiDeviceListener *listener;
static AtspiDeviceListener *async_listener;
+#ifndef X11_ENABLED
+static int keyboardX = 0;
+static int keyboardY = 0;
+static int keyboardW = 0;
+static int keyboardH = 0;
+#endif
#ifndef X11_ENABLED
static int prev_keyboard_state = VCONFKEY_ISF_INPUT_PANEL_STATE_HIDE;
#endif
DEBUG("keyboard tracker shutdown");
}
+
+#ifndef X11_ENABLED
+void keyboard_geometry_set(int x, int y, int width, int height)
+{
+ keyboardX = x;
+ keyboardY = y;
+ keyboardW = width;
+ keyboardH = height;
+}
+
+void keyboard_geometry_get(int *x, int *y, int *width, int *height)
+{
+ *x = keyboardX;
+ *y = keyboardY;
+ *width = keyboardW;
+ *height = keyboardH;
+}
+
+Eina_Bool keyboard_event_status(int x, int y)
+{
+ if (prev_keyboard_state == VCONFKEY_ISF_INPUT_PANEL_STATE_SHOW) {
+ if ((y >= keyboardY) && (y <= (keyboardY + keyboardH)) && (x >= keyboardX) && (x <= (keyboardX + keyboardW))) {
+ return EINA_TRUE;
+ }
+ }
+ return EINA_FALSE;
+}
+#endif
{
#ifdef X11_ENABLED
Ecore_X_Window keyboard_win;
+#else
+ Eina_Bool keyboard_status;
#endif
DEBUG("In _on_gestures_detected callback");
Gesture_Info *info = calloc(sizeof(Gesture_Info), 1);
elm_access_adaptor_emit_read(keyboard_win, info->x_end, info->y_end);
break;
}
+#else
+ keyboard_status = keyboard_event_status(info->x_end, info->y_end);
+ if (keyboard_status) break;
#endif
_focus_widget(info);
}
elm_access_adaptor_emit_read(keyboard_win, info->x_end, info->y_end);
break;
}
+#else
+ keyboard_status = keyboard_event_status(info->x_end, info->y_end);
+ if (keyboard_status) break;
#endif
if (!prepared)
_focus_widget(info);
elm_access_adaptor_emit_activate(keyboard_win, info->x_end, info->y_end);
break;
}
+#else
+ keyboard_status = keyboard_event_status(info->x_end, info->y_end);
+ if (keyboard_status) break;
#endif
_activate_widget();
break;