static bool move(struct view * view, int32_t x, int32_t y) { struct cursor_plane * plane = CONTAINER_OF(view, typeof(*plane), view); if (drmModeMoveCursor(swc.drm->fd, plane->crtc, x - plane->origin->x, y - plane->origin->y) != 0) { ERROR("Could not move cursor: %s\n", strerror(errno)); return false; } view_set_position(view, x, y); return true; }
static bool move(struct view * view, int32_t x, int32_t y) { struct cursor_plane * plane = wl_container_of(view, plane, view); if (swc.active && drmModeMoveCursor(swc.drm->fd, plane->crtc, x - plane->origin->x, y - plane->origin->y) != 0) { ERROR("Could not move cursor: %s\n", strerror(errno)); return false; } view_set_position(view, x, y); return true; }