static void fcitx_im_context_set_cursor_location(ClutterIMContext *context, ClutterIMRectangle *area) { FcitxLog(LOG_LEVEL, "fcitx_im_context_set_cursor_location %d %d %d %d", area->x, area->y, area->height, area->width); FcitxIMContext *fcitxcontext = FCITX_IM_CONTEXT(context); if (fcitxcontext->area.x == area->x && fcitxcontext->area.y == area->y && fcitxcontext->area.width == area->width && fcitxcontext->area.height == area->height) { return; } fcitxcontext->area = *area; if (IsFcitxIMClientValid(fcitxcontext->client)) { _set_cursor_location_internal(fcitxcontext); } return; }
static void fcitx_im_context_set_cursor_location(GtkIMContext *context, GdkRectangle *area) { FcitxLog(LOG_LEVEL, "fcitx_im_context_set_cursor_location %d %d %d %d", area->x, area->y, area->height, area->width); FcitxIMContext *fcitxcontext = FCITX_IM_CONTEXT(context); if (fcitxcontext->area.x == area->x && fcitxcontext->area.y == area->y && fcitxcontext->area.width == area->width && fcitxcontext->area.height == area->height) { return; } fcitxcontext->area = *area; if (fcitx_client_is_valid(fcitxcontext->client)) { _set_cursor_location_internal(fcitxcontext); } gtk_im_context_set_cursor_location(fcitxcontext->slave, area); return; }