static Eina_Bool efl_create_control_window (void);
static Ecore_X_Window efl_get_app_window (void);
static Ecore_X_Window efl_get_quickpanel_window (void);
+static Ecore_X_Window efl_get_global_navigation_window (void);
#endif
+
static void change_keyboard_mode (TOOLBAR_MODE_T mode);
static unsigned int get_ise_index (const String uuid);
static bool set_active_ise (const String &uuid, bool launch_ise);
struct rectinfo info = {0, 0, 0, 0};
+#if HAVE_ECOREX
+ int w = 0, h = 0;
+ Ecore_X_Window gnb_win = efl_get_global_navigation_window ();
+ if (gnb_win > 0)
+ ecore_x_window_size_get (gnb_win, &w, &h);
+#endif
+
int win_w = _screen_width, win_h = _screen_height;
int angle = (_ise_angle == -1) ? efl_get_app_window_angle () : _ise_angle;
+#if HAVE_ECOREX
+ /* The height of global navigation bar */
+ int gnb_height = h;
+
if (angle == 90 || angle == 270) {
win_w = _screen_height;
win_h = _screen_width;
+ gnb_height = w;
}
+#endif
/* If we have geometry reported by ISE, use the geometry information */
if (_ise_reported_geometry.valid && _ise_reported_geometry.angle == angle) {
info.height = 0;
} else {
if (_ise_state == WINDOW_STATE_SHOW) {
- info.pos_y = win_h - info.height;
+ info.pos_y = win_h - info.height - gnb_height;
} else {
info.pos_y = (win_h > win_w) ? win_h : win_w;
info.width = 0;
ise_rect.height = _candidate_height;
}
} else if (_candidate_mode == SOFT_CANDIDATE_WINDOW) {
- ise_rect.width = _soft_candidate_width;
- ise_rect.height = _soft_candidate_height;
+ ise_rect.width = _soft_candidate_width;
+ ise_rect.height = _soft_candidate_height;
}
+
int angle = efl_get_app_window_angle ();
if (angle == 90 || angle == 270)
ise_rect.pos_y = _screen_width - ise_rect.height;
return clipboard_window;
}
+static Ecore_X_Window efl_get_global_navigation_window (void)
+{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
+ /* Gets the XID of the global navigation window from the root window property */
+ int ret = 0;
+ Atom type_return;
+ int format_return;
+ unsigned long nitems_return;
+ unsigned long bytes_after_return;
+ unsigned char *data = NULL;
+ Ecore_X_Window gnb_window = 0;
+
+ ret = XGetWindowProperty ((Display *)ecore_x_display_get (),
+ ecore_x_window_root_get (_control_window),
+ ecore_x_atom_get ("GNB_WIN"),
+ 0, G_MAXLONG, False, XA_WINDOW, &type_return,
+ &format_return, &nitems_return, &bytes_after_return,
+ &data);
+
+ if (ret == Success) {
+ if ((type_return == XA_WINDOW) && (format_return == 32) && (data)) {
+ gnb_window = *(Window *)data;
+ if (data)
+ XFree (data);
+ }
+ } else {
+ std::cerr << "XGetWindowProperty () is failed!!!\n";
+ }
+
+ return gnb_window;
+}
+
static Ecore_X_Window efl_get_quickpanel_window (void)
{
SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";