static void _view_content_changed(AtspiAccessible *root, void *user_data)
{
- AtspiRole role = -1;
-
Service_Data *sd = (Service_Data*)user_data;
if (sd == NULL) {
ERROR("NULL context service_data");
switch(atspi_accessible_get_role(root, NULL))
{
- case ATSPI_ROLE_WINDOW :
- role = atspi_accessible_get_role(flat_navi_context_current_get(sd->flat_navi_context), NULL);
- if(role == ATSPI_ROLE_PAGE_TAB || //add more roles...
- role == ATSPI_ROLE_PAGE_TAB_LIST)
- {
- _current_highlight_object_set(nd, vconf_data, haptic_data, tts_data, flat_navi_context_current_get(sd->flat_navi_context), HIGHLIGHT_FIRST);
- }
- else
- {
- char *description = NULL;
- description = atspi_accessible_get_description(root, NULL);
- if(!strcmp(description,"\0"))
- description = generate_what_to_read(root, vconf_data);
-
- tts_speak(description, EINA_TRUE, tts_data);
- free(description);
- }
- break;
case ATSPI_ROLE_POPUP_MENU:
- case ATSPI_ROLE_DIALOG :
+ case ATSPI_ROLE_DIALOG:
_current_highlight_object_set(nd, vconf_data, haptic_data, tts_data, flat_navi_context_current_get(sd->flat_navi_context), HIGHLIGHT_FIRST);
break;
default :
static void _on_atspi_window_cb(const AtspiEvent *event)
{
+ if (!event || !event->type || !event->source) {
+ ERROR("NULL event");
+ return;
+ }
+
Service_Data *sd = get_pointer_to_service_data_struct();
if (!sd) {
ERROR("NULL context");
}
gchar *name = atspi_accessible_get_name(event->source, NULL);
+ if (!name) {
+ ERROR("NULL name");
+ return;
+ }
Window_Tracker_Cb user_cb = wtd->user_cb;
DEBUG("Event: %s: %s", event->type, name);
- if (!strcmp(event->type, "window:activate") && wtd->last_active_win != event->source) //if we got activate 2 times
+ if (!strcmp(event->type, "window:activate"))
{
if (wtd->user_cb)
user_cb(wtd->user_data, event->source);
wtd->top_win = wtd->last_active_win;
}
- if (!strcmp(event->type, "object:state-changed:visible") && !strcmp(name, "Quickpanel Window"))
+ if (!strcmp(event->type, "object:state-changed:visible") && (!strcmp(name, "Quickpanel Window") || !strcmp(name, "volume")))
{
if (event->detail1)
{