diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2019-10-08 17:46:38 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2019-10-08 17:59:37 +0200 |
commit | d70f85d6b9e5bc8d0e9890eda55d05a2510f0037 (patch) | |
tree | 43580e24c58325e804cdc267516f7f5984bbb3a0 | |
parent | d7c95ad5422462d7e813fed202e3b02b9ad96a89 (diff) | |
download | gtk+-d70f85d6b9e5bc8d0e9890eda55d05a2510f0037.tar.gz |
gdk: Fix wl_output accounting on tablet devices
The code managing this accounting mixed seat and tablet output lists,
can't bode well. Fixes invalid reads on list elements, as there are
dangling pointers.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2157
-rw-r--r-- | gdk/wayland/gdkdevice-wayland.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index a64f33c871..fa292d25a7 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -4616,7 +4616,7 @@ pointer_surface_enter (void *data, if (tablet) { tablet->pointer_info.pointer_surface_outputs = - g_slist_append (seat->pointer_info.pointer_surface_outputs, output); + g_slist_append (tablet->pointer_info.pointer_surface_outputs, output); } else { @@ -4645,7 +4645,7 @@ pointer_surface_leave (void *data, if (tablet) { tablet->pointer_info.pointer_surface_outputs = - g_slist_remove (seat->pointer_info.pointer_surface_outputs, output); + g_slist_remove (tablet->pointer_info.pointer_surface_outputs, output); } else { |