forked from 12to11/12to11
Resolve some TODOs
* 12to11.c (PickVisual): Remove redundant TODOs. * dmabuf.c (CreateHeader): Handle flags like wlroots. * dnd.c (HandleXdndPositionEvent): * subsurface.c: * xdg_surface.c (CurrentRootPosition, XLGetXdgSurface): Remove outdated TODOs.
This commit is contained in:
parent
424ab2966f
commit
007ba43dba
5 changed files with 20 additions and 13 deletions
1
12to11.c
1
12to11.c
|
@ -46,7 +46,6 @@ PickVisual (int *depth)
|
||||||
|
|
||||||
if (n_visuals)
|
if (n_visuals)
|
||||||
{
|
{
|
||||||
/* TODO: verify visual format. */
|
|
||||||
selection = visuals[0].visual;
|
selection = visuals[0].visual;
|
||||||
*depth = visuals[0].depth;
|
*depth = visuals[0].depth;
|
||||||
XFree (visuals);
|
XFree (visuals);
|
||||||
|
|
22
dmabuf.c
22
dmabuf.c
|
@ -684,7 +684,7 @@ XLHandleOneXEventForDmabuf (XEvent *event)
|
||||||
#define CreateHeader \
|
#define CreateHeader \
|
||||||
BufferParams *params; \
|
BufferParams *params; \
|
||||||
int num_buffers, i, depth, bpp; \
|
int num_buffers, i, depth, bpp; \
|
||||||
uint32_t mod_high, mod_low; \
|
uint32_t mod_high, mod_low, all_flags; \
|
||||||
int32_t *allfds; \
|
int32_t *allfds; \
|
||||||
\
|
\
|
||||||
params = wl_resource_get_user_data (resource); \
|
params = wl_resource_get_user_data (resource); \
|
||||||
|
@ -752,7 +752,25 @@ XLHandleOneXEventForDmabuf (XEvent *event)
|
||||||
goto inert_error; \
|
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 \
|
/* Copy the file descriptors into a buffer. At this point, we know \
|
||||||
there are no gaps in params->entries. */ \
|
there are no gaps in params->entries. */ \
|
||||||
|
|
3
dnd.c
3
dnd.c
|
@ -990,8 +990,6 @@ HandleXdndPositionEvent (Surface *surface, XEvent *event)
|
||||||
uint32_t action;
|
uint32_t action;
|
||||||
Bool sent_actions;
|
Bool sent_actions;
|
||||||
|
|
||||||
/* TODO: handle subsurfaces. */
|
|
||||||
|
|
||||||
if (event->xclient.data.l[0] != dnd_state.source_window)
|
if (event->xclient.data.l[0] != dnd_state.source_window)
|
||||||
/* The message is coming from the wrong window, or drag and drop
|
/* The message is coming from the wrong window, or drag and drop
|
||||||
has not yet been set up. */
|
has not yet been set up. */
|
||||||
|
@ -1011,7 +1009,6 @@ HandleXdndPositionEvent (Surface *surface, XEvent *event)
|
||||||
XLWindowFromSurface (surface),
|
XLWindowFromSurface (surface),
|
||||||
root_x, root_y, &x, &y, &child);
|
root_x, root_y, &x, &y, &child);
|
||||||
|
|
||||||
/* Compute the action. TODO: handle multiple actions. */
|
|
||||||
action = TranslateAction (event->xclient.data.l[4]);
|
action = TranslateAction (event->xclient.data.l[4]);
|
||||||
|
|
||||||
/* Handle mouse motion. */
|
/* Handle mouse motion. */
|
||||||
|
|
|
@ -22,8 +22,6 @@ along with 12to11. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include "compositor.h"
|
#include "compositor.h"
|
||||||
|
|
||||||
/* TODO: handle unmapping nested subsurfaces. */
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PendingPosition = 1,
|
PendingPosition = 1,
|
||||||
|
|
|
@ -1049,8 +1049,6 @@ CurrentRootPosition (XdgRole *role, int *root_x, int *root_y)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: handle root position changing in quick succession and avoid
|
|
||||||
call to XTranslateCoordinates. */
|
|
||||||
XTranslateCoordinates (compositor.display, role->window,
|
XTranslateCoordinates (compositor.display, role->window,
|
||||||
DefaultRootWindow (compositor.display),
|
DefaultRootWindow (compositor.display),
|
||||||
0, 0, root_x, root_y, &child_return);
|
0, 0, root_x, root_y, &child_return);
|
||||||
|
@ -1285,9 +1283,6 @@ XLGetXdgSurface (struct wl_client *client, struct wl_resource *resource,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: post more errors if the surface is not in a valid
|
|
||||||
state. */
|
|
||||||
|
|
||||||
role = XLSafeMalloc (sizeof *role);
|
role = XLSafeMalloc (sizeof *role);
|
||||||
|
|
||||||
if (!role)
|
if (!role)
|
||||||
|
|
Loading…
Add table
Reference in a new issue