I think I wrote the goto handled code. The advantage of that over putting the assert in the default handler is that if a new event type is added to the evdev_event_type enum then GCC will give a nice warning for that switch statement so we'd know we need to add a handler for it.
I think I would personally prefer to change the breaks to be ‘goto handled’ too but I suppose that is a trade off for readability so I won't complain either way. The rest of the patches look good to me. I've tested it briefly and I don't get the crashes anymore. Regards, - Neil Ander Conselvan de Oliveira <conselv...@gmail.com> writes: > From: Ander Conselvan de Oliveira <ander.conselvan.de.olive...@intel.com> > > If the output a touchscreen is paired to is unplugged, events coming > from it should be ignored. Commit 17bccaed introduced logic for that > in evdev_flush_pending_damage(). However, the break statements it > introduced would cause the assertion after the switch statement to > fail. > > That function has the odd behavior that goto's are used to skip the > assertion after the switch statement and jump to the hunk of code that > marks the event as processed. Only in the case where the event type has > an invalid value the assertion should trigger. So this patch fixes the > problem by moving the assertion into the default case of the switch > and replacing the goto statements with break ones. > > https://bugs.freedesktop.org/show_bug.cgi?id=73950 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel