input: support tablet-v2 pad notifications

This commit is contained in:
Jens Peters 2024-06-04 20:21:12 +02:00 committed by Johan Malm
parent 61e5e0e4d9
commit 3c0cea92f2
4 changed files with 155 additions and 10 deletions

View file

@ -14,6 +14,7 @@
#include "input/cursor.h"
#include "input/tablet.h"
#include "input/tablet-tool.h"
#include "input/tablet-pad.h"
#include "labwc.h"
#include "idle.h"
#include "action.h"
@ -511,6 +512,8 @@ handle_destroy(struct wl_listener *listener, void *data)
wl_container_of(listener, tablet, handlers.destroy);
wl_list_remove(&tablet->link);
tablet_pad_attach_tablet(tablet->seat);
wl_list_remove(&tablet->handlers.tip.link);
wl_list_remove(&tablet->handlers.button.link);
wl_list_remove(&tablet->handlers.proximity.link);
@ -548,5 +551,7 @@ tablet_init(struct seat *seat, struct wlr_input_device *wlr_device)
CONNECT_SIGNAL(tablet->tablet, &tablet->handlers, tip);
CONNECT_SIGNAL(tablet->tablet, &tablet->handlers, button);
CONNECT_SIGNAL(wlr_device, &tablet->handlers, destroy);
wl_list_insert(&seat->tablets, &tablet->link);
tablet_pad_attach_tablet(tablet->seat);
}