[M120 Migration]Show the context menu immediately when there is no 49/307949/3
authorManjeet <manjeet.1@partner.samsung.com>
Thu, 14 Mar 2024 12:12:55 +0000 (17:42 +0530)
committerDae-Hyun Ko <dhyuna.ko@samsung.com>
Tue, 19 Mar 2024 07:53:10 +0000 (07:53 +0000)
selection controller.

This patch shows the context menu immediately when there is no selection
controller.

Reference:
https://review.tizen.org/gerrit/292065

Change-Id: I30e1bd26462883d5a5ced7c372a6fb524bfcc332
Signed-off-by: Manjeet <manjeet.1@partner.samsung.com>
tizen_src/ewk/efl_integration/eweb_view.cc

index dbff94f..aecad42 100644 (file)
@@ -1393,12 +1393,13 @@ void EWebView::HandleLongPressGesture(
   convertedParams.x += x;
   convertedParams.y += y;
 
+  bool show_context_menu_now = true;
   if (GetSelectionController() && GetSelectionController()->GetLongPressed()) {
-    bool show_context_menu_now =
-        !GetSelectionController()->HandleLongPressEvent(convertedPoint,
-                                                        convertedParams);
-    if (show_context_menu_now)
-      ShowContextMenuInternal(convertedParams);
+    show_context_menu_now = !GetSelectionController()->HandleLongPressEvent(
+        convertedPoint, convertedParams);
+  }
+  if (show_context_menu_now) {
+    ShowContextMenuInternal(convertedParams);
   }
 }