mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-09 13:29:46 -05:00
backend/libinput: add assertions
This commit is contained in:
parent
bc34486c04
commit
7bcf0d9599
6 changed files with 94 additions and 52 deletions
|
|
@ -69,7 +69,8 @@ static void add_pad_group_from_libinput(struct wlr_tablet_pad *pad,
|
|||
struct wlr_tablet_pad *create_libinput_tablet_pad(
|
||||
struct libinput_device *libinput_dev) {
|
||||
assert(libinput_dev);
|
||||
struct wlr_tablet_pad *wlr_tablet_pad = calloc(1, sizeof(struct wlr_tablet_pad));
|
||||
struct wlr_tablet_pad *wlr_tablet_pad =
|
||||
calloc(1, sizeof(struct wlr_tablet_pad));
|
||||
if (!wlr_tablet_pad) {
|
||||
wlr_log(WLR_ERROR, "Unable to allocate wlr_tablet_pad");
|
||||
return NULL;
|
||||
|
|
@ -101,7 +102,8 @@ void handle_tablet_pad_button(struct libinput_event *event,
|
|||
struct wlr_input_device *wlr_dev =
|
||||
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_PAD, libinput_dev);
|
||||
if (!wlr_dev) {
|
||||
wlr_log(WLR_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
|
||||
wlr_log(WLR_DEBUG,
|
||||
"Got a tablet pad event for a device with no tablet pad?");
|
||||
return;
|
||||
}
|
||||
struct libinput_event_tablet_pad *pevent =
|
||||
|
|
@ -129,7 +131,8 @@ void handle_tablet_pad_ring(struct libinput_event *event,
|
|||
struct wlr_input_device *wlr_dev =
|
||||
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_PAD, libinput_dev);
|
||||
if (!wlr_dev) {
|
||||
wlr_log(WLR_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
|
||||
wlr_log(WLR_DEBUG,
|
||||
"Got a tablet pad event for a device with no tablet pad?");
|
||||
return;
|
||||
}
|
||||
struct libinput_event_tablet_pad *pevent =
|
||||
|
|
@ -156,7 +159,8 @@ void handle_tablet_pad_strip(struct libinput_event *event,
|
|||
struct wlr_input_device *wlr_dev =
|
||||
get_appropriate_device(WLR_INPUT_DEVICE_TABLET_PAD, libinput_dev);
|
||||
if (!wlr_dev) {
|
||||
wlr_log(WLR_DEBUG, "Got a tablet pad event for a device with no tablet pad?");
|
||||
wlr_log(WLR_DEBUG,
|
||||
"Got a tablet pad event for a device with no tablet pad?");
|
||||
return;
|
||||
}
|
||||
struct libinput_event_tablet_pad *pevent =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue