summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-04-21 11:50:02 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-02-28 08:31:49 +0100
commit05e340da8140bf74f4a2c6106472e50baea94f25 (patch)
tree6c8f214bd9389843dac1b135d8315be930c2d1de
parentbbfe3a731191e5c18a0f3abb0f89620920ad54a4 (diff)
wayland: Update to wayland protocol and egl changes
-rw-r--r--src/video/wayland/SDL_waylandevents.c2
-rw-r--r--src/video/wayland/SDL_waylandopengl.c2
-rw-r--r--src/video/wayland/SDL_waylandvideo.c18
-rw-r--r--src/video/wayland/SDL_waylandvideo.h1
-rw-r--r--src/video/wayland/SDL_waylandwindow.c2
5 files changed, 12 insertions, 13 deletions
diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c
index 5f078375..a0ac6349 100644
--- a/src/video/wayland/SDL_waylandevents.c
+++ b/src/video/wayland/SDL_waylandevents.c
@@ -280,7 +280,7 @@ Wayland_display_add_input(SDL_WaylandData *d, uint32_t id)
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;
diff --git a/src/video/wayland/SDL_waylandopengl.c b/src/video/wayland/SDL_waylandopengl.c
index 4919701d..b6b7199f 100644
--- a/src/video/wayland/SDL_waylandopengl.c
+++ b/src/video/wayland/SDL_waylandopengl.c
@@ -61,7 +61,7 @@ Wayland_GL_LoadLibrary(_THIS, const char *path)
config_attribs[ 9] = _this->gl_config.depth_size;
config_attribs[11] = _this->gl_config.alpha_size;
- data->edpy = eglGetDisplay(data->egl_display);
+ data->edpy = eglGetDisplay(data->display);
if (!eglInitialize(data->edpy, &major, &minor)) {
SDL_SetError("failed to initialize display\n");
diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c
index c132d85a..4ecaadcd 100644
--- a/src/video/wayland/SDL_waylandvideo.c
+++ b/src/video/wayland/SDL_waylandvideo.c
@@ -146,21 +146,22 @@ display_handle_global(struct wl_display *display, uint32_t id,
{
SDL_WaylandData *d = data;
- if (strcmp(interface, "compositor") == 0) {
- d->compositor = wl_compositor_create(display, id);
- } else if (strcmp(interface, "output") == 0) {
- d->output = wl_output_create(display, id);
+ if (strcmp(interface, "wl_compositor") == 0) {
+ d->compositor = wl_compositor_create(display, id, 1);
+ } else if (strcmp(interface, "wl_output") == 0) {
+ d->output = wl_output_create(display, id, 1);
wl_output_add_listener(d->output, &output_listener, d);
- } else if (strcmp(interface, "input_device") == 0) {
+ } else if (strcmp(interface, "wl_input_device") == 0) {
Wayland_display_add_input(d, id);
- } else if (strcmp(interface, "shell") == 0) {
- d->shell = wl_shell_create(display, id);
+ } else if (strcmp(interface, "wl_shell") == 0) {
+ d->shell = wl_shell_create(display, id, 1);
wl_shell_add_listener(d->shell, &shell_listener, d);
}
}
-static int update_event_mask(uint32_t mask, void *data)
+static int
+update_event_mask(uint32_t mask, void *data)
{
SDL_WaylandData *d = data;
@@ -191,7 +192,6 @@ Wayland_VideoInit(_THIS)
SDL_SetError("Failed to connecto to a Wayland display.");
return 0;
}
- data->egl_display = wl_egl_display_create(data->display);
wl_display_add_global_listener(data->display,
display_handle_global, data);
diff --git a/src/video/wayland/SDL_waylandvideo.h b/src/video/wayland/SDL_waylandvideo.h
index 77f47679..ad17bcfc 100644
--- a/src/video/wayland/SDL_waylandvideo.h
+++ b/src/video/wayland/SDL_waylandvideo.h
@@ -38,7 +38,6 @@
typedef struct
{
struct wl_display *display;
- struct wl_egl_display *egl_display;
struct wl_compositor *compositor;
struct wl_output *output;
struct wl_shell *shell;
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index eecd7461..c27a7050 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -79,7 +79,7 @@ int Wayland_CreateWindow(_THIS, SDL_Window * window)
visual = wl_display_get_rgb_visual(c->display);
else
visual = wl_display_get_premultiplied_argb_visual(c->display);
- data->egl_window = wl_egl_window_create(c->egl_display, data->surface,
+ data->egl_window = wl_egl_window_create(data->surface,
window->w, window->h, visual);
data->esurf =
eglCreateWindowSurface(c->edpy, c->econf,