mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
backend/x11: Notify whenever the layout group changes
Will be used to trigger keyboard binding rebuild. https://bugzilla.gnome.org/show_bug.cgi?id=786408
This commit is contained in:
parent
517488ef67
commit
a81d4aed7a
@ -283,8 +283,6 @@ handle_host_xevent (MetaBackend *backend,
|
||||
|
||||
if (xkb_ev->any.device == META_VIRTUAL_CORE_KEYBOARD_ID)
|
||||
{
|
||||
int layout_group;
|
||||
|
||||
switch (xkb_ev->any.xkb_type)
|
||||
{
|
||||
case XkbNewKeyboardNotify:
|
||||
@ -292,8 +290,20 @@ handle_host_xevent (MetaBackend *backend,
|
||||
keymap_changed (backend);
|
||||
break;
|
||||
case XkbStateNotify:
|
||||
if (xkb_ev->state.changed & XkbGroupLockMask)
|
||||
{
|
||||
int layout_group;
|
||||
gboolean layout_group_changed;
|
||||
|
||||
layout_group = xkb_ev->state.locked_group;
|
||||
layout_group_changed =
|
||||
(int) priv->keymap_layout_group != layout_group;
|
||||
priv->keymap_layout_group = layout_group;
|
||||
|
||||
if (layout_group_changed)
|
||||
meta_backend_notify_keymap_layout_group_changed (backend,
|
||||
layout_group);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user