mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
clutter/backend: Allow unsetting input method
This is needed by GNOME Shell to remove itself as a input method implementation during its shutdown sequence. We can't do it ourself later because at mutters own shutdowns equence, the GNOME Shell Javascript context has by that time already been teared down. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2934>
This commit is contained in:
parent
db24557e40
commit
429cc9a674
@ -688,7 +688,7 @@ clutter_backend_get_input_method (ClutterBackend *backend)
|
|||||||
/**
|
/**
|
||||||
* clutter_backend_set_input_method:
|
* clutter_backend_set_input_method:
|
||||||
* @backend: the #ClutterBackend
|
* @backend: the #ClutterBackend
|
||||||
* @method: the input method
|
* @method: (nullable): the input method
|
||||||
*
|
*
|
||||||
* Sets the input method to be used by Clutter
|
* Sets the input method to be used by Clutter
|
||||||
**/
|
**/
|
||||||
@ -696,6 +696,12 @@ void
|
|||||||
clutter_backend_set_input_method (ClutterBackend *backend,
|
clutter_backend_set_input_method (ClutterBackend *backend,
|
||||||
ClutterInputMethod *method)
|
ClutterInputMethod *method)
|
||||||
{
|
{
|
||||||
|
if (backend->input_method == method)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (backend->input_method)
|
||||||
|
clutter_input_method_focus_out (backend->input_method);
|
||||||
|
|
||||||
g_set_object (&backend->input_method, method);
|
g_set_object (&backend->input_method, method);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user