Commit 483cc636 authored by Stefan Agner's avatar Stefan Agner Committed by Simon Ser

backend-rdp: use compositor wide struct xkb_context

Instead of allocating our own copy of struct xkb_context use the
compositor wide instance. This avoids leaking of a struct
xkb_context per connection as well.
Signed-off-by: Stefan Agner's avatarStefan Agner <stefan@agner.ch>
parent c220a40a
......@@ -963,7 +963,6 @@ xf_peer_activate(freerdp_peer* client)
rdpSettings *settings;
rdpPointerUpdate *pointer;
struct rdp_peers_item *peersItem;
struct xkb_context *xkbContext;
struct xkb_rule_names xkbRuleNames;
struct xkb_keymap *keymap;
struct weston_output *weston_output;
......@@ -1047,13 +1046,8 @@ xf_peer_activate(freerdp_peer* client)
keymap = NULL;
if (xkbRuleNames.layout) {
xkbContext = xkb_context_new(0);
if (!xkbContext) {
weston_log("unable to create a xkb_context\n");
return FALSE;
}
keymap = xkb_keymap_new_from_names(xkbContext, &xkbRuleNames, 0);
keymap = xkb_keymap_new_from_names(b->compositor->xkb_context,
&xkbRuleNames, 0);
}
if (settings->ClientHostname)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment