summaryrefslogtreecommitdiff
path: root/src/wayland/meta-wayland-tablet-pad.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2018-02-07 13:17:16 +0100
committerCarlos Garnacho <carlosg@gnome.org>2018-02-08 12:02:51 +0100
commit95ccfd99cf21159dacb1d7983fea512f1df972dd (patch)
treea84a2fa25db927b0ef6920b8e38fb4c685246101 /src/wayland/meta-wayland-tablet-pad.c
parent134765c63479b92b9f1d5e9f302eb0009fb5a009 (diff)
downloadmutter-95ccfd99cf21159dacb1d7983fea512f1df972dd.tar.gz
wayland: Handle NULL event node/vendor/product on tablet methodswip/carlosg/fix-tablets-on-nested
We currently don't handle NULLs on these correctly, yet they can be so when running nested. Just refrain from sending those wp_tablet(_pad) events in that case.
Diffstat (limited to 'src/wayland/meta-wayland-tablet-pad.c')
-rw-r--r--src/wayland/meta-wayland-tablet-pad.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wayland/meta-wayland-tablet-pad.c b/src/wayland/meta-wayland-tablet-pad.c
index 21841127e..5c0b80966 100644
--- a/src/wayland/meta-wayland-tablet-pad.c
+++ b/src/wayland/meta-wayland-tablet-pad.c
@@ -277,9 +277,13 @@ meta_wayland_tablet_pad_notify (MetaWaylandTabletPad *pad,
struct wl_resource *resource)
{
struct wl_client *client = wl_resource_get_client (resource);
+ const gchar *node_path;
GList *l;
- zwp_tablet_pad_v2_send_path (resource, clutter_input_device_get_device_node (pad->device));
+ node_path = clutter_input_device_get_device_node (pad->device);
+ if (node_path)
+ zwp_tablet_pad_v2_send_path (resource, node_path);
+
zwp_tablet_pad_v2_send_buttons (resource, pad->n_buttons);
for (l = pad->groups; l; l = l->next)