static Eina_Bool autoperiod_allow = EINA_FALSE;
static Eina_Bool autocap_allow = EINA_FALSE;
-static Eina_Bool desktop_mode = EINA_FALSE;
static bool _x_key_event_is_valid = false;
return _panel_client_id;
}
-EAPI Eina_Bool
-get_desktop_mode ()
-{
- return desktop_mode;
-}
-
/* Function Implementations */
static EcoreIMFContextISFImpl *
new_ic_impl (EcoreIMFContextISF *parent)
return ECORE_CALLBACK_PASS_ON;
}
-static void
-_check_desktop_mode (Ecore_X_Window win)
-{
- char *profile = ecore_x_e_window_profile_get (win);
- if (profile && (strcmp (profile, "desktop") == 0)) {
- desktop_mode = EINA_TRUE;
- } else {
- desktop_mode = EINA_FALSE;
- }
-
- if (profile)
- free (profile);
-}
-
-static Eina_Bool
-_x_prop_change (void *data, int type, void *event)
-{
- Ecore_X_Event_Window_Property *e = (Ecore_X_Event_Window_Property *)event;
- Ecore_X_Window xwin = (Ecore_X_Window)(reinterpret_cast<long>(data));
-
- if (!e || e->win != xwin) return ECORE_CALLBACK_PASS_ON;
-
- if (e->atom == ECORE_X_ATOM_E_PROFILE) {
- _check_desktop_mode (e->win);
- }
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
EAPI int
register_key_handler ()
{
if ((context_scim->impl->client_window != 0) &&
(context_scim->impl->client_window != _client_window)) {
_client_window = context_scim->impl->client_window;
-
- _check_desktop_mode (_client_window);
-
- ecore_event_handler_add (ECORE_X_EVENT_WINDOW_PROPERTY, _x_prop_change, window);
}
}
}
EAPI int unregister_key_handler ();
EAPI int get_panel_client_id ();
-EAPI Eina_Bool get_desktop_mode ();
EAPI Eina_Bool caps_mode_check (Ecore_IMF_Context *ctx, Eina_Bool force, Eina_Bool noti);
EAPI EcoreIMFContextISF *get_focused_ic ();
/* Set the current XID of the active window into the root window property */
save_current_xid (ctx);
- if (get_desktop_mode ()) {
- LOGD ("IME will not appear in case of desktop mode.\n");
- return;
- }
-
if (kbd_mode == TOOLBAR_KEYBOARD_MODE) {
LOGD ("H/W keyboard is existed.\n");
return;
{
SECURE_LOGD ("ctx : %p\n", ctx);
- if (get_desktop_mode ())
- return;
-
_input_panel_hide (ctx, EINA_FALSE);
}
void isf_imf_context_input_panel_instant_hide (Ecore_IMF_Context *ctx)
{
- if (get_desktop_mode ())
- return;
-
_input_panel_hide (ctx, EINA_TRUE);
}