[screen-reader] Remove subroot window when respective window is removed 92/243492/2
authorPrasoon Singh <prasoon.16@samsung.com>
Thu, 3 Sep 2020 08:38:53 +0000 (14:08 +0530)
committerArtur Świgoń <a.swigon@samsung.com>
Mon, 7 Sep 2020 13:19:02 +0000 (15:19 +0200)
Sometimes, state-changed:visibal signal does not come and subroot can not be
removed. Use window remove function which is called from app tracker on
state-changed:showing signal too.

Change-Id: Ie9cfd418ff96e9d0da1fd0f30b4cf3007eacb65d

src/window_tracker.c

index f075b90ae83c854cb12c266dd362afd4623c3725..9897244b180e6fbfa60df8824c80bec1cd5ef30d 100644 (file)
@@ -277,6 +277,11 @@ static void _window_remove(WindowTrackerData *wtd, AtspiAccessible *window)
                removed_index++;
        }
 
+       if (wtd->subroot && window == wtd->subroot) {
+               DEBUG("Remove subroot: %p ", wtd->subroot);
+               wtd->subroot = NULL;
+       }
+
        if (!window_removed) {
                gchar *id = atspi_accessible_get_unique_id(window, NULL);
                DEBUG("END - try to remove not appended window: %s", id);