[gtk+] wayland: Set display on keymaps
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Set display on keymaps
- Date: Fri, 12 Jan 2018 14:24:17 +0000 (UTC)
commit d72508590b9b4bde91c0e1445ac61be62c3af2ff
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jan 11 21:44:49 2018 -0500
wayland: Set display on keymaps
This was forgotten so far: The display of keymaps
was NULL.
gdk/wayland/gdkdevice-wayland.c | 2 +-
gdk/wayland/gdkdisplay-wayland.c | 2 +-
gdk/wayland/gdkkeys-wayland.c | 3 ++-
gdk/wayland/gdkprivate-wayland.h | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index c170325..b6a950d 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -4764,7 +4764,7 @@ _gdk_wayland_display_create_seat (GdkWaylandDisplay *display_wayland,
"display", display_wayland,
NULL);
seat->id = id;
- seat->keymap = _gdk_wayland_keymap_new ();
+ seat->keymap = _gdk_wayland_keymap_new (display);
seat->display = display;
seat->touches = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) g_free);
seat->foreign_dnd_window = create_foreign_dnd_window (display);
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index f02d9c6..85cecc0 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -896,7 +896,7 @@ _gdk_wayland_display_get_keymap (GdkDisplay *display)
return _gdk_wayland_device_get_keymap (core_keyboard);
if (!tmp_keymap)
- tmp_keymap = _gdk_wayland_keymap_new ();
+ tmp_keymap = _gdk_wayland_keymap_new (display);
return tmp_keymap;
}
diff --git a/gdk/wayland/gdkkeys-wayland.c b/gdk/wayland/gdkkeys-wayland.c
index c8a4d7e..fd95b27 100644
--- a/gdk/wayland/gdkkeys-wayland.c
+++ b/gdk/wayland/gdkkeys-wayland.c
@@ -540,13 +540,14 @@ update_direction (GdkWaylandKeymap *keymap)
}
GdkKeymap *
-_gdk_wayland_keymap_new (void)
+_gdk_wayland_keymap_new (GdkDisplay *display)
{
GdkWaylandKeymap *keymap;
struct xkb_context *context;
struct xkb_rule_names names;
keymap = g_object_new (_gdk_wayland_keymap_get_type(), NULL);
+ GDK_KEYMAP (keymap)->display = display;
context = xkb_context_new (0);
diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h
index 39d6cfe..6d3fe4c 100644
--- a/gdk/wayland/gdkprivate-wayland.h
+++ b/gdk/wayland/gdkprivate-wayland.h
@@ -45,7 +45,7 @@
#define GDK_WINDOW_IS_WAYLAND(win) (GDK_IS_WINDOW_IMPL_WAYLAND (((GdkWindow *)win)->impl))
-GdkKeymap *_gdk_wayland_keymap_new (void);
+GdkKeymap *_gdk_wayland_keymap_new (GdkDisplay *display);
void _gdk_wayland_keymap_update_from_fd (GdkKeymap *keymap,
uint32_t format,
uint32_t fd,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]