SetRuntimeVariables();
SetProxyInfo();
SetDiskCacheMode();
+
+ SetMaxWindowSizeRect();
}
void WRTNativeWindowTV::Finalize() {
mouse_initialize = true;
}
+void WRTNativeWindowTV::SetMaxWindowSizeRect() {
+ // window is resized to 1920*1920 by efl in some rotation cases(IME is
+ // showing, rotate). so add a rect to restrict the size of window.
+ window_size_rect_ =
+ evas_object_rectangle_add(evas_object_evas_get(top_window_));
+ evas_object_size_hint_min_set(window_size_rect_, predefined_screen_width,
+ predefined_screen_height);
+ elm_win_resize_object_add(top_window_, window_size_rect_);
+}
+
// static
void WRTNativeWindowTV::SetGlobalResourceId(Evas_Object* top_window) {
if (global_resource_id)
if (abs(origin_degree - degree) != 180 && rwhv)
rwhv->ClearAllTilesResources();
- int w, h;
- evas_object_geometry_get(top_window_, nullptr, nullptr, &w, &h);
- evas_object_resize(top_window_, w, h);
- LOG(INFO) << "degree : " << degree << " (" << w << "x" << h << ")";
+ int screen_width = 1920, screen_height = 1080;
+ GetScreenResolution(screen_width, screen_height);
+ if (degree == 90 || degree == 270) {
+ evas_object_size_hint_min_set(window_size_rect_, screen_height,
+ screen_width);
+ evas_object_resize(view_evas(), screen_height, screen_width);
+ } else {
+ evas_object_size_hint_min_set(window_size_rect_, screen_width,
+ screen_height);
+ evas_object_resize(view_evas(), screen_width, screen_width);
+ }
}
void WRTNativeWindowTV::LowerWindow() {
void SetInvisibleDelivery();
void SetKeyboardFuncKey();
void SetKeyEventChecker();
+ void SetMaxWindowSizeRect();
void SetProxyInfo();
void SetDiskCacheMode();
void SetRuntimeVariables();
sensor_listener_h rotation_listener_;
Evas_Object* top_window_;
+ Evas_Object* window_size_rect_;
electron::WebContentsZoomController* zoom_controller_ = nullptr;
double zoom_factor_ = 1.0;
#endif
Ecore_Event_Handler* visibility_handler_ = nullptr;
-int predefined_screen_width = 0;
-int predefined_screen_height = 0;
void SetVisibilityCallback(Evas_Object* top_window) {
LOG(INFO) << "Set callbacks for visibility change";
Evas_Object* WRTNativeWindow::layout_ = nullptr;
Evas_Object* WRTNativeWindow::conformant_ = nullptr;
+int WRTNativeWindow::predefined_screen_width = 0;
+int WRTNativeWindow::predefined_screen_height = 0;
+
// static
WRTNativeWindow* WRTNativeWindow::GetMainNativeWindow() {
return electron::WindowList::IsEmpty()
bool is_enabled_ = true;
content::WebContents* web_contents_;
+ static int predefined_screen_width;
+ static int predefined_screen_height;
+
private:
static void OnHWBackKey(void*, Evas_Object*, void*);
static void OnHWMoreKey(void*, Evas_Object*, void*);