Add comments for missing tablet tool entries

And stop using default cases, so that we know which parts of the code
need an update when adding a new enum entry.

Closes: https://github.com/swaywm/wlroots/issues/2208
This commit is contained in:
Simon Ser 2020-05-28 12:54:17 +02:00 committed by Drew DeVault
parent 5e0ef70cc0
commit 1a23c1425f
2 changed files with 9 additions and 5 deletions

View file

@ -481,8 +481,10 @@ static enum wlr_tablet_tool_type tablet_type_to_wlr_type(enum zwp_tablet_tool_v2
return WLR_TABLET_TOOL_TYPE_MOUSE;
case ZWP_TABLET_TOOL_V2_TYPE_LENS:
return WLR_TABLET_TOOL_TYPE_LENS;
default:
break;
case ZWP_TABLET_TOOL_V2_TYPE_FINGER:
// unused, see:
// https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/18
abort();
}
abort(); // unreachable
}