summaryrefslogtreecommitdiff
path: root/src/bindings.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-06-25 15:34:33 -0400
committerKristian Høgsberg <krh@bitplanet.net>2013-06-25 15:34:33 -0400
commitc2d7042b9d71dc191d953cec6df9ba1f262859c9 (patch)
tree2f94901da7e9b460ea187d5d472b2c3dc18781a6 /src/bindings.c
parent166aeaa411ab61fffedb9dc94b258298589ff769 (diff)
downloadweston-c2d7042b9d71dc191d953cec6df9ba1f262859c9.tar.gz
compositor: Fix a couple of left-over wl_resource direct access
Diffstat (limited to 'src/bindings.c')
-rw-r--r--src/bindings.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bindings.c b/src/bindings.c
index 558208ce..31944147 100644
--- a/src/bindings.c
+++ b/src/bindings.c
@@ -155,6 +155,7 @@ binding_key(struct weston_keyboard_grab *grab,
struct binding_keyboard_grab *b =
container_of(grab, struct binding_keyboard_grab, grab);
struct wl_resource *resource;
+ struct wl_client *client;
struct wl_display *display;
enum wl_keyboard_key_state state = state_w;
uint32_t serial;
@@ -169,7 +170,8 @@ binding_key(struct weston_keyboard_grab *grab,
free(b);
}
} else if (resource) {
- display = wl_client_get_display(resource->client);
+ client = wl_resource_get_client(resource);
+ display = wl_client_get_display(client);
serial = wl_display_next_serial(display);
wl_keyboard_send_key(resource, serial, time, key, state);
}