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
This commit is contained in:
parent
31b5059068
commit
3684f6b0ac
@ -2830,6 +2830,10 @@ clutter_text_key_focus_in (ClutterActor *actor)
|
|||||||
if (method && priv->editable)
|
if (method && priv->editable)
|
||||||
{
|
{
|
||||||
clutter_input_method_focus_in (method, priv->input_focus);
|
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));
|
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));
|
g_return_if_fail (CLUTTER_IS_TEXT (self));
|
||||||
|
|
||||||
self->priv->input_hints = hints;
|
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]);
|
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));
|
g_return_if_fail (CLUTTER_IS_TEXT (self));
|
||||||
|
|
||||||
self->priv->input_purpose = purpose;
|
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]);
|
g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_INPUT_PURPOSE]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user