backends: Add missing code to restore NumLock state on X11

It's not be called to any practical effect yet in this backend, but will
do soon.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/590
This commit is contained in:
Carlos Garnacho 2019-05-23 18:09:36 +02:00
parent bd0743a421
commit 832fc798d5

View File

@ -667,7 +667,13 @@ static void
meta_backend_x11_set_numlock (MetaBackend *backend,
gboolean numlock_state)
{
/* TODO: Currently handled by gnome-settings-deamon */
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
unsigned int num_mask;
num_mask = XkbKeysymToModifiers (priv->xdisplay, XK_Num_Lock);
XkbLockModifiers (priv->xdisplay, XkbUseCoreKbd, num_mask,
numlock_state ? num_mask : 0);
}
void