Fix for repeating in some instances, e.g. pidgin.
This commit is contained in:
1 parent
4d29f2bb23
commit
b232c1eebb
20 files changed
+921
-7
No files matched your search
@@ -462,7 +462,24 @@ cthulhu_snapshot cthulhu_capture_snapshot(AtspiAccessible *source, gboolean capt
|
||||
}
|
||||
snapshot.description = atspi_accessible_get_description(source, &error);
|
||||
if (error != NULL) {
|
||||
g_error_free(error);
|
||||
g_clear_error(&error);
|
||||
}
|
||||
// Orca uses the containing panel's label for otherwise unlabeled icons.
|
||||
// Keep an icon's own name/description and never borrow from other roles.
|
||||
if (!snapshot.defunct && g_strcmp0(snapshot.role, "icon") == 0 &&
|
||||
(snapshot.name == NULL || *snapshot.name == '\0') &&
|
||||
(snapshot.description == NULL || *snapshot.description == '\0')) {
|
||||
AtspiAccessible *parent = atspi_accessible_get_parent(source, &error);
|
||||
if (error == NULL && parent != NULL && atspi_accessible_get_role(parent, NULL) == ATSPI_ROLE_PANEL) {
|
||||
g_free(snapshot.name);
|
||||
snapshot.name = atspi_accessible_get_name(parent, NULL);
|
||||
if (snapshot.name == NULL || *snapshot.name == '\0') {
|
||||
g_free(snapshot.name);
|
||||
snapshot.name = atspi_accessible_get_description(parent, NULL);
|
||||
}
|
||||
}
|
||||
if (parent != NULL) g_object_unref(parent);
|
||||
g_clear_error(&error);
|
||||
}
|
||||
if (captureDocumentMetadata) {
|
||||
cthulhu_capture_document_metrics(source, &snapshot);
|
||||
|
||||
Reference in new issue
Block a user