Commit 086789d0 authored by Matthias Clasen's avatar Matthias Clasen

wayland: Always initialize directions

I forgot to initialize directionm in gdk_wayland_keymap_new,
leading to crash.
parent eff4be56
......@@ -225,29 +225,6 @@ _gdk_wayland_keymap_init (GdkWaylandKeymap *keymap)
{
}
GdkKeymap *
_gdk_wayland_keymap_new ()
{
GdkWaylandKeymap *keymap;
struct xkb_context *context;
struct xkb_rule_names names;
keymap = g_object_new (_gdk_wayland_keymap_get_type(), NULL);
context = xkb_context_new (0);
names.rules = "evdev";
names.model = "pc105";
names.layout = "us";
names.variant = "";
names.options = "";
keymap->xkb_keymap = xkb_keymap_new_from_names (context, &names, 0);
keymap->xkb_state = xkb_state_new (keymap->xkb_keymap);
xkb_context_unref (context);
return GDK_KEYMAP (keymap);
}
static void
update_direction (GdkWaylandKeymap *keymap)
{
......@@ -317,6 +294,31 @@ update_direction (GdkWaylandKeymap *keymap)
g_free (rtl);
}
GdkKeymap *
_gdk_wayland_keymap_new ()
{
GdkWaylandKeymap *keymap;
struct xkb_context *context;
struct xkb_rule_names names;
keymap = g_object_new (_gdk_wayland_keymap_get_type(), NULL);
context = xkb_context_new (0);
names.rules = "evdev";
names.model = "pc105";
names.layout = "us";
names.variant = "";
names.options = "";
keymap->xkb_keymap = xkb_keymap_new_from_names (context, &names, 0);
keymap->xkb_state = xkb_state_new (keymap->xkb_keymap);
xkb_context_unref (context);
update_direction (keymap);
return GDK_KEYMAP (keymap);
}
void
_gdk_wayland_keymap_update_from_fd (GdkKeymap *keymap,
uint32_t format,
......
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