aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-03-08 16:54:28 -0500
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-03-17 13:44:19 -0400
commit96ccc50c5753346e852625fe37418a54386c7804 (patch)
treebcbdf4f165d054d6e8d61d472898f3e140ea24a4 /examples
parenta92e5f8d4634a5d24c2fbab4a7fe0256558a96e6 (diff)
types/wlr_input_device: move width_mm and height_mm fields to wlr_tablet and wlr_touch
Diffstat (limited to 'examples')
-rw-r--r--examples/tablet.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/tablet.c b/examples/tablet.c
index 234bfb99..dd48983d 100644
--- a/examples/tablet.c
+++ b/examples/tablet.c
@@ -320,11 +320,12 @@ static void new_input_notify(struct wl_listener *listener, void *data) {
wl_signal_add(&device->tablet_pad->events.ring, &pstate->ring);
wl_list_insert(&sample->tablet_pads, &pstate->link);
break;
- case WLR_INPUT_DEVICE_TABLET_TOOL:
- sample->width_mm = device->width_mm == 0 ?
- 20 : device->width_mm;
- sample->height_mm = device->height_mm == 0 ?
- 10 : device->height_mm;
+ case WLR_INPUT_DEVICE_TABLET_TOOL:;
+ struct wlr_tablet *tablet = device->tablet;
+ sample->width_mm = tablet->width_mm == 0 ?
+ 20 : tablet->width_mm;
+ sample->height_mm = tablet->height_mm == 0 ?
+ 10 : tablet->height_mm;
struct tablet_tool_state *tstate = calloc(sizeof(struct tablet_tool_state), 1);
tstate->device = device;
@@ -344,7 +345,6 @@ static void new_input_notify(struct wl_listener *listener, void *data) {
}
}
-
int main(int argc, char *argv[]) {
wlr_log_init(WLR_DEBUG, NULL);
struct wl_display *display = wl_display_create();