From f685567afe31e1ad590d96d184806ba626decd70 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 18 Jul 2022 15:07:49 +0200 Subject: [PATCH] clutter: Let ClutterInputMethods pass the anchor position for preedit text This is an API break, since users (i.e. GNOME Shell) provide the input method implementation. Part-of: --- clutter/clutter/clutter-input-method.c | 3 ++- clutter/clutter/clutter-input-method.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/clutter-input-method.c b/clutter/clutter/clutter-input-method.c index 8b5828773..75b282c71 100644 --- a/clutter/clutter/clutter-input-method.c +++ b/clutter/clutter/clutter-input-method.c @@ -359,12 +359,13 @@ void clutter_input_method_set_preedit_text (ClutterInputMethod *im, const gchar *preedit, unsigned int cursor, + unsigned int anchor, ClutterPreeditResetMode mode) { g_return_if_fail (CLUTTER_IS_INPUT_METHOD (im)); clutter_input_method_put_im_event (im, CLUTTER_IM_PREEDIT, preedit, - cursor, cursor, 0, mode); + cursor, anchor, 0, mode); } void diff --git a/clutter/clutter/clutter-input-method.h b/clutter/clutter/clutter-input-method.h index cc11545c8..34d48ec5e 100644 --- a/clutter/clutter/clutter-input-method.h +++ b/clutter/clutter/clutter-input-method.h @@ -77,6 +77,7 @@ CLUTTER_EXPORT void clutter_input_method_set_preedit_text (ClutterInputMethod *im, const gchar *preedit, unsigned int cursor, + unsigned int anchor, ClutterPreeditResetMode mode); CLUTTER_EXPORT