예제 #1
0
static void
xim_info_display_closed (GdkDisplay *display,
			 gboolean    is_error,
			 GtkOXIMInfo *info)
{
  GSList *ics, *tmp_list;

  open_ims = g_slist_remove (open_ims, info);

  ics = info->ics;
  info->ics = NULL;

  for (tmp_list = ics; tmp_list; tmp_list = tmp_list->next)
    set_ic_client_window (tmp_list->data, NULL);

  g_slist_free (ics);

  if (info->preedit_set)
    g_signal_handler_disconnect (info->settings, info->preedit_set);
  if (info->display_closed_cb)
    g_signal_handler_disconnect (display, info->display_closed_cb);

  if (info->xim_styles)
    XFree (info->xim_styles);
  g_free (info->locale);

  if (info->im)
    XCloseIM (info->im);

  g_free (info);
}
예제 #2
0
static void
fcitx_im_context_set_client_window(GtkIMContext          *context,
                                   GdkWindow             *client_window)
{
    FcitxLog(LOG_LEVEL, "fcitx_im_context_set_client_window");
    FcitxIMContext *fcitxcontext = FCITX_IM_CONTEXT(context);
    set_ic_client_window(fcitxcontext, client_window);
}
예제 #3
0
static void
_ecore_imf_context_xim_client_window_set(Ecore_IMF_Context *ctx,
                                         void *window)
{
   EINA_LOG_DBG("in");
#ifdef ENABLE_XIM
   set_ic_client_window(ctx, (Ecore_X_Window)((Ecore_Window)window));
#else
   (void)ctx;
   (void)window;
#endif
}
예제 #4
0
static void
_ecore_imf_context_xim_del(Ecore_IMF_Context *ctx)
{
   EINA_LOG_DBG("in");
#ifdef ENABLE_XIM
   Ecore_IMF_Context_Data *imf_context_data;
   imf_context_data = ecore_imf_context_data_get(ctx);
   EINA_SAFETY_ON_NULL_RETURN(imf_context_data);

   imf_context_data->finalizing = EINA_TRUE;
   if (imf_context_data->im_info && !imf_context_data->im_info->ics->next)
     {
        if (imf_context_data->im_info->reconnecting == EINA_TRUE)
          {
             Ecore_X_Display *dsp;
             dsp = ecore_x_display_get();
             XUnregisterIMInstantiateCallback(dsp,
                                              NULL, NULL, NULL,
                                              xim_instantiate_callback,
                                              (XPointer)imf_context_data->im_info);
          }
        else if (imf_context_data->im_info->im)
          {
             XIMCallback im_destroy_callback;
             im_destroy_callback.client_data = NULL;
             im_destroy_callback.callback = NULL;
             XSetIMValues(imf_context_data->im_info->im,
                          XNDestroyCallback, &im_destroy_callback,
                          NULL);
          }
     }

   set_ic_client_window(ctx, 0);

   imf_context_data_destroy(imf_context_data);
#else
   (void)ctx;
#endif
}