From a88c18a08bc02e21f193de0c1c51eab94b0c0d13 Mon Sep 17 00:00:00 2001 From: Hosang Kim Date: Mon, 13 May 2024 21:02:56 +0900 Subject: [PATCH] libaurum: add checking visibility of input window. Input window(like as keyboard) is always activated. So we can't know input window is showing actually. Change-Id: I8b01fdf38b05ba49cb1ad645f1179eb884219f49 --- .../src/Impl/Accessibility/AtspiAccessibleWatcher.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc b/libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc index eef77e1..ffaa7b5 100644 --- a/libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc +++ b/libaurum/src/Impl/Accessibility/AtspiAccessibleWatcher.cc @@ -399,6 +399,16 @@ void AtspiAccessibleWatcher::onAtspiEvents(AtspiEvent *event, void *watcher) return; } + if (!strncmp(event->type, "object:state-changed:visible", 28)) + { + char *role = AtspiWrapper::Atspi_accessible_get_role_name(event->source, NULL); + if (!strncmp(role, "input method window", 19)) + { + isWindowEventEmitted = true; + } + free(role); + } + if (!strncmp(event->type, "w", 1)) { isWindowEventEmitted = true; -- 2.34.1