DecoratorWindow::GetInstance()->SetDecoratorWindow(top_window_);
TvWindowManager::GetInstance()->Initialize(top_window_);
SetDisplayRotatorCallback();
- CreateMouseCursor(ewk_view);
SetAppMetaDataInfo();
SetRuntimeVariables();
SetProxyInfo();
}
void WRTNativeWindowTV::CreateMouseCursor(Evas_Object* window) {
+ static bool mouse_initialize = false;
+ if (mouse_initialize)
+ return;
+
+ auto& setting_info = ApplicationData::GetInstance().setting_info();
+ std::string pointing_device_support = setting_info.pointing_device_option();
+ LOG(INFO) << "pointing_device_support = " << pointing_device_support;
+ if ((pointing_device_support == "" || pointing_device_support == "disable") &&
+ !IsSmartMonitor()) {
+ mouse_initialize = true;
+ return;
+ }
+
Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(nullptr);
struct wl_display* display = ecore_wl2_display_get(wl2_display);
Eina_Iterator* globals = ecore_wl2_display_globals_get(wl2_display);
struct wl_registry* registry = ecore_wl2_display_registry_get(wl2_display);
- struct wl_seat* seat =
- ecore_wl2_input_seat_get(ecore_wl2_input_default_input_get(wl2_display));
+ Ecore_Wl2_Input* input = ecore_wl2_input_default_input_get(wl2_display);
+ struct wl_seat* seat = ecore_wl2_input_seat_get(input);
Ecore_Wl2_Global* global;
EINA_ITERATOR_FOREACH(globals, global) {
ecore_evas_ecore_evas_get(evas_object_evas_get(window))));
ecore_wl2_sync();
- auto& setting_info = ApplicationData::GetInstance().setting_info();
- std::string pointing_device_support = setting_info.pointing_device_option();
- LOG(INFO) << "pointing_device_support = " << pointing_device_support;
if (pointing_device_support == "" || pointing_device_support == "disable") {
- ecore_evas_aux_hint_add(GetPlatformCanvas(), kPointingDeviceSupport, "0");
- if (!Cursor_UnSet_Config(surface, TIZEN_CURSOR_CONFIG_CURSOR_AVAILABLE))
- LOG(ERROR) << "unset cursor config failed";
+ // only smart monitor will execute this logic
+ elm_win_aux_hint_add(top_window_, kPointingDeviceSupport, "0");
+ ecore_wl2_input_cursor_theme_name_set(input, "vd-cursors");
+ ecore_wl2_input_cursor_from_name_set(input, "normal_transparent");
+#if !defined(WRT_JS_BRINGUP)
+ if (auto* rwhv = GetRenderWidgetHostView())
+ rwhv->SetMouseEventsEnabled(false);
+ else
+ LOG(WARNING) << "rwhv is null, cannot set cursor by client";
+#endif
} else {
- ecore_evas_aux_hint_add(GetPlatformCanvas(), kPointingDeviceSupport, "1");
+ elm_win_aux_hint_add(top_window_, kPointingDeviceSupport, "1");
if (Cursor_Set_Config(surface, TIZEN_CURSOR_CONFIG_CURSOR_AVAILABLE,
nullptr)) {
if (setting_info.pointing_device_option() == "mouse-no-hide") {
LOG(ERROR) << "set cursor config avaiable failed";
}
}
+
CursorModule_Finalize();
+ mouse_initialize = true;
}
// static
}
void WRTNativeWindowTV::Focus(bool focus) {
+ CreateMouseCursor(view_evas());
if (!is_main_native_window_)
return;