[Tizen][AT-SPI] Track widget lifecycle 10/315110/2
authorArtur Świgoń <a.swigon@samsung.com>
Thu, 4 Jul 2024 09:12:52 +0000 (11:12 +0200)
committerArtur Świgoń <a.swigon@samsung.com>
Thu, 25 Jul 2024 08:53:49 +0000 (10:53 +0200)
This is a follow-up on the patch "Track application lifecycle"
(Change-Id: I451b70fe90568f0df66f75b9b0a889b75849f0c4) which didn't
handle widgets and thus left the bridge in a disabled state.

Change-Id: I168b5df2149d6e59e1d9265aabe317f2ff0b4d84

dali/internal/system/tizen-wayland/widget-controller-tizen.cpp

index 5e03ef1d457a5c211767872df92b8ea7af6ff2c3..311df34e61ca5a6812bc440fcd047d40cefc528e 100644 (file)
@@ -70,13 +70,16 @@ void WidgetImplTizen::SetUsingKeyEvent(bool flag)
 
 void WidgetImplTizen::SetInformation(Dali::Window window, const std::string& widgetId)
 {
-  using Dali::Accessibility::Bridge;
-
   mWindow = window;
   mWidgetId = widgetId;
 
-  auto preferredBusName = Bridge::MakeBusNameForWidget(widgetId);
-  Bridge::GetCurrentBridge()->SetPreferredBusName(preferredBusName);
+  auto bridge           = Accessibility::Bridge::GetCurrentBridge();
+  auto preferredBusName = Accessibility::Bridge::MakeBusNameForWidget(widgetId);
+
+  // Ensure the bridge is at least in an unlocked state. Normal application callbacks that would
+  // call Bridge::ApplicationPaused/Resumed() elsewhere are not operational in widget scenarios.
+  bridge->ApplicationResumed();
+  bridge->SetPreferredBusName(preferredBusName);
 
   // Widget should not send window events (which could narrow down the navigation context)
   auto& suppressedEvents = Accessibility::Accessible::Get(window.GetRootLayer())->GetSuppressedEvents();