compositor: Fix a couple of left-over wl_resource direct access

dev
Kristian Høgsberg 12 years ago
parent 166aeaa411
commit c2d7042b9d
  1. 4
      src/bindings.c
  2. 2
      src/compositor.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);
}

@ -1679,7 +1679,7 @@ static void
compositor_create_surface(struct wl_client *client,
struct wl_resource *resource, uint32_t id)
{
struct weston_compositor *ec = resource->data;
struct weston_compositor *ec = wl_resource_get_user_data(resource);
struct weston_surface *surface;
surface = weston_surface_create(ec);

Loading…
Cancel
Save