mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 09:00:42 -05:00
clutter: Check the ClutterTextInputFocus has focus before filtering events
Checking correct state is responsibility of the ClutterInputFocus user, and it is indeed possible to get a focused ClutterText while its ClutterInputFocus didn't get itself focused (eg. lack of IM). https://gitlab.gnome.org/GNOME/mutter/issues/36 Closes: #36
This commit is contained in:
parent
69f56578a3
commit
bcd5882081
@ -2247,7 +2247,8 @@ clutter_text_key_press (ClutterActor *actor,
|
|||||||
{
|
{
|
||||||
gunichar key_unichar;
|
gunichar key_unichar;
|
||||||
|
|
||||||
if (clutter_input_focus_filter_key_event (priv->input_focus, event))
|
if (clutter_input_focus_is_focused (priv->input_focus) &&
|
||||||
|
clutter_input_focus_filter_key_event (priv->input_focus, event))
|
||||||
return CLUTTER_EVENT_STOP;
|
return CLUTTER_EVENT_STOP;
|
||||||
|
|
||||||
/* Skip keys when control is pressed */
|
/* Skip keys when control is pressed */
|
||||||
@ -2293,7 +2294,8 @@ clutter_text_key_release (ClutterActor *actor,
|
|||||||
ClutterText *self = CLUTTER_TEXT (actor);
|
ClutterText *self = CLUTTER_TEXT (actor);
|
||||||
ClutterTextPrivate *priv = self->priv;
|
ClutterTextPrivate *priv = self->priv;
|
||||||
|
|
||||||
if (clutter_input_focus_filter_key_event (priv->input_focus, event))
|
if (clutter_input_focus_is_focused (priv->input_focus) &&
|
||||||
|
clutter_input_focus_filter_key_event (priv->input_focus, event))
|
||||||
return CLUTTER_EVENT_STOP;
|
return CLUTTER_EVENT_STOP;
|
||||||
|
|
||||||
return CLUTTER_EVENT_PROPAGATE;
|
return CLUTTER_EVENT_PROPAGATE;
|
||||||
|
Loading…
Reference in New Issue
Block a user