OnFocusIn);
evas_object_event_callback_del(content_image_, EVAS_CALLBACK_FOCUS_OUT,
OnFocusOut);
+ evas_object_smart_callback_del(content_image_elm_host_, "focused",
+ OnHostFocusIn);
+ evas_object_smart_callback_del(content_image_elm_host_, "unfocused",
+ OnHostFocusOut);
evas_event_callback_del_full(evas_, EVAS_CALLBACK_RENDER_FLUSH_PRE,
OnEvasRenderFlushPre, this);
evas_object_del(content_image_);
}
void RWHVAuraOffscreenHelperEfl::Focus(bool focus) {
+ LOG(INFO) << "evas_object_focus_set:" << focus;
elm_object_focus_set(content_image_elm_host_, focus);
evas_object_focus_set(content_image_, focus);
+
+#if BUILDFLAG(IS_TIZEN_TV)
+ // sync focus on efl window
+ aura::WindowTreeHost* window_host = rwhva()->window()->GetHost();
+ if (window_host) {
+ static_cast<aura::WindowTreeHostPlatform*>(window_host)
+ ->platform_window()
+ ->UpdateFocus(focus);
+ }
+#endif
}
bool RWHVAuraOffscreenHelperEfl::HasFocus() {
Evas* evas,
Evas_Object* obj,
void* event_info) {
+ LOG(INFO) << "OnFocusIn";
RWHVAuraOffscreenHelperEfl* thiz =
static_cast<RWHVAuraOffscreenHelperEfl*>(data);
thiz->FocusRWHVA();
Evas* evas,
Evas_Object* obj,
void* event_info) {
+ LOG(INFO) << "OnFocusOut";
RWHVAuraOffscreenHelperEfl* thiz =
static_cast<RWHVAuraOffscreenHelperEfl*>(data);
aura::WindowTreeHost* window_host = thiz->rwhva()->window()->GetHost();
void RWHVAuraOffscreenHelperEfl::OnHostFocusIn(void* data,
Evas_Object*,
void*) {
+ LOG(INFO) << "OnHostFocusIn";
RWHVAuraOffscreenHelperEfl* thiz =
static_cast<RWHVAuraOffscreenHelperEfl*>(data);
thiz->Focus(true);
void RWHVAuraOffscreenHelperEfl::OnHostFocusOut(void* data,
Evas_Object*,
void*) {
+ LOG(INFO) << "OnHostFocusOut";
RWHVAuraOffscreenHelperEfl* thiz =
static_cast<RWHVAuraOffscreenHelperEfl*>(data);
if (thiz && thiz->GetRenderWidgetHostImpl())
#endif
#if BUILDFLAG(IS_TIZEN_TV)
+#include "base/base_switches.h"
+#include "base/command_line.h"
#include "third_party/blink/public/platform/web_application_type.h"
#endif
if (key_events_enabled_)
AddKeyCallbacks();
- evas_object_focus_set(events_overlay_, EINA_TRUE);
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableOffscreenRendering))
+#endif
+ evas_object_focus_set(events_overlay_, EINA_TRUE);
if (touch_events_enabled_)
AddTouchCallbacks();
if (has_focus_ == focused)
return;
+ LOG(INFO) << "EflWindow Focus:" << focused;
has_focus_ = focused;
if (events_overlay_) {
// Set focus active for a newly opened window.
#if !defined(BUILD_CHROME)
- UpdateFocus(true);
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableOffscreenRendering))
+#endif
+ UpdateFocus(true);
#endif
efl_event_handler_ = std::make_unique<EflEventHandler>(this);
PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this);
void EflWindow::ResetEventHandler() {
delegate_->OnActivationChanged(false /*active*/);
- UpdateFocus(false);
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableOffscreenRendering))
+#endif
+ UpdateFocus(false);
efl_event_handler_.reset();
PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
}