[gtk+] wayland: Track wayland API changes
- From: Kristian Høgsberg <krh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Track wayland API changes
- Date: Sun, 8 May 2011 17:23:55 +0000 (UTC)
commit 2ebdcf5f37a6be9e3e7e893a0eaa6f8fc1e5943e
Author: Kristian Høgsberg <krh bitplanet net>
Date: Sun May 8 13:19:54 2011 -0400
wayland: Track wayland API changes
gdk/wayland/gdkdisplay-wayland.c | 32 +++++++++++++-------------------
gdk/wayland/gdkdisplay-wayland.h | 1 -
gdk/wayland/gdkwindow-wayland.c | 7 ++-----
3 files changed, 15 insertions(+), 25 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index cb447d6..a75654d 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -145,20 +145,20 @@ gdk_display_handle_global(struct wl_display *display, uint32_t id,
GdkDisplay *gdk_display = GDK_DISPLAY_OBJECT (data);
struct wl_input_device *input;
- if (strcmp(interface, "compositor") == 0) {
- display_wayland->compositor = wl_compositor_create(display, id);
- } else if (strcmp(interface, "shm") == 0) {
- display_wayland->shm = wl_shm_create(display, id);
- } else if (strcmp(interface, "shell") == 0) {
- display_wayland->shell = wl_shell_create(display, id);
+ if (strcmp(interface, "wl_compositor") == 0) {
+ display_wayland->compositor = wl_compositor_create(display, id, 1);
+ } else if (strcmp(interface, "wl_shm") == 0) {
+ display_wayland->shm = wl_shm_create(display, id, 1);
+ } else if (strcmp(interface, "wl_shell") == 0) {
+ display_wayland->shell = wl_shell_create(display, id, 1);
wl_shell_add_listener(display_wayland->shell,
&shell_listener, display_wayland);
- } else if (strcmp(interface, "output") == 0) {
- display_wayland->output = wl_output_create(display, id);
+ } else if (strcmp(interface, "wl_output") == 0) {
+ display_wayland->output = wl_output_create(display, id, 1);
wl_output_add_listener(display_wayland->output,
&output_listener, display_wayland);
- } else if (strcmp(interface, "input_device") == 0) {
- input = wl_input_device_create(display, id);
+ } else if (strcmp(interface, "wl_input_device") == 0) {
+ input = wl_input_device_create(display, id, 1);
_gdk_wayland_device_manager_add_device (gdk_display->device_manager,
input);
}
@@ -179,7 +179,7 @@ gdk_display_init_egl(GdkDisplay *display)
};
display_wayland->egl_display =
- eglGetDisplay(display_wayland->native_display);
+ eglGetDisplay(display_wayland->wl_display);
if (!eglInitialize(display_wayland->egl_display, &major, &minor)) {
fprintf(stderr, "failed to initialize display\n");
return FALSE;
@@ -236,12 +236,6 @@ _gdk_wayland_display_open (const gchar *display_name)
display_wayland->wl_display = wl_display;
- display_wayland->native_display = wl_egl_display_create(wl_display);
- if (display_wayland->native_display == NULL) {
- wl_display_destroy(wl_display);
- return NULL;
- }
-
display_wayland->screen = _gdk_wayland_screen_new (display);
display->device_manager = _gdk_wayland_device_manager_new (display);
@@ -252,7 +246,8 @@ _gdk_wayland_display_open (const gchar *display_name)
gdk_display_init_egl(display);
- display_wayland->event_source = _gdk_wayland_display_event_source_new (display);
+ display_wayland->event_source =
+ _gdk_wayland_display_event_source_new (display);
gdk_input_init (display);
@@ -282,7 +277,6 @@ gdk_wayland_display_dispose (GObject *object)
}
eglTerminate(display_wayland->egl_display);
- wl_egl_display_destroy(display_wayland->native_display);
G_OBJECT_CLASS (_gdk_display_wayland_parent_class)->dispose (object);
}
diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h
index 87be6bb..88756af 100644
--- a/gdk/wayland/gdkdisplay-wayland.h
+++ b/gdk/wayland/gdkdisplay-wayland.h
@@ -71,7 +71,6 @@ struct _GdkDisplayWayland
/* Wayland fields below */
struct wl_display *wl_display;
- struct wl_egl_display *native_display;
struct wl_compositor *compositor;
struct wl_shm *shm;
struct wl_shell *shell;
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 2fbcab9..c19b3c5 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -306,8 +306,6 @@ typedef struct _GdkWaylandCairoSurfaceData {
static void
gdk_wayland_window_attach_image (GdkWindow *window)
{
- GdkDisplayWayland *display =
- GDK_DISPLAY_WAYLAND (gdk_window_get_display (window));
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkWaylandCairoSurfaceData *data;
int32_t server_width, server_height, dx, dy;
@@ -337,7 +335,7 @@ gdk_wayland_window_attach_image (GdkWindow *window)
&gdk_wayland_cairo_key);
if (!data->buffer)
data->buffer =
- wl_egl_pixmap_create_buffer(display->native_display, data->pixmap);
+ wl_egl_pixmap_create_buffer(data->pixmap);
if (impl->resize_edges & WL_SHELL_RESIZE_LEFT)
dx = server_width - data->width;
@@ -397,8 +395,7 @@ gdk_wayland_create_cairo_surface (GdkDisplayWayland *display,
visual = wl_display_get_premultiplied_argb_visual(display->wl_display);
data->width = width;
data->height = height;
- data->pixmap =
- wl_egl_pixmap_create(display->native_display, width, height, visual, 0);
+ data->pixmap = wl_egl_pixmap_create(width, height, visual, 0);
data->image =
display->create_image(display->egl_display, NULL, EGL_NATIVE_PIXMAP_KHR,
(EGLClientBuffer) data->pixmap, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]