diff options
author | José Dapena Paz <jdapena@igalia.com> | 2012-07-16 19:16:48 +0100 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2012-07-16 20:11:41 +0100 |
commit | a4c80bd9cbd3d4e74fffa95a51b1336a38b9a548 (patch) | |
tree | 1f4cf629cc1d1c1eba8ef2ab949800c863452263 /gdk | |
parent | d2267824b3193daf1bedce3b7cdfd57fd9614060 (diff) | |
download | gtk+-a4c80bd9cbd3d4e74fffa95a51b1336a38b9a548.tar.gz |
wayland: Create and expose an xkb_state on the keymap object
This is then logically associated with the input device since each (keyboard)
input device has its own keymap.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/wayland/gdkkeys-wayland.c | 7 | ||||
-rw-r--r-- | gdk/wayland/gdkprivate-wayland.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gdk/wayland/gdkkeys-wayland.c b/gdk/wayland/gdkkeys-wayland.c index 08b0b82c2e..5de64083df 100644 --- a/gdk/wayland/gdkkeys-wayland.c +++ b/gdk/wayland/gdkkeys-wayland.c @@ -49,6 +49,7 @@ struct _GdkWaylandKeymap GdkKeymap parent_instance; struct xkb_keymap *xkb_keymap; + struct xkb_state *xkb_state; }; struct _GdkWaylandKeymapClass @@ -656,6 +657,7 @@ _gdk_wayland_keymap_new () names.variant = ""; names.options = ""; keymap->xkb_keymap = xkb_map_new_from_names(context, &names, XKB_MAP_COMPILE_PLACEHOLDER); + keymap->xkb_state = xkb_state_new (keymap->xkb_keymap); xkb_context_unref (context); return GDK_KEYMAP (keymap); @@ -682,6 +684,7 @@ _gdk_wayland_keymap_new_from_fd (uint32_t format, keymap->xkb_keymap = xkb_map_new_from_string (context, map_str, format, XKB_MAP_COMPILE_PLACEHOLDER); munmap (map_str, size); close (fd); + keymap->xkb_state = xkb_state_new (keymap->xkb_keymap); xkb_context_unref (context); return GDK_KEYMAP (keymap); @@ -692,7 +695,7 @@ struct xkb_keymap *_gdk_wayland_keymap_get_xkb_keymap (GdkKeymap *keymap) return GDK_WAYLAND_KEYMAP (keymap)->xkb_keymap; } -struct xkb_desc *_gdk_wayland_keymap_get_xkb_desc (GdkKeymap *keymap) +struct xkb_state *_gdk_wayland_keymap_get_xkb_state (GdkKeymap *keymap) { - return GDK_WAYLAND_KEYMAP (keymap)->xkb; + return GDK_WAYLAND_KEYMAP (keymap)->xkb_state; } diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h index cfa9bd885e..5354d756bf 100644 --- a/gdk/wayland/gdkprivate-wayland.h +++ b/gdk/wayland/gdkprivate-wayland.h @@ -52,6 +52,7 @@ GdkKeymap *_gdk_wayland_keymap_new (void); GdkKeymap *_gdk_wayland_keymap_new_from_fd (uint32_t format, uint32_t fd, uint32_t size); struct xkb_desc *_gdk_wayland_keymap_get_xkb_desc (GdkKeymap *keymap); +struct xkb_state *_gdk_wayland_keymap_get_xkb_state (GdkKeymap *keymap); GdkCursor *_gdk_wayland_display_get_cursor_for_type (GdkDisplay *display, GdkCursorType cursor_type); |