summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-03-23 17:08:44 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-03-25 15:27:36 -0600
commit7018ed9218b05e15d191adcae04167f9d6fc8bce (patch)
tree9b23ab983037223e359c54b8c4167b16402dd417
parentf75e4262229e26ea159742b96f6b63aef472ed8f (diff)
createpointer now takes wlr_pointer
-rw-r--r--dwl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dwl.c b/dwl.c
index 99205c1..3f66be4 100644
--- a/dwl.c
+++ b/dwl.c
@@ -212,7 +212,7 @@ static void createkeyboard(struct wlr_keyboard *keyboard);
static void createmon(struct wl_listener *listener, void *data);
static void createnotify(struct wl_listener *listener, void *data);
static void createlayersurface(struct wl_listener *listener, void *data);
-static void createpointer(struct wlr_input_device *device);
+static void createpointer(struct wlr_pointer *pointer);
static void cursorframe(struct wl_listener *listener, void *data);
static void destroylayersurfacenotify(struct wl_listener *listener, void *data);
static void destroynotify(struct wl_listener *listener, void *data);
@@ -831,11 +831,11 @@ createlayersurface(struct wl_listener *listener, void *data)
}
void
-createpointer(struct wlr_input_device *device)
+createpointer(struct wlr_pointer *pointer)
{
- if (wlr_input_device_is_libinput(device)) {
+ if (wlr_input_device_is_libinput(&pointer->base)) {
struct libinput_device *libinput_device = (struct libinput_device*)
- wlr_libinput_get_device_handle(device);
+ wlr_libinput_get_device_handle(&pointer->base);
if (tap_to_click && libinput_device_config_tap_get_finger_count(libinput_device))
libinput_device_config_tap_set_enabled(libinput_device, LIBINPUT_CONFIG_TAP_ENABLED);
@@ -848,7 +848,7 @@ createpointer(struct wlr_input_device *device)
* is proxied through wlr_cursor. On another compositor, you might take this
* opportunity to do libinput configuration on the device to set
* acceleration, etc. */
- wlr_cursor_attach_input_device(cursor, device);
+ wlr_cursor_attach_input_device(cursor, &pointer->base);
}
void
@@ -1102,7 +1102,7 @@ inputdevice(struct wl_listener *listener, void *data)
createkeyboard(device->keyboard);
break;
case WLR_INPUT_DEVICE_POINTER:
- createpointer(device);
+ createpointer(device->pointer);
break;
default:
/* TODO handle other input device types */