X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fevent-handler.cpp;h=f412ce1cd863a9547bbca57415b0237bf58b69ec;hb=3ceb53acf36fead27a2eb1fde1b9ea99c0fa97eb;hp=911a3bdafcd3d34e2c6f14e15c1c235f5867b720;hpb=80759a22f22c5b6e82b16a456703840b6f7cc746;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/common/event-handler.cpp b/dali/internal/window-system/common/event-handler.cpp index 911a3bd..f412ce1 100755 --- a/dali/internal/window-system/common/event-handler.cpp +++ b/dali/internal/window-system/common/event-handler.cpp @@ -56,6 +56,9 @@ Integration::Log::Filter* gSelectionEventLogFilter = Integration::Log::Filter::N namespace { +static constexpr auto QUICKPANEL_TYPE_SYSTEM_DEFAULT = 1; +static constexpr auto QUICKPANEL_TYPE_APPS_MENU = 3; + // Copied from x server static uint32_t GetCurrentMilliSeconds(void) { @@ -116,6 +119,7 @@ EventHandler::EventHandler( WindowBase* windowBase, DamageObserver& damageObserv windowBase->SelectionDataReceivedSignal().Connect( this, &EventHandler::OnSelectionDataReceived ); windowBase->StyleChangedSignal().Connect( this, &EventHandler::OnStyleChanged ); windowBase->AccessibilitySignal().Connect( this, &EventHandler::OnAccessibilityNotification ); + windowBase->QuickPanelSignal().Connect( this, &EventHandler::OnAccessibilityQuickpanelChanged ); } else { @@ -267,6 +271,12 @@ void EventHandler::OnAccessibilityNotification( const WindowBase::AccessibilityI return; } + if( ( info.quickpanelInfo & ( 1 << QUICKPANEL_TYPE_SYSTEM_DEFAULT ) ) && ( info.quickpanelInfo & ( 1 << QUICKPANEL_TYPE_APPS_MENU ) ) ) + { + DALI_LOG_ERROR("Quickpanel is top now, so all dali apps should be stopped \n"); + return; + } + // Create a touch point object. PointState::Type touchPointState( PointState::DOWN ); if( info.state == 0 ) @@ -500,6 +510,55 @@ void EventHandler::OnAccessibilityNotification( const WindowBase::AccessibilityI #endif } +void EventHandler::OnAccessibilityQuickpanelChanged( const unsigned char& info ) +{ +#ifdef DALI_ELDBUS_AVAILABLE + if( mPaused ) + { + return; + } + + if( !mAccessibilityAdaptor ) + { + DALI_LOG_ERROR( "Invalid accessibility adaptor\n" ); + return; + } + + AccessibilityAdaptor* accessibilityAdaptor( &AccessibilityAdaptor::GetImplementation( mAccessibilityAdaptor ) ); + if( !accessibilityAdaptor ) + { + DALI_LOG_ERROR( "Cannot access accessibility adaptor\n" ); + return; + } + + // Both QuickPanel and Apps are shown + if( ( info & ( 1 << QUICKPANEL_TYPE_SYSTEM_DEFAULT ) ) && ( info & ( 1 << QUICKPANEL_TYPE_APPS_MENU ) ) ) + { + // dali apps should be disabled. + accessibilityAdaptor->DisableAccessibility(); + } + // Only Apps menu (dali application) is shown + else if( info & ( 1 << QUICKPANEL_TYPE_APPS_MENU ) ) + { + // dali app should be enabled. + accessibilityAdaptor->EnableAccessibility(); + } + // QuickPanel is shown + else if( info & ( 1 << QUICKPANEL_TYPE_SYSTEM_DEFAULT ) ) + { + // dali app should be disabled. + accessibilityAdaptor->DisableAccessibility(); + } + else + { + // dali app should be enabled. + accessibilityAdaptor->EnableAccessibility(); + } + + +#endif +} + void EventHandler::AddObserver( Observer& observer ) { ObserverContainer::iterator match ( find(mObservers.begin(), mObservers.end(), &observer) );