-: mSurface(NULL),
- mIndicatorStyle(Dali::Window::CHANGEABLE_COLOR),
- mIndicatorVisible(Dali::Window::VISIBLE),
- mIndicatorIsShown(false),
- mShowRotatedIndicatorOnClose(false),
- mStarted(false),
- mIsTransparent(false),
- mWMRotationAppSet(false),
- mIndicator(NULL),
- mIndicatorOrientation(Dali::Window::PORTRAIT),
- mNextIndicatorOrientation(Dali::Window::PORTRAIT),
- mIndicatorOpacityMode(Dali::Window::OPAQUE),
- mOverlay(NULL),
- mAdaptor(NULL)
-{
+: mSurface( NULL ),
+ mIndicatorVisible( Dali::Window::INVISIBLE ),
+ mIndicatorIsShown( false ),
+ mShowRotatedIndicatorOnClose( false ),
+ mStarted( false ),
+ mIsTransparent( false ),
+ mWMRotationAppSet( false ),
+ mEcoreEventHander( true ),
+ mIsFocusAcceptable( true ),
+ mVisible( true ),
+ mIndicator( NULL ),
+ mIndicatorOrientation( Dali::Window::PORTRAIT ),
+ mNextIndicatorOrientation( Dali::Window::PORTRAIT ),
+ mIndicatorOpacityMode( Dali::Window::OPAQUE ),
+ mOverlay( NULL ),
+ mAdaptor( NULL ),
+ mEventHandler( NULL ),
+ mPreferredOrientation( Dali::Window::PORTRAIT )
+{
+
+ // Detect if we're not running in a ecore main loop (e.g. libuv).
+ // Typically ecore_x_init is called by app_efl_main->elm_init
+ // but if we're not using app_efl_main then we have to call it ourselves
+ // This is a hack until we create a pure X Window class
+ if( ecore_x_display_get() == NULL )
+ {
+ mEcoreEventHander = false;
+ ecore_x_init (NULL); // internally calls _ecore_x_input_init
+ }
+