Find works in browsers.

This commit is contained in:
Storm Dragon committed 2026-11-05 12:34:36 -05:00
1 parent 1074904c5d
commit ac67236eca
8 files changed
+307 -7

No files matched your search

+4 -5
View File
@@ -657,8 +657,9 @@ gboolean cthulhu_may_be_background_notification(AtspiAccessible *source) {
// its frame; a standalone dialog directly below the application owns itself.
// GTK plugs also publish a frame, but its parent chain crosses the socket's
// provider before reaching the host window. Keep that host as the owner while
// retaining the source object's provider identity. Same-provider nested frames
// retain their existing nearest-window behavior.
// retaining the source object's provider identity. Nested frames (such as
// Chromium's Find bar) belong to their outer frame too: they have no independent
// X11 foreground window or ACTIVE state.
AtspiAccessible *cthulhu_window_ancestor(AtspiAccessible *source) {
if (source == NULL) return NULL;
AtspiAccessible *current = g_object_ref(source);
@@ -676,9 +677,7 @@ AtspiAccessible *cthulhu_window_ancestor(AtspiAccessible *source) {
g_object_unref(current);
return window;
}
if ((role == ATSPI_ROLE_FRAME || role == ATSPI_ROLE_WINDOW) &&
(window == NULL || g_strcmp0(cthulhu_accessible_bus_name(window),
cthulhu_accessible_bus_name(current)) != 0)) {
if (role == ATSPI_ROLE_FRAME || role == ATSPI_ROLE_WINDOW) {
if (window != NULL) g_object_unref(window);
window = g_object_ref(current);
}