remote-desktop/session: Add CapsLockState and NumLockState properties
Will be used by remote desktop services that want to try to affect the end result of these. We cannot let it set these directly, as these needs to be done using virtual key events to not cause issues in all the XKB state tracking, so remote desktop services try to deal with this themself if they need to. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1342 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1739>
This commit is contained in:
parent
ce3fa3938a
commit
67acf99314
@ -253,6 +253,10 @@ meta_remote_desktop_session_new (MetaRemoteDesktop *remote_desktop,
|
||||
const char *peer_name,
|
||||
GError **error)
|
||||
{
|
||||
MetaBackend *backend = meta_remote_desktop_get_backend (remote_desktop);
|
||||
ClutterBackend *clutter_backend = meta_backend_get_clutter_backend (backend);
|
||||
ClutterSeat *seat = clutter_backend_get_default_seat (clutter_backend);
|
||||
ClutterKeymap *keymap = clutter_seat_get_keymap (seat);
|
||||
GDBusInterfaceSkeleton *interface_skeleton;
|
||||
MetaRemoteDesktopSession *session;
|
||||
|
||||
@ -271,6 +275,13 @@ meta_remote_desktop_session_new (MetaRemoteDesktop *remote_desktop,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_object_bind_property (keymap, "caps-lock-state",
|
||||
session, "caps-lock-state",
|
||||
G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
|
||||
g_object_bind_property (keymap, "num-lock-state",
|
||||
session, "num-lock-state",
|
||||
G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
|
@ -343,6 +343,9 @@
|
||||
<arg name="serial" type="u" direction="in" />
|
||||
</signal>
|
||||
|
||||
<property name="CapsLockState" type="b" access="read" />
|
||||
<property name="NumLockState" type="b" access="read" />
|
||||
|
||||
</interface>
|
||||
|
||||
</node>
|
||||
|
Loading…
Reference in New Issue
Block a user