summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-10-11 22:19:34 -0400
committerKristian Høgsberg <krh@bitplanet.net>2011-10-11 22:19:34 -0400
commit8bc1abd1f569df860700a3c9d3f1f05e76c60ec9 (patch)
treedd8235e460e2ecb0ead3c792023fb6a476a615f8
parentffe8ee8d602ff24588e994ec41393ccae128bca1 (diff)
wayland-server: Track input_device resource for focused surface
We no long track the focused surface, but expect the compositor to set focus when the focus changes. We do track the resource for the input device that corresponds to the current surface, in case that goes away.
-rw-r--r--src/wayland-server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 2295efc..4cb3dd5 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -342,7 +342,7 @@ lose_pointer_focus(struct wl_listener *listener,
container_of(listener, struct wl_input_device,
pointer_focus_listener);
- wl_input_device_set_pointer_focus(device, NULL, time, 0, 0, 0, 0);
+ device->pointer_focus_resource = NULL;
}
static void
@@ -353,7 +353,7 @@ lose_keyboard_focus(struct wl_listener *listener,
container_of(listener, struct wl_input_device,
keyboard_focus_listener);
- wl_input_device_set_keyboard_focus(device, NULL, time);
+ device->keyboard_focus_resource = NULL;
}
WL_EXPORT void
@@ -412,7 +412,7 @@ wl_input_device_set_pointer_focus(struct wl_input_device *device,
wl_resource_post_event(resource,
WL_INPUT_DEVICE_POINTER_FOCUS,
time, surface, x, y, sx, sy);
- wl_list_insert(surface->resource.destroy_listener_list.prev,
+ wl_list_insert(resource->destroy_listener_list.prev,
&device->pointer_focus_listener.link);
}
@@ -445,7 +445,7 @@ wl_input_device_set_keyboard_focus(struct wl_input_device *device,
wl_resource_post_event(resource,
WL_INPUT_DEVICE_KEYBOARD_FOCUS,
time, surface, &device->keys);
- wl_list_insert(surface->resource.destroy_listener_list.prev,
+ wl_list_insert(resource->destroy_listener_list.prev,
&device->keyboard_focus_listener.link);
}