mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-04-09 08:21:23 -04:00
Apply clang-format
This commit is contained in:
parent
a11d075f85
commit
adaebf47de
2 changed files with 14 additions and 18 deletions
22
seat.c
22
seat.c
|
|
@ -212,8 +212,7 @@ static void
|
|||
handle_modifier_event(struct wlr_input_device *device, struct cg_seat *seat)
|
||||
{
|
||||
wlr_seat_set_keyboard(seat->seat, device);
|
||||
wlr_seat_keyboard_notify_modifiers(seat->seat,
|
||||
&device->keyboard->modifiers);
|
||||
wlr_seat_keyboard_notify_modifiers(seat->seat, &device->keyboard->modifiers);
|
||||
|
||||
wlr_idle_notify_activity(seat->server->idle, seat->seat);
|
||||
}
|
||||
|
|
@ -259,15 +258,15 @@ handle_key_event(struct wlr_input_device *device, struct cg_seat* seat, void *da
|
|||
if (!handled) {
|
||||
/* Otherwise, we pass it along to the client. */
|
||||
wlr_seat_set_keyboard(seat->seat, device);
|
||||
wlr_seat_keyboard_notify_key(seat->seat, event->time_msec,
|
||||
event->keycode, event->state);
|
||||
wlr_seat_keyboard_notify_key(seat->seat, event->time_msec, event->keycode, event->state);
|
||||
}
|
||||
|
||||
wlr_idle_notify_activity(seat->server->idle, seat->seat);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_keyboard_group_key(struct wl_listener *listener, void *data) {
|
||||
handle_keyboard_group_key(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct cg_keyboard_group *cg_group = wl_container_of(listener, cg_group, key);
|
||||
handle_key_event(cg_group->wlr_group->input_device, cg_group->seat, data);
|
||||
}
|
||||
|
|
@ -295,8 +294,7 @@ cg_keyboard_group_add(struct wlr_input_device *device, struct cg_seat* seat)
|
|||
|
||||
/* This is reached if and only if the keyboard could not be inserted into
|
||||
* any group */
|
||||
struct cg_keyboard_group *cg_group =
|
||||
calloc(1, sizeof(struct cg_keyboard_group));
|
||||
struct cg_keyboard_group *cg_group = calloc(1, sizeof(struct cg_keyboard_group));
|
||||
cg_group->seat = seat;
|
||||
if (cg_group == NULL) {
|
||||
wlr_log(WLR_ERROR, "Failed to allocate keyboard group.");
|
||||
|
|
@ -309,11 +307,10 @@ cg_keyboard_group_add(struct wlr_input_device *device, struct cg_seat* seat)
|
|||
}
|
||||
|
||||
cg_group->wlr_group->data = cg_group;
|
||||
wlr_keyboard_set_keymap(&cg_group->wlr_group->keyboard,
|
||||
device->keyboard->keymap);
|
||||
wlr_keyboard_set_keymap(&cg_group->wlr_group->keyboard, device->keyboard->keymap);
|
||||
|
||||
wlr_keyboard_set_repeat_info(&cg_group->wlr_group->keyboard,
|
||||
wlr_keyboard->repeat_info.rate, wlr_keyboard->repeat_info.delay);
|
||||
wlr_keyboard_set_repeat_info(&cg_group->wlr_group->keyboard, wlr_keyboard->repeat_info.rate,
|
||||
wlr_keyboard->repeat_info.delay);
|
||||
|
||||
wlr_log(WLR_DEBUG, "Created keyboard group");
|
||||
|
||||
|
|
@ -328,8 +325,7 @@ cg_keyboard_group_add(struct wlr_input_device *device, struct cg_seat* seat)
|
|||
|
||||
wl_signal_add(&cg_group->wlr_group->keyboard.events.key, &cg_group->key);
|
||||
cg_group->key.notify = handle_keyboard_group_key;
|
||||
wl_signal_add(&cg_group->wlr_group->keyboard.events.modifiers,
|
||||
&cg_group->modifiers);
|
||||
wl_signal_add(&cg_group->wlr_group->keyboard.events.modifiers, &cg_group->modifiers);
|
||||
cg_group->modifiers.notify = handle_keyboard_group_modifiers;
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue