[Tizen] Rearrange Accessibility conditionals 43/289543/1 accepted/tizen/6.0/unified/20230310.021402 submit/tizen_6.0/20230309.101056
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 9 Mar 2023 10:02:42 +0000 (19:02 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 9 Mar 2023 10:06:39 +0000 (19:06 +0900)
- Removed to check conditions of the quickpanel info
 because it's already checked in FocusChanged and Window resource id.

- All gestures should check window resource id.

- `IsForcedShown()` conditions move to the above.

Change-Id: I6a9b4e378632679600c204ad1c72ac0ab4638bab
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali/internal/window-system/common/event-handler.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp

index 0f90d37ef4e6e2eaf3f44a879efb71fde2e6185d..4f405b9fce7ef2691f643ea8f082306d762199e9 100755 (executable)
@@ -298,26 +298,6 @@ void EventHandler::OnAccessibilityNotification( const WindowBase::AccessibilityI
     return;
   }
 
-  if( info.gestureValue == 15 ) // ONE_FINGER_SINGLE_TAP
-  {
-    DALI_LOG_ERROR("[FYI] Native window resource ID : %s, Touched window resource ID : %d \n", mWindowBase->GetNativeWindowResourceId().c_str(), info.resourceId);
-    if( std::to_string( info.resourceId ) == mWindowBase->GetNativeWindowResourceId() )
-    {
-      if( !accessibilityAdaptor->IsEnabled() )
-      {
-        // Accessibility gesture was sent to this window, so enable accessibility
-        accessibilityAdaptor->EnableAccessibility();
-      }
-    }
-    else
-    {
-      // Ignore tap gesture - it should be handled by another window (possibly in another application),
-      // for which the resource ID matches with the one stored in AccessibilityInfo.
-      DALI_LOG_ERROR("Ignore Single tap gesture because the gesture should be handled by other window. \n");
-      return;
-    }
-  }
-
   if( accessibilityAdaptor->IsForcedShown() )
   {
     DALI_LOG_ERROR("InsideFridge app calls the API \n");
@@ -333,24 +313,27 @@ void EventHandler::OnAccessibilityNotification( const WindowBase::AccessibilityI
     }
   }
 
-  if( !accessibilityAdaptor->IsEnabled() )
+  DALI_LOG_ERROR("[FYI] Native window resource ID : %s, Touched window resource ID : %d \n", mWindowBase->GetNativeWindowResourceId().c_str(), info.resourceId);
+  if( std::to_string( info.resourceId ) == mWindowBase->GetNativeWindowResourceId() )
   {
-    DALI_LOG_ERROR( "The current dali accessibility is not available. \n" );
-    return;
+    if( !accessibilityAdaptor->IsEnabled() )
+    {
+      // Accessibility gesture was sent to this window, so enable accessibility
+      accessibilityAdaptor->EnableAccessibility();
+    }
   }
-
-  if( ( info.quickpanelInfo & ( 1 << QUICKPANEL_TYPE_SYSTEM_DEFAULT ) ) && ( info.quickpanelInfo & ( 1 << QUICKPANEL_TYPE_APPS_MENU ) ) )
+  else
   {
-    DALI_LOG_ERROR("Quickpanel is top now, so all dali apps should be stopped \n");
+    // Ignore tap gesture - it should be handled by another window (possibly in another application),
+    // for which the resource ID matches with the one stored in AccessibilityInfo.
+    DALI_LOG_ERROR("Ignore Single tap gesture because the gesture should be handled by other window. \n");
     return;
   }
 
-  if( !(info.quickpanelInfo & ( 1 << QUICKPANEL_TYPE_APPS_MENU ) ) && accessibilityAdaptor->IsForcedEnable() )
+  if( !accessibilityAdaptor->IsEnabled() )
   {
-    // When other apps, which are not implemented by DALi, are on top of Apps application,
-    // no event should be occurred on Apps because it's disabled by force already.
-    DALI_LOG_ERROR("NO Effect! => Currently, all DALi applications do not receive any events because another app, which is not implemented by DALi, is at the top of the layer. \n");
-    //return;
+    DALI_LOG_ERROR( "The current dali accessibility is not available. \n" );
+    return;
   }
 
   DALI_LOG_ERROR("[FYI] Accessibility gesture value : %d, state : %d \n", info.gestureValue, info.state);
index 33979a83b6199d8a5c15300c941a80ec54b2ebbf..e83ade5d9435a8482fa40767b875591b679d5ca5 100755 (executable)
@@ -1350,6 +1350,9 @@ void WindowBaseEcoreWl2::OnEcoreElDBusAccessibilityQuickpanelChanged( void* cont
     mAccessibilityInfo.quickpanelInfo &= ~( 1 << type );
   }
 
+  // info '0' is MenuScreen enabled / '2' and '10' is QuickPanel enabled / '8' is Apps enabled
+  DALI_LOG_ERROR("Quickpanel info is [ %d ]\n", mAccessibilityInfo.quickpanelInfo);
+
   mQuickPanelSignal.Emit( mAccessibilityInfo.quickpanelInfo );
 #endif
 }