diff options
Diffstat (limited to 'sway/input/tablet.c')
-rw-r--r-- | sway/input/tablet.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/sway/input/tablet.c b/sway/input/tablet.c index 26e86e36..92ede3fa 100644 --- a/sway/input/tablet.c +++ b/sway/input/tablet.c | |||
@@ -196,7 +196,7 @@ static void handle_tablet_pad_attach(struct wl_listener *listener, | |||
196 | 196 | ||
197 | static void handle_tablet_pad_ring(struct wl_listener *listener, void *data) { | 197 | static void handle_tablet_pad_ring(struct wl_listener *listener, void *data) { |
198 | struct sway_tablet_pad *pad = wl_container_of(listener, pad, ring); | 198 | struct sway_tablet_pad *pad = wl_container_of(listener, pad, ring); |
199 | struct wlr_event_tablet_pad_ring *event = data; | 199 | struct wlr_tablet_pad_ring_event *event = data; |
200 | 200 | ||
201 | if (!pad->current_surface) { | 201 | if (!pad->current_surface) { |
202 | return; | 202 | return; |
@@ -210,7 +210,7 @@ static void handle_tablet_pad_ring(struct wl_listener *listener, void *data) { | |||
210 | 210 | ||
211 | static void handle_tablet_pad_strip(struct wl_listener *listener, void *data) { | 211 | static void handle_tablet_pad_strip(struct wl_listener *listener, void *data) { |
212 | struct sway_tablet_pad *pad = wl_container_of(listener, pad, strip); | 212 | struct sway_tablet_pad *pad = wl_container_of(listener, pad, strip); |
213 | struct wlr_event_tablet_pad_strip *event = data; | 213 | struct wlr_tablet_pad_strip_event *event = data; |
214 | 214 | ||
215 | if (!pad->current_surface) { | 215 | if (!pad->current_surface) { |
216 | return; | 216 | return; |
@@ -224,7 +224,7 @@ static void handle_tablet_pad_strip(struct wl_listener *listener, void *data) { | |||
224 | 224 | ||
225 | static void handle_tablet_pad_button(struct wl_listener *listener, void *data) { | 225 | static void handle_tablet_pad_button(struct wl_listener *listener, void *data) { |
226 | struct sway_tablet_pad *pad = wl_container_of(listener, pad, button); | 226 | struct sway_tablet_pad *pad = wl_container_of(listener, pad, button); |
227 | struct wlr_event_tablet_pad_button *event = data; | 227 | struct wlr_tablet_pad_button_event *event = data; |
228 | 228 | ||
229 | if (!pad->current_surface) { | 229 | if (!pad->current_surface) { |
230 | return; | 230 | return; |
@@ -246,6 +246,7 @@ struct sway_tablet_pad *sway_tablet_pad_create(struct sway_seat *seat, | |||
246 | return NULL; | 246 | return NULL; |
247 | } | 247 | } |
248 | 248 | ||
249 | tablet_pad->wlr = wlr_tablet_pad_from_input_device(device->input_device->wlr_device); | ||
249 | tablet_pad->seat_device = device; | 250 | tablet_pad->seat_device = device; |
250 | wl_list_init(&tablet_pad->attach.link); | 251 | wl_list_init(&tablet_pad->attach.link); |
251 | wl_list_init(&tablet_pad->button.link); | 252 | wl_list_init(&tablet_pad->button.link); |
@@ -260,40 +261,40 @@ struct sway_tablet_pad *sway_tablet_pad_create(struct sway_seat *seat, | |||
260 | } | 261 | } |
261 | 262 | ||
262 | void sway_configure_tablet_pad(struct sway_tablet_pad *tablet_pad) { | 263 | void sway_configure_tablet_pad(struct sway_tablet_pad *tablet_pad) { |
263 | struct wlr_input_device *device = | 264 | struct wlr_input_device *wlr_device = |
264 | tablet_pad->seat_device->input_device->wlr_device; | 265 | tablet_pad->seat_device->input_device->wlr_device; |
265 | struct sway_seat *seat = tablet_pad->seat_device->sway_seat; | 266 | struct sway_seat *seat = tablet_pad->seat_device->sway_seat; |
266 | 267 | ||
267 | if (!tablet_pad->tablet_v2_pad) { | 268 | if (!tablet_pad->tablet_v2_pad) { |
268 | tablet_pad->tablet_v2_pad = | 269 | tablet_pad->tablet_v2_pad = |
269 | wlr_tablet_pad_create(server.tablet_v2, seat->wlr_seat, device); | 270 | wlr_tablet_pad_create(server.tablet_v2, seat->wlr_seat, wlr_device); |
270 | } | 271 | } |
271 | 272 | ||
272 | wl_list_remove(&tablet_pad->attach.link); | 273 | wl_list_remove(&tablet_pad->attach.link); |
273 | tablet_pad->attach.notify = handle_tablet_pad_attach; | 274 | tablet_pad->attach.notify = handle_tablet_pad_attach; |
274 | wl_signal_add(&device->tablet_pad->events.attach_tablet, | 275 | wl_signal_add(&tablet_pad->wlr->events.attach_tablet, |
275 | &tablet_pad->attach); | 276 | &tablet_pad->attach); |
276 | 277 | ||
277 | wl_list_remove(&tablet_pad->button.link); | 278 | wl_list_remove(&tablet_pad->button.link); |
278 | tablet_pad->button.notify = handle_tablet_pad_button; | 279 | tablet_pad->button.notify = handle_tablet_pad_button; |
279 | wl_signal_add(&device->tablet_pad->events.button, &tablet_pad->button); | 280 | wl_signal_add(&tablet_pad->wlr->events.button, &tablet_pad->button); |
280 | 281 | ||
281 | wl_list_remove(&tablet_pad->strip.link); | 282 | wl_list_remove(&tablet_pad->strip.link); |
282 | tablet_pad->strip.notify = handle_tablet_pad_strip; | 283 | tablet_pad->strip.notify = handle_tablet_pad_strip; |
283 | wl_signal_add(&device->tablet_pad->events.strip, &tablet_pad->strip); | 284 | wl_signal_add(&tablet_pad->wlr->events.strip, &tablet_pad->strip); |
284 | 285 | ||
285 | wl_list_remove(&tablet_pad->ring.link); | 286 | wl_list_remove(&tablet_pad->ring.link); |
286 | tablet_pad->ring.notify = handle_tablet_pad_ring; | 287 | tablet_pad->ring.notify = handle_tablet_pad_ring; |
287 | wl_signal_add(&device->tablet_pad->events.ring, &tablet_pad->ring); | 288 | wl_signal_add(&tablet_pad->wlr->events.ring, &tablet_pad->ring); |
288 | 289 | ||
289 | /* Search for a sibling tablet */ | 290 | /* Search for a sibling tablet */ |
290 | if (!wlr_input_device_is_libinput(device)) { | 291 | if (!wlr_input_device_is_libinput(wlr_device)) { |
291 | /* We can only do this on libinput devices */ | 292 | /* We can only do this on libinput devices */ |
292 | return; | 293 | return; |
293 | } | 294 | } |
294 | 295 | ||
295 | struct libinput_device_group *group = | 296 | struct libinput_device_group *group = |
296 | libinput_device_get_device_group(wlr_libinput_get_device_handle(device)); | 297 | libinput_device_get_device_group(wlr_libinput_get_device_handle(wlr_device)); |
297 | struct sway_tablet *tool; | 298 | struct sway_tablet *tool; |
298 | wl_list_for_each(tool, &seat->cursor->tablets, link) { | 299 | wl_list_for_each(tool, &seat->cursor->tablets, link) { |
299 | struct wlr_input_device *tablet = | 300 | struct wlr_input_device *tablet = |