diff --git a/12to11.c b/12to11.c index f7fb456..034cd08 100644 --- a/12to11.c +++ b/12to11.c @@ -46,7 +46,6 @@ PickVisual (int *depth) if (n_visuals) { - /* TODO: verify visual format. */ selection = visuals[0].visual; *depth = visuals[0].depth; XFree (visuals); diff --git a/dmabuf.c b/dmabuf.c index 3921cb0..7b3878d 100644 --- a/dmabuf.c +++ b/dmabuf.c @@ -684,7 +684,7 @@ XLHandleOneXEventForDmabuf (XEvent *event) #define CreateHeader \ BufferParams *params; \ int num_buffers, i, depth, bpp; \ - uint32_t mod_high, mod_low; \ + uint32_t mod_high, mod_low, all_flags; \ int32_t *allfds; \ \ params = wl_resource_get_user_data (resource); \ @@ -752,7 +752,25 @@ XLHandleOneXEventForDmabuf (XEvent *event) goto inert_error; \ } \ \ - /* TODO: handle flags. */ \ + all_flags = (ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT \ + | ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_INTERLACED \ + | ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST); \ + \ + if (flags & ~all_flags) \ + { \ + wl_resource_post_error (resource, \ + ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT, \ + "invalid dmabuf flags: %u", flags); \ + goto inert_error; \ + } \ + \ + if (flags) \ + { \ + /* Flags are not supported by wlroots, so I guess we don't have \ + to either. */ \ + zwp_linux_buffer_params_v1_send_failed (resource); \ + goto inert_error; \ + } \ \ /* Copy the file descriptors into a buffer. At this point, we know \ there are no gaps in params->entries. */ \ diff --git a/dnd.c b/dnd.c index 5045952..c2c7e88 100644 --- a/dnd.c +++ b/dnd.c @@ -990,8 +990,6 @@ HandleXdndPositionEvent (Surface *surface, XEvent *event) uint32_t action; Bool sent_actions; - /* TODO: handle subsurfaces. */ - if (event->xclient.data.l[0] != dnd_state.source_window) /* The message is coming from the wrong window, or drag and drop has not yet been set up. */ @@ -1011,7 +1009,6 @@ HandleXdndPositionEvent (Surface *surface, XEvent *event) XLWindowFromSurface (surface), root_x, root_y, &x, &y, &child); - /* Compute the action. TODO: handle multiple actions. */ action = TranslateAction (event->xclient.data.l[4]); /* Handle mouse motion. */ diff --git a/subsurface.c b/subsurface.c index 54f66e4..1c4cebb 100644 --- a/subsurface.c +++ b/subsurface.c @@ -22,8 +22,6 @@ along with 12to11. If not, see . */ #include "compositor.h" -/* TODO: handle unmapping nested subsurfaces. */ - enum { PendingPosition = 1, diff --git a/xdg_surface.c b/xdg_surface.c index c5218d8..bde2169 100644 --- a/xdg_surface.c +++ b/xdg_surface.c @@ -1049,8 +1049,6 @@ CurrentRootPosition (XdgRole *role, int *root_x, int *root_y) return; } - /* TODO: handle root position changing in quick succession and avoid - call to XTranslateCoordinates. */ XTranslateCoordinates (compositor.display, role->window, DefaultRootWindow (compositor.display), 0, 0, root_x, root_y, &child_return); @@ -1285,9 +1283,6 @@ XLGetXdgSurface (struct wl_client *client, struct wl_resource *resource, return; } - /* TODO: post more errors if the surface is not in a valid - state. */ - role = XLSafeMalloc (sizeof *role); if (!role)