summaryrefslogtreecommitdiff
path: root/src/platform/wayland/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/wayland/keyboard.c')
-rw-r--r--src/platform/wayland/keyboard.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/platform/wayland/keyboard.c b/src/platform/wayland/keyboard.c
index ebd0fc7..038ba78 100644
--- a/src/platform/wayland/keyboard.c
+++ b/src/platform/wayland/keyboard.c
@@ -133,8 +133,8 @@ bool conn_keyboard_on(const struct wayland_display *c, const struct wayland_surf
static void push_focus(struct wayland_surface *w, bool focused)
{
- struct yasl_input_event ev = {
- .kind = YASL_INPUT_FOCUS,
+ struct yasl_event ev = {
+ .type = YASL_EVENT_FOCUS,
.surface = &w->base,
.focus = { .focused = focused },
};
@@ -278,13 +278,13 @@ static void keyboard_text(struct seat *s, struct wayland_surface *w, uint32_t ke
else xkb_state_key_get_utf8(s->xkb_state, code, text, (size_t)len + 1);
/* Editing commands belong to key events, not text insertion. */
if ((unsigned char)text[0] >= 0x20 && text[0] != 0x7f) {
- struct yasl_input_event ev = {.kind = YASL_INPUT_TEXT,
- .surface = &w->base, .text = {text, (size_t)len}};
+ struct yasl_event ev = {.type = YASL_EVENT_TEXT,
+ .surface = &w->base, .text = {.data = text, .len = (size_t)len}};
input_queue_push(&w->input, &ev);
}
if (text != local) free(text);
} else {
- struct yasl_input_event ev = {.kind = YASL_INPUT_RESET, .surface = &w->base};
+ struct yasl_event ev = {.type = YASL_EVENT_INPUT_RESET, .surface = &w->base};
input_queue_push(&w->input, &ev);
}
}
@@ -297,8 +297,8 @@ static bool keyboard_dispatch_key(struct seat *s, struct wayland_surface *w, uin
if (!s->xkb_state || !w->cbs) return false;
struct yasl_key_event k = xkb_key_event(s, key, action);
- struct yasl_input_event ev = {
- .kind = YASL_INPUT_KEY,
+ struct yasl_event ev = {
+ .type = YASL_EVENT_KEY,
.surface = &w->base,
.key = k,
};
@@ -448,7 +448,7 @@ void wayland_display_paste(struct wayland_display *c, enum yasl_selection sel, s
clipboard_paste(s->clipboard, target->surface);
}
-bool wayland_surface_input_poll(struct wayland_surface *w, struct yasl_input_event *ev)
+bool wayland_surface_poll_event(struct wayland_surface *w, struct yasl_event *ev)
{
return w && ev && input_queue_pop(&w->input, ev);
}