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
This commit is contained in:
@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user