if (strcmp(interface, "drag_offer") != 0)
return;
- offer = wl_drag_offer_create(display_get_display(display), id);
+ offer = wl_drag_offer_create(display_get_display(display), id, 1);
dnd_offer = malloc(sizeof *dnd_offer);
if (dnd_offer == NULL)
struct wl_screenshooter **screenshooter = data;
if (strcmp(interface, "screenshooter") == 0)
- *screenshooter = wl_screenshooter_create(display, id);
+ *screenshooter = wl_screenshooter_create(display, id, 1);
}
int main(int argc, char *argv[])
struct display {
struct wl_display *display;
- struct wl_egl_display *native;
struct wl_compositor *compositor;
struct {
EGLDisplay dpy;
EGLint major, minor, n;
EGLBoolean ret;
- display->egl.dpy =
- eglGetDisplay(display->native);
+ display->egl.dpy = eglGetDisplay(display->display);
assert(display->egl.dpy);
ret = eglInitialize(display->egl.dpy, &major, &minor);
window->surface = wl_compositor_create_surface(display->compositor);
visual = wl_display_get_premultiplied_argb_visual(display->display);
window->native =
- wl_egl_window_create(display->native,
- window->surface,
+ wl_egl_window_create(window->surface,
window->geometry.width,
window->geometry.height,
visual);
struct display *d = data;
if (strcmp(interface, "compositor") == 0)
- d->compositor = wl_compositor_create(display, id);
+ d->compositor = wl_compositor_create(display, id, 1);
}
static int
wl_display_add_global_listener(display.display,
display_handle_global, &display);
- display.native = wl_egl_display_create(display.display);
-
init_egl(&display);
create_surface(&window);
init_gl(&window);
struct display {
struct wl_display *display;
- struct wl_egl_display *native_dpy;
struct wl_compositor *compositor;
struct wl_shell *shell;
struct wl_shm *shm;
visual = wl_display_get_premultiplied_argb_visual(display->display);
- data->window = wl_egl_window_create(display->native_dpy,
- surface,
+ data->window = wl_egl_window_create(surface,
rectangle->width,
rectangle->height,
visual);
data->display = display;
visual = wl_display_get_premultiplied_argb_visual(display->display);
- data->pixmap =wl_egl_pixmap_create(display->native_dpy,
- rectangle->width,
- rectangle->height,
- visual, 0);
+ data->pixmap = wl_egl_pixmap_create(rectangle->width,
+ rectangle->height,
+ visual, 0);
if (data->pixmap == NULL) {
free(data);
return NULL;
}
data->data.buffer =
- wl_egl_pixmap_create_buffer(display->native_dpy, data->pixmap);
+ wl_egl_pixmap_create_buffer(data->pixmap);
cairo_device_acquire(display->device);
glGenTextures(1, &data->texture);
memset(input, 0, sizeof *input);
input->display = d;
- input->input_device = wl_input_device_create(d->display, id);
+ input->input_device = wl_input_device_create(d->display, id, 1);
input->pointer_focus = NULL;
input->keyboard_focus = NULL;
wl_list_insert(d->input_list.prev, &input->link);
if (offer == NULL)
return;
- offer->offer = wl_selection_offer_create(d->display, id);
+ offer->offer = wl_selection_offer_create(d->display, id, 1);
offer->display = d;
wl_array_init(&offer->types);
offer->input = NULL;
struct display *d = data;
if (strcmp(interface, "compositor") == 0) {
- d->compositor = wl_compositor_create(display, id);
+ d->compositor = wl_compositor_create(display, id, 1);
} else if (strcmp(interface, "output") == 0) {
- d->output = wl_output_create(display, id);
+ d->output = wl_output_create(display, id, 1);
wl_output_add_listener(d->output, &output_listener, d);
} else if (strcmp(interface, "input_device") == 0) {
display_add_input(d, id);
} else if (strcmp(interface, "shell") == 0) {
- d->shell = wl_shell_create(display, id);
+ d->shell = wl_shell_create(display, id, 1);
wl_shell_add_listener(d->shell, &shell_listener, d);
} else if (strcmp(interface, "shm") == 0) {
- d->shm = wl_shm_create(display, id);
+ d->shm = wl_shm_create(display, id, 1);
} else if (strcmp(interface, "selection_offer") == 0) {
add_selection_offer(d, id);
} else if (d->global_handler) {
EGL_NONE
};
- d->dpy = eglGetDisplay(d->native_dpy);
+ d->dpy = eglGetDisplay(d->display);
if (!eglInitialize(d->dpy, &major, &minor)) {
fprintf(stderr, "failed to initialize display\n");
return -1;
wl_display_add_global_listener(d->display,
display_handle_global, d);
- d->native_dpy = wl_egl_display_create(d->display);
-
/* Process connection events. */
wl_display_iterate(d->display, WL_DISPLAY_READABLE);
struct {
struct wl_display *display;
- struct wl_egl_display *egl_display;
struct wl_compositor *compositor;
struct wl_shell *shell;
struct wl_output *output;
EGL_NONE
};
- c->base.display = eglGetDisplay(c->parent.egl_display);
+ c->base.display = eglGetDisplay(c->parent.display);
if (c->base.display == NULL) {
fprintf(stderr, "failed to create display\n");
return -1;
visual = wl_display_get_premultiplied_argb_visual(c->parent.display);
output->parent.egl_window =
- wl_egl_window_create(c->parent.egl_display,
- output->parent.surface,
+ wl_egl_window_create(output->parent.surface,
width, height, visual);
if (!output->parent.egl_window) {
fprintf(stderr, "failure to create wl_egl_window\n");
memset(input, 0, sizeof *input);
input->compositor = c;
- input->input_device = wl_input_device_create(c->parent.display, id);
+ input->input_device = wl_input_device_create(c->parent.display, id, 1);
wl_list_insert(c->input_list.prev, &input->link);
wl_input_device_add_listener(input->input_device,
struct wayland_compositor *c = data;
if (strcmp(interface, "compositor") == 0) {
- c->parent.compositor = wl_compositor_create(display, id);
+ c->parent.compositor = wl_compositor_create(display, id, 1);
} else if (strcmp(interface, "output") == 0) {
- c->parent.output = wl_output_create(display, id);
+ c->parent.output = wl_output_create(display, id, 1);
wl_output_add_listener(c->parent.output, &output_listener, c);
} else if (strcmp(interface, "input_device") == 0) {
display_add_input(c, id);
} else if (strcmp(interface, "shell") == 0) {
- c->parent.shell = wl_shell_create(display, id);
+ c->parent.shell = wl_shell_create(display, id, 1);
wl_shell_add_listener(c->parent.shell, &shell_listener, c);
}
}
}
wl_list_init(&c->input_list);
- c->parent.egl_display = wl_egl_display_create(c->parent.display);
wl_display_add_global_listener(c->parent.display,
display_handle_global, c);
}
static void
-wlsc_output_post_geometry(struct wl_client *client, struct wl_object *global)
+wlsc_output_post_geometry(struct wl_client *client,
+ struct wl_object *global, uint32_t version)
{
struct wlsc_output *output =
container_of(global, struct wlsc_output, object);