Calling ProcessCoreEvents synchronously in time tick callback of WatchApplication
[platform/core/uifw/dali-adaptor.git] / adaptors / wearable / watch-application-impl.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 2f47a33..7bad7fe
@@ -50,12 +50,22 @@ void WatchApplication::OnTimeTick(WatchTime& time)
 {
   Dali::WatchApplication watch(this);
   mTickSignal.Emit( watch, time );
+
+  // A watch application will queue messages to update the UI in the signal emitted above
+  // Process these immediately to avoid a blinking issue where the old time is briefly visible
+  CoreEventInterface& eventInterface = Internal::Adaptor::Adaptor::GetImplementation( GetAdaptor() );
+  eventInterface.ProcessCoreEvents();
 }
 
 void WatchApplication::OnAmbientTick(WatchTime& time)
 {
   Dali::WatchApplication watch(this);
   mAmbientTickSignal.Emit( watch, time );
+
+  // A watch application will queue messages to update the UI in the signal emitted above
+  // Process these immediately to avoid a blinking issue where the old time is briefly visible
+  CoreEventInterface& eventInterface = Internal::Adaptor::Adaptor::GetImplementation( GetAdaptor() );
+  eventInterface.ProcessCoreEvents();
 }
 
 void WatchApplication::OnAmbientChanged(bool ambient)