Rename wayland-compositor to weston

This rename addresses a few problems around the split between core
Wayland and the wayland-demos repository.

1) Initially, we had one big repository with protocol code, sample
compositor and sample clients.  We split that repository to make it
possible to implement the protocol without pulling in the sample/demo
code.  At this point, the compositor is more than just a "demo" and
wayland-demos doesn't send the right message.  The sample compositor
is a useful, self-contained project in it's own right, and we want to
move away from the "demos" label.

2) Another problem is that the wayland-demos compositor is often
called "the wayland compsitor", but it's really just one possible
compositor.  Existing X11 compositors are expected to add Wayland
support and then gradually phase out/modularize the X11 support, for
example.  Conversely, it's hard to talk about the wayland-demos
compositor specifically as opposed to, eg, the wayland protocol or a
wayland compositor in general.

We are also renaming the repo to weston, and the compositor
subdirectory to src/, to emphasize that the main "output" is the
compositor.
parent 4c61747a
SUBDIRS = shared compositor clients data
SUBDIRS = shared src clients data
......@@ -29,8 +29,8 @@ clients_programs = \
wscreensaver \
eventdemo
desktop_shell = wayland-desktop-shell
tablet_shell = wayland-tablet-shell
desktop_shell = weston-desktop-shell
tablet_shell = weston-tablet-shell
noinst_LIBRARIES = libtoytoolkit.a
......@@ -84,18 +84,18 @@ wscreensaver_LDADD = $(toolkit_libs) -lGLU
eventdemo_SOURCES = eventdemo.c
eventdemo_LDADD = $(toolkit_libs)
wayland_desktop_shell_SOURCES = \
weston_desktop_shell_SOURCES = \
desktop-shell.c \
desktop-shell-client-protocol.h \
desktop-shell-protocol.c
wayland_desktop_shell_LDADD = $(toolkit_libs) \
weston_desktop_shell_LDADD = $(toolkit_libs) \
../shared/libconfig-parser.la
wayland_tablet_shell_SOURCES = \
weston_tablet_shell_SOURCES = \
tablet-shell.c \
tablet-shell-client-protocol.h \
tablet-shell-protocol.c
wayland_tablet_shell_LDADD = $(toolkit_libs) \
weston_tablet_shell_LDADD = $(toolkit_libs) \
../shared/libconfig-parser.la
BUILT_SOURCES = \
......
......@@ -141,7 +141,7 @@ WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol'])
AC_CONFIG_FILES([Makefile
shared/Makefile
compositor/Makefile
src/Makefile
clients/Makefile
data/Makefile])
AC_OUTPUT
waylanddatadir = $(datadir)/wayland
westondatadir = $(datadir)/weston
dist_waylanddata_DATA = \
dist_westondata_DATA = \
bottom_left_corner.png \
bottom_right_corner.png \
bottom_side.png \
......
bin_PROGRAMS = wayland-compositor
bin_PROGRAMS = weston
AM_CPPFLAGS = \
-DDATADIR='"$(datadir)"' \
......@@ -7,12 +7,12 @@ AM_CPPFLAGS = \
-DXSERVER_PATH='"@XSERVER_PATH@"' \
$(COMPOSITOR_CFLAGS)
wayland_compositor_LDFLAGS = -export-dynamic
wayland_compositor_CFLAGS = $(GCC_CFLAGS)
wayland_compositor_LDADD = \
weston_LDFLAGS = -export-dynamic
weston_CFLAGS = $(GCC_CFLAGS)
weston_LDADD = \
$(COMPOSITOR_LIBS) $(DLOPEN_LIBS) $(XSERVER_LAUNCHER_LIBS)
wayland_compositor_SOURCES = \
weston_SOURCES = \
compositor.c \
compositor.h \
image-loader.c \
......@@ -32,7 +32,7 @@ xserver_launcher_sources = \
hash.h
endif
moduledir = @libdir@/wayland
moduledir = @libdir@/weston
module_LTLIBRARIES = \
$(desktop_shell) \
$(tablet_shell) \
......
......@@ -38,7 +38,7 @@
#include "evdev.h"
struct drm_compositor {
struct wlsc_compositor base;
struct weston_compositor base;
struct udev *udev;
struct wl_event_source *drm_source;
......@@ -58,12 +58,12 @@ struct drm_compositor {
};
struct drm_mode {
struct wlsc_mode base;
struct weston_mode base;
drmModeModeInfo mode_info;
};
struct drm_output {
struct wlsc_output base;
struct weston_output base;
uint32_t crtc_id;
uint32_t connector_id;
......@@ -79,7 +79,7 @@ struct drm_output {
};
static int
drm_output_prepare_render(struct wlsc_output *output_base)
drm_output_prepare_render(struct weston_output *output_base)
{
struct drm_output *output = (struct drm_output *) output_base;
......@@ -95,7 +95,7 @@ drm_output_prepare_render(struct wlsc_output *output_base)
}
static int
drm_output_present(struct wlsc_output *output_base)
drm_output_present(struct weston_output *output_base)
{
struct drm_output *output = (struct drm_output *) output_base;
struct drm_compositor *c =
......@@ -139,12 +139,12 @@ page_flip_handler(int fd, unsigned int frame,
}
msecs = sec * 1000 + usec / 1000;
wlsc_output_finish_frame(&output->base, msecs);
weston_output_finish_frame(&output->base, msecs);
}
static int
drm_output_prepare_scanout_surface(struct wlsc_output *output_base,
struct wlsc_surface *es)
drm_output_prepare_scanout_surface(struct weston_output *output_base,
struct weston_surface *es)
{
struct drm_output *output = (struct drm_output *) output_base;
struct drm_compositor *c =
......@@ -188,8 +188,8 @@ drm_output_prepare_scanout_surface(struct wlsc_output *output_base,
}
static int
drm_output_set_cursor(struct wlsc_output *output_base,
struct wlsc_input_device *eid)
drm_output_set_cursor(struct weston_output *output_base,
struct weston_input_device *eid)
{
struct drm_output *output = (struct drm_output *) output_base;
struct drm_compositor *c =
......@@ -259,7 +259,7 @@ out:
}
static void
drm_output_destroy(struct wlsc_output *output_base)
drm_output_destroy(struct weston_output *output_base)
{
struct drm_output *output = (struct drm_output *) output_base;
struct drm_compositor *c =
......@@ -294,7 +294,7 @@ drm_output_destroy(struct wlsc_output *output_base)
c->crtc_allocator &= ~(1 << output->crtc_id);
c->connector_allocator &= ~(1 << output->connector_id);
wlsc_output_destroy(&output->base);
weston_output_destroy(&output->base);
wl_list_remove(&output->base.link);
free(output);
......@@ -542,7 +542,7 @@ create_output_for_connector(struct drm_compositor *ec,
goto err_fb;
}
wlsc_output_init(&output->base, &ec->base, x, y,
weston_output_init(&output->base, &ec->base, x, y,
connector->mmWidth, connector->mmHeight, 0);
wl_list_insert(ec->base.output_list.prev, &output->base.link);
......@@ -619,7 +619,7 @@ create_outputs(struct drm_compositor *ec, int option_connector)
}
x += container_of(ec->base.output_list.prev,
struct wlsc_output,
struct weston_output,
link)->current->width;
}
......@@ -669,9 +669,9 @@ update_outputs(struct drm_compositor *ec)
connected |= (1 << connector_id);
if (!(ec->connector_allocator & (1 << connector_id))) {
struct wlsc_output *last =
struct weston_output *last =
container_of(ec->base.output_list.prev,
struct wlsc_output, link);
struct weston_output, link);
/* XXX: not yet needed, we die with 0 outputs */
if (!wl_list_empty(&ec->base.output_list))
......@@ -693,7 +693,7 @@ update_outputs(struct drm_compositor *ec)
wl_list_for_each_safe(output, next, &ec->base.output_list,
base.link) {
if (x_offset != 0 || y_offset != 0) {
wlsc_output_move(&output->base,
weston_output_move(&output->base,
output->base.x - x_offset,
output->base.y - y_offset);
}
......@@ -744,7 +744,7 @@ udev_drm_event(int fd, uint32_t mask, void *data)
}
static EGLImageKHR
drm_compositor_create_cursor_image(struct wlsc_compositor *ec,
drm_compositor_create_cursor_image(struct weston_compositor *ec,
int32_t *width, int32_t *height)
{
struct drm_compositor *c = (struct drm_compositor *) ec;
......@@ -770,12 +770,12 @@ drm_compositor_create_cursor_image(struct wlsc_compositor *ec,
}
static void
drm_destroy(struct wlsc_compositor *ec)
drm_destroy(struct weston_compositor *ec)
{
struct drm_compositor *d = (struct drm_compositor *) ec;
struct wlsc_input_device *input, *next;
struct weston_input_device *input, *next;
wlsc_compositor_shutdown(ec);
weston_compositor_shutdown(ec);
gbm_device_destroy(d->gbm);
tty_destroy(d->tty);
......@@ -786,25 +786,25 @@ drm_destroy(struct wlsc_compositor *ec)
}
static void
vt_func(struct wlsc_compositor *compositor, int event)
vt_func(struct weston_compositor *compositor, int event)
{
struct drm_compositor *ec = (struct drm_compositor *) compositor;
struct wlsc_output *output;
struct wlsc_input_device *input;
struct weston_output *output;
struct weston_input_device *input;
switch (event) {
case TTY_ENTER_VT:
compositor->focus = 1;
drmSetMaster(ec->drm.fd);
compositor->state = ec->prev_state;
wlsc_compositor_damage_all(compositor);
weston_compositor_damage_all(compositor);
wl_list_for_each(input, &compositor->input_device_list, link)
evdev_add_devices(ec->udev, input);
break;
case TTY_LEAVE_VT:
compositor->focus = 0;
ec->prev_state = compositor->state;
compositor->state = WLSC_COMPOSITOR_SLEEPING;
compositor->state = WESTON_COMPOSITOR_SLEEPING;
wl_list_for_each(input, &compositor->input_device_list, link)
evdev_remove_devices(input);
......@@ -818,7 +818,7 @@ vt_func(struct wlsc_compositor *compositor, int event)
static const char default_seat[] = "seat0";
static struct wlsc_compositor *
static struct weston_compositor *
drm_compositor_create(struct wl_display *display,
int connector, const char *seat, int tty)
{
......@@ -878,13 +878,13 @@ drm_compositor_create(struct wl_display *display,
ec->base.focus = 1;
ec->prev_state = WLSC_COMPOSITOR_ACTIVE;
ec->prev_state = WESTON_COMPOSITOR_ACTIVE;
glGenFramebuffers(1, &ec->base.fbo);
glBindFramebuffer(GL_FRAMEBUFFER, ec->base.fbo);
/* Can't init base class until we have a current egl context */
if (wlsc_compositor_init(&ec->base, display) < 0)
if (weston_compositor_init(&ec->base, display) < 0)
return NULL;
if (create_outputs(ec, connector) < 0) {
......@@ -923,10 +923,10 @@ drm_compositor_create(struct wl_display *display,
return &ec->base;
}
struct wlsc_compositor *
struct weston_compositor *
backend_init(struct wl_display *display, char *options);
WL_EXPORT struct wlsc_compositor *
WL_EXPORT struct weston_compositor *
backend_init(struct wl_display *display, char *options)
{
int connector = 0, i;
......
......@@ -43,7 +43,7 @@
#include "compositor.h"
struct wayland_compositor {
struct wlsc_compositor base;
struct weston_compositor base;
struct {
struct wl_display *display;
......@@ -63,7 +63,7 @@ struct wayland_compositor {
};
struct wayland_output {
struct wlsc_output base;
struct weston_output base;
struct {
struct wl_surface *surface;
......@@ -71,7 +71,7 @@ struct wayland_output {
struct wl_egl_window *egl_window;
} parent;
EGLSurface egl_surface;
struct wlsc_mode mode;
struct weston_mode mode;
};
struct wayland_input {
......@@ -83,14 +83,14 @@ struct wayland_input {
static int
wayland_input_create(struct wayland_compositor *c)
{
struct wlsc_input_device *input;
struct weston_input_device *input;
input = malloc(sizeof *input);
if (input == NULL)
return -1;
memset(input, 0, sizeof *input);
wlsc_input_device_init(input, &c->base);
weston_input_device_init(input, &c->base);
c->base.input_device = &input->input_device;
......@@ -162,10 +162,10 @@ wayland_compositor_init_egl(struct wayland_compositor *c)
}
static int
wayland_output_prepare_render(struct wlsc_output *output_base)
wayland_output_prepare_render(struct weston_output *output_base)
{
struct wayland_output *output = (struct wayland_output *) output_base;
struct wlsc_compositor *ec = output->base.compositor;
struct weston_compositor *ec = output->base.compositor;
if (!eglMakeCurrent(ec->display, output->egl_surface,
output->egl_surface, ec->context)) {
......@@ -179,9 +179,9 @@ wayland_output_prepare_render(struct wlsc_output *output_base)
static void
frame_done(void *data, struct wl_callback *wl_callback, uint32_t time)
{
struct wlsc_output *output = data;
struct weston_output *output = data;
wlsc_output_finish_frame(output, time);
weston_output_finish_frame(output, time);
}
static const struct wl_callback_listener frame_listener = {
......@@ -189,7 +189,7 @@ static const struct wl_callback_listener frame_listener = {
};
static int
wayland_output_present(struct wlsc_output *output_base)
wayland_output_present(struct weston_output *output_base)
{
struct wayland_output *output = (struct wayland_output *) output_base;
struct wayland_compositor *c =
......@@ -207,24 +207,24 @@ wayland_output_present(struct wlsc_output *output_base)
}
static int
wayland_output_prepare_scanout_surface(struct wlsc_output *output_base,
struct wlsc_surface *es)
wayland_output_prepare_scanout_surface(struct weston_output *output_base,
struct weston_surface *es)
{
return -1;
}
static int
wayland_output_set_cursor(struct wlsc_output *output_base,
struct wlsc_input_device *input)
wayland_output_set_cursor(struct weston_output *output_base,
struct weston_input_device *input)
{
return -1;
}
static void
wayland_output_destroy(struct wlsc_output *output_base)
wayland_output_destroy(struct weston_output *output_base)
{
struct wayland_output *output = (struct wayland_output *) output_base;
struct wlsc_compositor *ec = output->base.compositor;
struct weston_compositor *ec = output->base.compositor;
eglDestroySurface(ec->display, output->egl_surface);
wl_egl_window_destroy(output->parent.egl_window);
......@@ -253,7 +253,7 @@ wayland_compositor_create_output(struct wayland_compositor *c,
wl_list_insert(&output->base.mode_list, &output->mode.link);
output->base.current = &output->mode;
wlsc_output_init(&output->base, &c->base, 0, 0, width, height,
weston_output_init(&output->base, &c->base, 0, 0, width, height,
WL_OUTPUT_FLIPPED);
output->parent.surface =
......@@ -306,7 +306,7 @@ cleanup_surface:
cleanup_window:
wl_egl_window_destroy(output->parent.egl_window);
cleanup_output:
/* FIXME: cleanup wlsc_output */
/* FIXME: cleanup weston_output */
free(output);
return -1;
......@@ -499,14 +499,14 @@ wayland_compositor_handle_event(int fd, uint32_t mask, void *data)
}
static void
wayland_destroy(struct wlsc_compositor *ec)
wayland_destroy(struct weston_compositor *ec)
{
wlsc_compositor_shutdown(ec);
weston_compositor_shutdown(ec);
free(ec);
}
static struct wlsc_compositor *
static struct weston_compositor *
wayland_compositor_create(struct wl_display *display, int width, int height)
{
struct wayland_compositor *c;
......@@ -539,7 +539,7 @@ wayland_compositor_create(struct wl_display *display, int width, int height)
c->base.destroy = wayland_destroy;
/* Can't init base class until we have a current egl context */
if (wlsc_compositor_init(&c->base, display) < 0)
if (weston_compositor_init(&c->base, display) < 0)
return NULL;
if (wayland_compositor_create_output(c, width, height) < 0)
......@@ -560,10 +560,10 @@ wayland_compositor_create(struct wl_display *display, int width, int height)
return &c->base;
}
struct wlsc_compositor *
struct weston_compositor *
backend_init(struct wl_display *display, char *options);
WL_EXPORT struct wlsc_compositor *
WL_EXPORT struct weston_compositor *
backend_init(struct wl_display *display, char *options)
{
int width = 1024, height = 640, i;
......
......@@ -45,7 +45,7 @@
#include "compositor.h"
struct x11_compositor {
struct wlsc_compositor base;
struct weston_compositor base;
Display *dpy;
xcb_connection_t *conn;
......@@ -70,16 +70,16 @@ struct x11_compositor {
};
struct x11_output {
struct wlsc_output base;
struct weston_output base;
xcb_window_t window;
EGLSurface egl_surface;
struct wlsc_mode mode;
struct weston_mode mode;
struct wl_event_source *finish_frame_timer;
};
struct x11_input {
struct wlsc_input_device base;
struct weston_input_device base;
};
......@@ -93,7 +93,7 @@ x11_input_create(struct x11_compositor *c)
return -1;
memset(input, 0, sizeof *input);
wlsc_input_device_init(&input->base, &c->base);
weston_input_device_init(&input->base, &c->base);
c->base.input_device = &input->base.input_device;
......@@ -164,10 +164,10 @@ x11_compositor_init_egl(struct x11_compositor *c)
}
static int
x11_output_prepare_render(struct wlsc_output *output_base)
x11_output_prepare_render(struct weston_output *output_base)
{
struct x11_output *output = (struct x11_output *) output_base;
struct wlsc_compositor *ec = output->base.compositor;
struct weston_compositor *ec = output->base.compositor;
if (!eglMakeCurrent(ec->display, output->egl_surface,
output->egl_surface, ec->context)) {
......@@ -187,16 +187,16 @@ finish_frame_handler(void *data)
gettimeofday(&tv, NULL);
msec = tv.tv_sec * 1000 + tv.tv_usec / 1000;
wlsc_output_finish_frame(&output->base, msec);
weston_output_finish_frame(&output->base, msec);
return 1;
}
static int
x11_output_present(struct wlsc_output *output_base)
x11_output_present(struct weston_output *output_base)
{
struct x11_output *output = (struct x11_output *) output_base;
struct wlsc_compositor *ec = output->base.compositor;
struct weston_compositor *ec = output->base.compositor;
if (x11_output_prepare_render(&output->base))
return -1;
......@@ -209,21 +209,21 @@ x11_output_present(struct wlsc_output *output_base)
}
static int
x11_output_prepare_scanout_surface(struct wlsc_output *output_base,
struct wlsc_surface *es)
x11_output_prepare_scanout_surface(struct weston_output *output_base,
struct weston_surface *es)
{
return -1;
}
static int
x11_output_set_cursor(struct wlsc_output *output_base,
struct wlsc_input_device *input)
x11_output_set_cursor(struct weston_output *output_base,
struct weston_input_device *input)
{
return -1;
}
static void
x11_output_destroy(struct wlsc_output *output_base)
x11_output_destroy(struct weston_output *output_base)
{
return;
}
......@@ -300,7 +300,7 @@ x11_output_set_icon(struct x11_compositor *c,
uint32_t *icon, *pixels, stride;
int32_t width, height;
pixels = wlsc_load_image(filename, &width, &height, &stride);
pixels = weston_load_image(filename, &width, &height, &stride);
if (!pixels)
return;
icon = malloc(width * height * 4 + 8);
......@@ -360,7 +360,7 @@ x11_compositor_create_output(struct x11_compositor *c, int x, int y,
wl_list_insert(&output->base.mode_list, &output->mode.link);
output->base.current = &output->mode;
wlsc_output_init(&output->base, &c->base, x, y, width, height,
weston_output_init(&output->base, &c->base, x, y, width, height,
WL_OUTPUT_FLIPPED);
values[1] = c->null_cursor;
......@@ -482,7 +482,7 @@ x11_compositor_deliver_button_event(struct x11_compositor *c,
}
notify_button(c->base.input_device,
wlsc_compositor_get_time(), button, state);
weston_compositor_get_time(), button, state);
}
static int
......@@ -538,7 +538,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
* and fall through and handle the new
* event below. */
notify_key(c->base.input_device,
wlsc_compositor_get_time(),
weston_compositor_get_time(),
key_release->detail - 8, 0);
free(prev);
prev = NULL;
......@@ -561,7 +561,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
output = x11_compositor_find_output(c, focus_in->event);
notify_keyboard_focus(c->base.input_device,
wlsc_compositor_get_time(),
weston_compositor_get_time(),
&output->base, &c->keys);
free(prev);
......@@ -577,7 +577,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
case XCB_KEY_PRESS:
key_press = (xcb_key_press_event_t *) event;
notify_key(c->base.input_device,
wlsc_compositor_get_time(),
weston_compositor_get_time(),
key_press->detail - 8, 1);
break;
case XCB_KEY_RELEASE:
......@@ -593,7 +593,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
motion_notify = (xcb_motion_notify_event_t *) event;
output = x11_compositor_find_output(c, motion_notify->event);
notify_motion(c->base.input_device,
wlsc_compositor_get_time(),
weston_compositor_get_time(),
output->base.x + motion_notify->event_x,
output->base.y + motion_notify->event_y);
break;
......@@ -602,7 +602,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
/* FIXME: schedule output repaint */
/* output = x11_compositor_find_output(c, expose->window); */
wlsc_compositor_schedule_repaint(&c->base);
weston_compositor_schedule_repaint(&c->base);
break;
case XCB_ENTER_NOTIFY:
......@@ -611,7 +611,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
break;
output = x11_compositor_find_output(c, enter_notify->event);
notify_pointer_focus(c->base.input_device,
wlsc_compositor_get_time(),
weston_compositor_get_time(),
&output->base,
output->base.x + enter_notify->event_x,
output->base.y + enter_notify->event_y);
......@@ -623,7 +623,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
break;
output = x11_compositor_find_output(c, enter_notify->event);
notify_pointer_focus(c->base.input_device,
wlsc_compositor_get_time(),
weston_compositor_get_time(),
NULL,
output->base.x + enter_notify->event_x,
output->base.y + enter_notify->event_y);
......@@ -650,7 +650,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
focus_in->mode == XCB_NOTIFY_MODE_UNGRAB)
break;
notify_keyboard_focus(c->base.input_device,
wlsc_compositor_get_time(),
weston_compositor_get_time(),
NULL, NULL);
break;
......@@ -666,7 +666,7 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
case XCB_KEY_RELEASE:
key_release = (xcb_key_press_event_t *) prev;
notify_key(c->base.input_device,
wlsc_compositor_get_time(),
weston_compositor_get_time(),
key_release->detail - 8, 0);
free(prev);
prev = NULL;
......@@ -730,14 +730,14 @@ x11_compositor_get_resources(struct x11_compositor *c)
}
static void
x11_destroy(struct wlsc_compositor *ec)
x11_destroy(struct weston_compositor *ec)
{
wlsc_compositor_shutdown(ec);
weston_compositor_shutdown(ec);
free(ec);
}
static struct wlsc_compositor *
static struct weston_compositor *
x11_compositor_create(struct wl_display *display,
int width, int height, int count, int fullscreen)
{
......@@ -775,7 +775,7 @@ x11_compositor_create(struct wl_display *display,
c->base.destroy = x11_destroy;
/* Can't init base class until we have a current egl context */
if (wlsc_compositor_init(&c->base, display) < 0)
if (weston_compositor_init(&c->base, display) < 0)
return NULL;
for (i = 0, x = 0; i < count; i++) {
......@@ -799,10 +799,10 @@ x11_compositor_create(struct wl_display *display,
return &c->base;
}
struct wlsc_compositor *
struct weston_compositor *
backend_init(struct wl_display *display, char *options);
WL_EXPORT struct wlsc_compositor *
WL_EXPORT struct weston_compositor *
backend_init(struct wl_display *display, char *options)
{
int width = 1024, height = 640, fullscreen = 0, count = 1, i;
......
......@@ -28,7 +28,7 @@
#include "compositor.h"
void
wlsc_data_source_unref(struct wlsc_data_source *source)
weston_data_source_unref(struct weston_data_source *source)
{
source->refcount--;
if (source->refcount == 0)
......@@ -39,7 +39,7 @@ static void
data_offer_accept(struct wl_client *client, struct wl_resource *resource,
uint32_t time, const char *mime_type)
{
struct wlsc_data_source *source = resource->data;
struct weston_data_source *source = resource->data;
/* FIXME: Check that client is currently focused by the input
* device that is currently dragging this data source. Should
......@@ -53,7 +53,7 @@ static void
data_offer_receive(struct wl_client *client, struct wl_resource *resource,
const char *mime_type, int32_t fd)
{
struct wlsc_data_source *source = resource->data;
struct weston_data_source *source = resource->data;
wl_resource_post_event(&source->resource,
WL_DATA_SOURCE_SEND, mime_type, fd);
......@@ -63,15 +63,15 @@ data_offer_receive(struct wl_client *client, struct wl_resource *resource,
static void
data_offer_destroy(struct wl_client *client, struct wl_resource *resource)
{
wl_resource_destroy(resource, wlsc_compositor_get_time());
wl_resource_destroy(resource, weston_compositor_get_time());
}
static void
destroy_data_offer(struct wl_resource *resource)
{
struct wlsc_data_source *source = resource->data;
struct weston_data_source *source = resource->data;