Modified to return hidden state size when requested after slot_hide_ise
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 4 Apr 2013 15:45:36 +0000 (00:45 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 8 Apr 2013 11:19:33 +0000 (20:19 +0900)
Change-Id: I71a440e6eb0beae3680586ecbf27f6ae826f21fe

ism/extras/efl_panel/isf_panel_efl.cpp

index 0b1ea659962bdad157b8505364ebf5ae70944779..2c3804a8da2f9945ba42a0719e1b1c4efd771942 100644 (file)
@@ -167,6 +167,7 @@ static void       slot_exit                            (void);
 
 static void       slot_register_helper_properties      (int id, const PropertyList &props);
 static void       slot_show_ise                        (void);
+static void       slot_hide_ise                        (void);
 
 static void       slot_will_show_ack                   (void);
 static void       slot_will_hide_ack                   (void);
@@ -1962,6 +1963,7 @@ static bool initialize_panel_agent (const String &config, const String &display,
 
     _panel_agent->signal_connect_register_helper_properties (slot (slot_register_helper_properties));
     _panel_agent->signal_connect_show_ise                   (slot (slot_show_ise));
+    _panel_agent->signal_connect_hide_ise                   (slot (slot_hide_ise));
 
     _panel_agent->signal_connect_will_show_ack              (slot (slot_will_show_ack));
     _panel_agent->signal_connect_will_hide_ack              (slot (slot_will_hide_ack));
@@ -2690,8 +2692,11 @@ static void slot_get_input_panel_geometry (struct rectinfo &info)
 {
     VIRTUAL_KEYBOARD_STATE kbd_state = _ise_show ? KEYBOARD_STATE_ON : KEYBOARD_STATE_OFF;
 
-    if (_ise_width == 0 && _ise_height == 0) {
+    int hw_kbd_detect = _config->read (ISF_CONFIG_HARDWARE_KEYBOARD_DETECT, 0);
+    if (hw_kbd_detect) {
         info.pos_x = 0;
+        info.width = 0;
+        info.height = 0;
         if (_candidate_window && evas_object_visible_get (_candidate_window)) {
             info.width  = _candidate_width;
             info.height = _candidate_height;
@@ -2703,6 +2708,10 @@ static void slot_get_input_panel_geometry (struct rectinfo &info)
             info.pos_y = _screen_height - info.height;
     } else {
         get_ise_geometry (info, kbd_state);
+        if (_ise_show == false) {
+            info.width = 0;
+            info.height = 0;
+        }
         if (_candidate_mode == FIXED_CANDIDATE_WINDOW) {
             if (_candidate_window && evas_object_visible_get (_candidate_window)) {
                 int height = ui_candidate_get_valid_height ();
@@ -3040,6 +3049,12 @@ static void slot_show_ise (void)
     efl_set_transient_for_app_window (_ise_window);
 }
 
+static void slot_hide_ise (void)
+{
+    // From this point, slot_get_input_panel_geometry should return hidden state geometry
+    _ise_show = false;
+}
+
 static void slot_will_show_ack (void)
 {
     /* WMSYNC, #5 Let the Window Manager to actually show keyboard window */