summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-11-23 10:34:50 -0500
committerKristian Høgsberg <krh@bitplanet.net>2011-11-23 10:34:50 -0500
commit0b7d1e86af1e3da1dbee79ebdee2616a6e8bcf01 (patch)
tree7e7b03fbbeb2af42e178381ae555e2db5a520721 /src
parentbdbd6ef80b85f5d20608f702a6ffaa1f1f73e7a4 (diff)
server: Stop special casing the compositor
wl_compositor_init() was just adding the global and providing a helper bind function. Not useful enough to warrent API.
Diffstat (limited to 'src')
-rw-r--r--src/wayland-server.c33
-rw-r--r--src/wayland-server.h8
2 files changed, 2 insertions, 39 deletions
diff --git a/src/wayland-server.c b/src/wayland-server.c
index d2ca043..4811639 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -387,8 +387,7 @@ lose_keyboard_focus(struct wl_listener *listener,
}
WL_EXPORT void
-wl_input_device_init(struct wl_input_device *device,
- struct wl_compositor *compositor)
+wl_input_device_init(struct wl_input_device *device)
{
memset(device, 0, sizeof *device);
wl_list_init(&device->resource_list);
@@ -397,7 +396,6 @@ wl_input_device_init(struct wl_input_device *device,
device->x = 100;
device->y = 100;
- device->compositor = compositor;
}
static struct wl_resource *
@@ -876,32 +874,3 @@ wl_client_add_object(struct wl_client *client,
return resource;
}
-
-static void
-compositor_bind(struct wl_client *client,
- void *data, uint32_t version, uint32_t id)
-{
- struct wl_compositor *compositor = data;
- struct wl_resource *resource;
-
- resource = wl_client_add_object(client, &wl_compositor_interface,
- compositor->interface, id, compositor);
- if (resource == NULL)
- return;
-}
-
-WL_EXPORT int
-wl_compositor_init(struct wl_compositor *compositor,
- const struct wl_compositor_interface *interface,
- struct wl_display *display)
-{
- struct wl_global *global;
-
- compositor->interface = interface;
- global = wl_display_add_global(display, &wl_compositor_interface,
- compositor, compositor_bind);
- if (!global)
- return -1;
-
- return 0;
-}
diff --git a/src/wayland-server.h b/src/wayland-server.h
index ead95cc..269a079 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -124,10 +124,6 @@ struct wl_shm_callbacks {
void (*buffer_destroyed)(struct wl_buffer *buffer);
};
-struct wl_compositor {
- const struct wl_compositor_interface *interface;
-};
-
struct wl_buffer {
struct wl_resource resource;
int32_t width, height;
@@ -161,7 +157,6 @@ struct wl_grab {
struct wl_input_device {
struct wl_list resource_list;
- struct wl_compositor *compositor;
struct wl_resource *pointer_focus_resource;
struct wl_surface *pointer_focus;
struct wl_resource *keyboard_focus_resource;
@@ -242,8 +237,7 @@ void
wl_resource_destroy(struct wl_resource *resource, uint32_t time);
void
-wl_input_device_init(struct wl_input_device *device,
- struct wl_compositor *compositor);
+wl_input_device_init(struct wl_input_device *device);
void
wl_input_device_set_pointer_focus(struct wl_input_device *device,