[gtk+] wayland: Check the tablet manager before creating a wp_tablet_seat
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Check the tablet manager before creating a wp_tablet_seat
- Date: Wed, 6 Apr 2016 15:31:08 +0000 (UTC)
commit 6628ffd686859f7170ea6b8e908a6a805e570e92
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Apr 6 17:29:11 2016 +0200
wayland: Check the tablet manager before creating a wp_tablet_seat
This makes things non-crashy if the compositor doesn't provide wp_tablet_manager
gdk/wayland/gdkdevice-wayland.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 4a7d222..15ab038 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -3974,11 +3974,14 @@ _gdk_wayland_device_manager_add_seat (GdkDeviceManager *device_manager,
init_devices (seat);
- seat->wp_tablet_seat =
- zwp_tablet_manager_v1_get_tablet_seat (display_wayland->tablet_manager,
- wl_seat);
- zwp_tablet_seat_v1_add_listener (seat->wp_tablet_seat, &tablet_seat_listener,
- seat);
+ if (display_wayland->tablet_manager)
+ {
+ seat->wp_tablet_seat =
+ zwp_tablet_manager_v1_get_tablet_seat (display_wayland->tablet_manager,
+ wl_seat);
+ zwp_tablet_seat_v1_add_listener (seat->wp_tablet_seat, &tablet_seat_listener,
+ seat);
+ }
gdk_display_add_seat (display, GDK_SEAT (seat));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]