diff --git a/TODO b/TODO index 49fe190d..7c588988 100644 --- a/TODO +++ b/TODO @@ -3,6 +3,11 @@ Core wayland protocol - generate pointer_focus (and drag focus) on raise/lower, move windows, all kinds of changes in surface stacking. + - make a client side circular buffer of pending ping requests with + callbacks and data. if buffer fills up, just iterate until an + entry becomes available. wl_display_ping(dpy, func, data), basically. + func is called when the reply comes in for the ping request. + - glyph cache - dnd, figure out large object transfer: through wayland protocol or diff --git a/clients/gears.c b/clients/gears.c index 7d97e23b..0426f20c 100644 --- a/clients/gears.c +++ b/clients/gears.c @@ -249,9 +249,9 @@ resize_window(struct gears *gears) EGLint attribs[] = { EGL_WIDTH, 0, EGL_HEIGHT, 0, - EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, - EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SHARE_MESA | - EGL_IMAGE_USE_SCANOUT_MESA, + EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, + EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SHARE_MESA | + EGL_DRM_BUFFER_USE_SCANOUT_MESA, EGL_NONE }; diff --git a/clients/window.c b/clients/window.c index a56bcfae..2b88e092 100644 --- a/clients/window.c +++ b/clients/window.c @@ -246,8 +246,8 @@ display_create_surface(struct display *display, EGLint image_attribs[] = { EGL_WIDTH, 0, EGL_HEIGHT, 0, - EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, - EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA, + EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, + EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA, EGL_NONE }; diff --git a/compositor-drm.c b/compositor-drm.c index b054bc66..57802d3c 100644 --- a/compositor-drm.c +++ b/compositor-drm.c @@ -377,8 +377,8 @@ create_output_for_connector(struct drm_compositor *ec, EGLint handle, stride, attribs[] = { EGL_WIDTH, 0, EGL_HEIGHT, 0, - EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, - EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA, + EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, + EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA, EGL_NONE }; diff --git a/compositor-x11.c b/compositor-x11.c index f310d9cb..1aa45d91 100644 --- a/compositor-x11.c +++ b/compositor-x11.c @@ -334,8 +334,8 @@ x11_compositor_create_output(struct x11_compositor *c, int width, int height) EGLint attribs[] = { EGL_WIDTH, 0, EGL_HEIGHT, 0, - EGL_IMAGE_STRIDE_MESA, 0, - EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, + EGL_DRM_BUFFER_STRIDE_MESA, 0, + EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, EGL_NONE }; @@ -413,7 +413,7 @@ x11_compositor_create_output(struct x11_compositor *c, int width, int height) attribs[5] = buffers[0].pitch / 4; output->image = eglCreateImageKHR(c->base.display, c->base.context, - EGL_DRM_IMAGE_MESA, + EGL_DRM_BUFFER_MESA, (EGLClientBuffer) buffers[0].name, attribs); free(reply); diff --git a/compositor.c b/compositor.c index 9c5ee9b7..2155d423 100644 --- a/compositor.c +++ b/compositor.c @@ -224,8 +224,8 @@ create_pointer_images(struct wlsc_compositor *ec) EGLint image_attribs[] = { EGL_WIDTH, 0, EGL_HEIGHT, 0, - EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, - EGL_IMAGE_USE_MESA, EGL_IMAGE_USE_SCANOUT_MESA, + EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, + EGL_DRM_BUFFER_USE_MESA, EGL_DRM_BUFFER_USE_SCANOUT_MESA, EGL_NONE }; @@ -1041,7 +1041,11 @@ wl_drag_reset(struct wl_drag *drag) wl_array_init(&drag->types); drag->source = NULL; - drag->target = NULL; + + /* FIXME: We need to reset drag->target too, but can't right + * now because we need it for send/drop. + * + * drag->target = NULL; */ drag->time = 0; drag->pointer_focus = NULL; } @@ -1134,7 +1138,8 @@ static void drag_send(struct wl_client *client, struct wl_drag *drag, struct wl_array *contents) { - wl_client_post_event(client, &drag->base, WL_DRAG_DROP, contents); + wl_client_post_event(drag->target, + &drag->base, WL_DRAG_DROP, contents); } static void diff --git a/drm.c b/drm.c index b4e24017..d10e20b8 100644 --- a/drm.c +++ b/drm.c @@ -74,8 +74,8 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm_base, EGLint attribs[] = { EGL_WIDTH, 0, EGL_HEIGHT, 0, - EGL_IMAGE_STRIDE_MESA, 0, - EGL_IMAGE_FORMAT_MESA, EGL_IMAGE_FORMAT_ARGB8888_MESA, + EGL_DRM_BUFFER_STRIDE_MESA, 0, + EGL_DRM_BUFFER_FORMAT_MESA, EGL_DRM_BUFFER_FORMAT_ARGB32_MESA, EGL_NONE }; @@ -108,7 +108,7 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm_base, buffer->visual = visual; buffer->image = eglCreateImageKHR(compositor->display, compositor->context, - EGL_DRM_IMAGE_MESA, + EGL_DRM_BUFFER_MESA, (EGLClientBuffer) name, attribs); if (buffer->image == NULL) { /* FIXME: Define a real exception event instead of