From 739361aa70d61cbc9e062d6a90df09f258a1bbcb Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Thu, 9 Nov 2017 17:29:28 -0500 Subject: wlr-keyboard: take out modifiers event struct (for now) --- backend/libinput/keyboard.c | 1 - backend/wayland/wl_seat.c | 12 ++---------- backend/x11/backend.c | 1 - 3 files changed, 2 insertions(+), 12 deletions(-) (limited to 'backend') diff --git a/backend/libinput/keyboard.c b/backend/libinput/keyboard.c index 9a24c791..065d8ead 100644 --- a/backend/libinput/keyboard.c +++ b/backend/libinput/keyboard.c @@ -54,7 +54,6 @@ void handle_keyboard_key(struct libinput_event *event, struct libinput_event_keyboard *kbevent = libinput_event_get_keyboard_event(event); struct wlr_event_keyboard_key wlr_event = { 0 }; - wlr_event.device = wlr_dev; wlr_event.time_msec = usec_to_msec(libinput_event_keyboard_get_time_usec(kbevent)); wlr_event.keycode = libinput_event_keyboard_get_key(kbevent); diff --git a/backend/wayland/wl_seat.c b/backend/wayland/wl_seat.c index 74eaf9bd..a2da8df5 100644 --- a/backend/wayland/wl_seat.c +++ b/backend/wayland/wl_seat.c @@ -151,7 +151,6 @@ static void keyboard_handle_key(void *data, struct wl_keyboard *wl_keyboard, assert(dev && dev->keyboard); struct wlr_event_keyboard_key wlr_event; - wlr_event.device = dev; wlr_event.keycode = key; wlr_event.state = state; wlr_event.time_msec = time; @@ -163,15 +162,8 @@ static void keyboard_handle_modifiers(void *data, struct wl_keyboard *wl_keyboar uint32_t mods_locked, uint32_t group) { struct wlr_input_device *dev = data; assert(dev && dev->keyboard); - struct wlr_event_keyboard_modifiers wlr_event; - wlr_event.device = dev; - wlr_event.keyboard = dev->keyboard; - wlr_event.mods_depressed = mods_depressed; - wlr_event.mods_latched = mods_latched; - wlr_event.mods_locked = mods_locked; - wlr_event.group = group; - - wlr_keyboard_notify_modifiers(dev->keyboard, &wlr_event); + wlr_keyboard_notify_modifiers(dev->keyboard, mods_depressed, mods_latched, + mods_locked, group); } static void keyboard_handle_repeat_info(void *data, struct wl_keyboard *wl_keyboard, diff --git a/backend/x11/backend.c b/backend/x11/backend.c index f76b314e..97b0dd8c 100644 --- a/backend/x11/backend.c +++ b/backend/x11/backend.c @@ -50,7 +50,6 @@ static bool handle_x11_event(struct wlr_x11_backend *x11, xcb_generic_event_t *e case XCB_KEY_RELEASE: { xcb_key_press_event_t *ev = (xcb_key_press_event_t *)event; struct wlr_event_keyboard_key key = { - .device = &x11->keyboard_dev, .time_msec = ev->time, .keycode = ev->detail - 8, .state = event->response_type == XCB_KEY_PRESS ? -- cgit v1.2.3