+ bool consumed = false;
+ Actor actor = GetCurrentFocusActor();
+ if(actor)
+ {
+ // Notify the actor about the wheel event
+ consumed = EmitCustomWheelSignals(actor, event);
+ }
+ return consumed;
+}
+
+bool KeyboardFocusManager::EmitCustomWheelSignals(Actor actor, const WheelEvent& event)
+{
+ bool consumed = false;
+
+ if(actor)
+ {
+ Dali::Actor oldParent(actor.GetParent());
+
+ // Only do the conversion and emit the signal if the actor's wheel signal has connections.
+ if(!actor.WheelEventSignal().Empty())
+ {
+ // Emit the signal to the parent
+ consumed = actor.WheelEventSignal().Emit(actor, event);
+ }
+ // if actor doesn't consume WheelEvent, give WheelEvent to its parent.
+ if(!consumed)
+ {
+ // The actor may have been removed/reparented during the signal callbacks.
+ Dali::Actor parent = actor.GetParent();
+
+ if(parent &&
+ (parent == oldParent))
+ {
+ consumed = EmitCustomWheelSignals(parent, event);
+ }
+ }
+ }
+
+ return consumed;
+}
+
+void KeyboardFocusManager::OnWindowFocusChanged(Window window, bool focusIn)
+{
+ if(focusIn && mCurrentFocusedWindow.GetHandle() != window.GetRootLayer())