diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2011-01-27 20:18:17 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-01-27 20:18:17 -0500 |
commit | af82bea253b70ce84bc11cd1e93fef5f7d6f89d1 (patch) | |
tree | 26f75685d6227ba360af4431ecc760f09930b0d9 | |
parent | 3ba4858c4b62a5d253bd757944ceccae3764d6ce (diff) |
compositor-wayland: Handle keyboard focus too
-rw-r--r-- | compositor/compositor-wayland.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/compositor/compositor-wayland.c b/compositor/compositor-wayland.c index d80cf5f..11320d8 100644 --- a/compositor/compositor-wayland.c +++ b/compositor/compositor-wayland.c @@ -373,7 +373,7 @@ input_handle_pointer_focus(void *data, int32_t x, int32_t y, int32_t sx, int32_t sy) { struct wayland_input *input = data; - struct wayland_output *output = data; + struct wayland_output *output; struct wayland_compositor *c = input->compositor; if (surface) { @@ -392,7 +392,17 @@ input_handle_keyboard_focus(void *data, struct wl_surface *surface, struct wl_array *keys) { - /* FIXME: sth to be done here? */ + struct wayland_input *input = data; + struct wayland_compositor *c = input->compositor; + struct wayland_output *output; + + if (surface) { + output = wl_surface_get_user_data(surface); + notify_keyboard_focus(c->base.input_device, + time, &output->base, keys); + } else { + notify_keyboard_focus(c->base.input_device, time, NULL, NULL); + } } static const struct wl_input_device_listener input_device_listener = { |