[mutter/wip/carlosg/fix-issue-66: 19/19] clutter: Apply input hints/purpose on ClutterTextInputFocus focus in
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/fix-issue-66: 19/19] clutter: Apply input hints/purpose on ClutterTextInputFocus focus in
- Date: Tue, 3 Apr 2018 14:55:59 +0000 (UTC)
commit 3684f6b0ac6157f2f85e0ae473d834fa474fd72d
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Mar 13 15:44:19 2018 +0100
clutter: Apply input hints/purpose on ClutterTextInputFocus focus in
And make the ClutterText-level properties independent from the input
focus, as those properties can be set anytime, not just when the
ClutterText actor is focused.
https://gitlab.gnome.org/GNOME/mutter/issues/66
Closes: #66
clutter/clutter/clutter-text.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter/clutter-text.c b/clutter/clutter/clutter-text.c
index 4a6a74a0c..744d8a323 100644
--- a/clutter/clutter/clutter-text.c
+++ b/clutter/clutter/clutter-text.c
@@ -2830,6 +2830,10 @@ clutter_text_key_focus_in (ClutterActor *actor)
if (method && priv->editable)
{
clutter_input_method_focus_in (method, priv->input_focus);
+ clutter_input_focus_set_content_purpose (priv->input_focus,
+ priv->input_purpose);
+ clutter_input_focus_set_content_hints (priv->input_focus,
+ priv->input_hints);
update_cursor_location (CLUTTER_TEXT (actor));
}
@@ -6523,7 +6527,9 @@ clutter_text_set_input_hints (ClutterText *self,
g_return_if_fail (CLUTTER_IS_TEXT (self));
self->priv->input_hints = hints;
- clutter_input_focus_set_content_hints (self->priv->input_focus, hints);
+
+ if (clutter_input_focus_is_focused (self->priv->input_focus))
+ clutter_input_focus_set_content_hints (self->priv->input_focus, hints);
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_INPUT_HINTS]);
}
@@ -6542,7 +6548,9 @@ clutter_text_set_input_purpose (ClutterText *self,
g_return_if_fail (CLUTTER_IS_TEXT (self));
self->priv->input_purpose = purpose;
- clutter_input_focus_set_content_purpose (self->priv->input_focus, purpose);
+
+ if (clutter_input_focus_is_focused (self->priv->input_focus))
+ clutter_input_focus_set_content_purpose (self->priv->input_focus, purpose);
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_INPUT_PURPOSE]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]