Commit 7a46ee63e02e186a0a5bfd1f018bccef5828193c

Authored by Adeel Kazmi
1 parent f95b1257

Size negotiation Example only exits if BACK/ESC is unhandled

Change-Id: Ia11d6ba26ef654ca6c531a169223bc27b4d86e58
examples/size-negotiation/size-negotiation-example.cpp
... ... @@ -19,6 +19,7 @@
19 19 #include <dali/dali.h>
20 20 #include <dali-toolkit/dali-toolkit.h>
21 21 #include <dali-toolkit/devel-api/controls/popup/popup.h>
  22 +#include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
22 23  
23 24 using namespace Dali;
24 25  
... ... @@ -112,8 +113,12 @@ public:
112 113 // The Init signal is received once (only) during the Application lifetime
113 114 Stage stage = Stage::GetCurrent();
114 115  
115   - // Respond to key events
116   - stage.KeyEventSignal().Connect(this, &SizeNegotiationController::OnKeyEvent);
  116 + // Respond to key events if not handled
  117 + Toolkit::KeyInputFocusManager keyInputFocusManager = Toolkit::KeyInputFocusManager::Get();
  118 + if( keyInputFocusManager )
  119 + {
  120 + keyInputFocusManager.UnhandledKeyEventSignal().Connect(this, &SizeNegotiationController::OnKeyEvent);
  121 + }
117 122  
118 123 // Creates a default view with a default tool bar.
119 124 // The view is added to the stage.
... ...