Add default keyboard size hints just in case no values are provided 41/147641/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 5 Sep 2017 07:38:58 +0000 (16:38 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 5 Sep 2017 07:39:12 +0000 (16:39 +0900)
Change-Id: I97929932d4185771cd3c38b579c2b1b1eabd9f02

src/sclcoreui-efl.cpp

index 317448ac21b848ec2534d31bbfae682211a37cba..8202381b96519c3be83dd472e2499ca366bd5217 100644 (file)
@@ -135,6 +135,7 @@ void CSCLCoreUIEFL::set_keyboard_size_hints(SclSize portrait, SclSize landscape)
     ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 270, 0, 0, landscape.height, landscape.width);
     */
 #endif
+    LOGD("%d %d %d %d", portrait.width, portrait.height, landscape.width, landscape.height);
 }
 
 void CSCLCoreUIEFL::set_floating_mode(sclboolean floating_mode)
@@ -428,6 +429,16 @@ sclboolean CSCLCoreUIEFL::create_main_window()
     ecore_x_icccm_name_class_set(elm_win_xwindow_get(main_window), "Virtual Keyboard", "ISF");
 #endif
 
+    Evas_Coord win_w = 0, win_h = 0;
+    elm_win_screen_size_get(main_window, NULL, NULL, &win_w, &win_h);
+    SclSize portrait;
+    portrait.width = win_w;
+    portrait.height = win_h / 3;
+    SclSize landscape;
+    landscape.width = win_h;
+    landscape.height = win_w / 3;
+    set_keyboard_size_hints(portrait, landscape);
+
     return TRUE;
 }