From e3642f54214c1860db9c80a5e95409be88629a3c Mon Sep 17 00:00:00 2001 From: Rafal Mielniczuk Date: Sun, 17 Feb 2013 15:55:55 +0100 Subject: [PATCH] compositor: set data_device keyboard focus in seat_get_keyboard Because seat_get_keyboard is called after initial weston_surface_activate, wl_data_device_set_keyboard_focus fails to send data offer for newly connected client due to wl_seat.focus_resource being NULL. This patch calls wl_data_device_set_keyboard_focus in seat_get_keyboard, so it can send data offer for newly created client (when wl_keyboard.resource_list and wl_seat.focus_resource are properly set up). https://bugs.freedesktop.org/show_bug.cgi?id=60617 --- src/compositor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compositor.c b/src/compositor.c index 63fe793..4a0ddac 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -2300,6 +2300,7 @@ seat_get_keyboard(struct wl_client *client, struct wl_resource *resource, seat->seat.keyboard->focus->resource.client == client) { wl_keyboard_set_focus(seat->seat.keyboard, seat->seat.keyboard->focus); + wl_data_device_set_keyboard_focus(&seat->seat); } } -- 1.8.1.3