[WRTjs][VD] Set focus ewk_view when splash screen is gone 83/304183/3
authorDongHyun Song <dh81.song@samsung.com>
Thu, 11 Jan 2024 11:45:36 +0000 (20:45 +0900)
committerBot Blink <blinkbot@samsung.com>
Fri, 12 Jan 2024 08:51:45 +0000 (08:51 +0000)
With SSS case, If ewk_view has focus before window visible, when the
window comes visible, ewk_view has unfocused due to splash screen
Evas_Object.
Even though web contens is visible after splash screen closed, it doesn't
get focus.

So this patch gives the focus explicitly again when splash screen is gone.

Change-Id: Ida8081ad5d25a00446840246ed9b33e5835ab095
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
wrt/src/browser/splash_screen.cc
wrt/src/browser/tv/wrt_native_window_tv.h

index 286908daca2b34cdd5ddc255e698dedec73979d4..b0f7ac38b75c4b2452b42e74a0e88f2c58800751 100644 (file)
@@ -23,6 +23,7 @@
 #include <vconf.h>
 
 #include "wrt/src/browser/tv/video_splash_screen.h"
+#include "wrt/src/browser/tv/wrt_native_window_tv.h"
 #endif
 
 namespace wrt {
@@ -148,6 +149,12 @@ SplashScreen::~SplashScreen() {
   evas_object_hide(image_);
   evas_object_del(background_);
   evas_object_del(image_);
+
+#if defined(OS_TIZEN_TV_PRODUCT)
+  auto native_window = WRTNativeWindowTV::GetMainNativeWindow();
+  if (native_window)
+    native_window->SetKeyEventChecker();
+#endif
 }
 
 std::pair<int, int> SplashScreen::GetDimensions(Evas_Object* window) {
index dd59edbe9a261944f6d770fc2c18762a672c1048..481caaccd709fc3656f02b40561dc79f21d929a6 100644 (file)
@@ -61,6 +61,7 @@ class WRTNativeWindowTV : public WRTNativeWindow {
   void GetImeAndKeyPadConfig(bool& show_ime_panel,
                              bool& keypad_without_user_action);
   void HalfWindowSupport(std::string position);
+  void SetKeyEventChecker();
   void SetScreenResolution(unsigned int width, unsigned int height);
   void SetUseFocus(bool use_focus);
   void SetWindowAlpha(bool alpha);
@@ -111,7 +112,6 @@ class WRTNativeWindowTV : public WRTNativeWindow {
   void SetDisplayRotatorCallback();
   void SetInvisibleDelivery();
   void SetKeyboardFuncKey();
-  void SetKeyEventChecker();
   void SetProxyInfo();
   void SetDiskCacheMode();
   void SetResizableRectangle();