mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-06 13:29:48 -05:00
compositor-wayland: Handle keyboard focus too
This commit is contained in:
parent
3ba4858c4b
commit
af82bea253
1 changed files with 12 additions and 2 deletions
|
|
@ -373,7 +373,7 @@ input_handle_pointer_focus(void *data,
|
||||||
int32_t x, int32_t y, int32_t sx, int32_t sy)
|
int32_t x, int32_t y, int32_t sx, int32_t sy)
|
||||||
{
|
{
|
||||||
struct wayland_input *input = data;
|
struct wayland_input *input = data;
|
||||||
struct wayland_output *output = data;
|
struct wayland_output *output;
|
||||||
struct wayland_compositor *c = input->compositor;
|
struct wayland_compositor *c = input->compositor;
|
||||||
|
|
||||||
if (surface) {
|
if (surface) {
|
||||||
|
|
@ -392,7 +392,17 @@ input_handle_keyboard_focus(void *data,
|
||||||
struct wl_surface *surface,
|
struct wl_surface *surface,
|
||||||
struct wl_array *keys)
|
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 = {
|
static const struct wl_input_device_listener input_device_listener = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue