summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafal Mielniczuk <rafal.mielniczuk2@gmail.com>2013-02-17 15:55:55 +0100
committerKristian Høgsberg <krh@bitplanet.net>2013-02-18 16:52:59 -0500
commitdb790573ad1c67bf6066c5cd2b76c5aa740351b8 (patch)
treefdaec6ffa6fc43ff231a4ad865989b619f564b9a
parent8764466c6b0082959e8f4f6067e125276302ea8e (diff)
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
-rw-r--r--src/compositor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 6ee3a79f..64d0830f 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -2306,6 +2306,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);
}
}