No good can come of this... the cursor plane's constraints are too
heavy to make bothering with this worthwhile.

To see the bug this fixes, set your output scale to 2 and then
launch weston-scaler -s and perform an action that makes the cursor
disappear (such as typing in a weston terminal the cursor is over
top of).

The problem is that we don't implement cropping in the copy to the
cursor bo, and the cursor plane can't scale.  So viewport features
are unimplemented or unimplementable for cursor planes.

Signed-off-by: Derek Foreman <der...@osg.samsung.com>
---

Changes from v1:
Simplify the check to just testing widths for -1

 libweston/compositor-drm.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 8319d7c..8b62c20 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -1142,6 +1142,15 @@ drm_output_prepare_cursor_view(struct drm_output *output,
                return NULL;
        if (viewport->buffer.scale != output->base.current_scale)
                return NULL;
+       /* If either of the viewport widths are not -1 then we're
+        * using a viewport.  currently cursor_bo_update doesn't
+        * handle crops, and cursor planes don't handle scale,
+        * so don't put a viewported surface into a cursor plane.
+        */
+       if (wl_fixed_to_int(viewport->buffer.src_width) != -1)
+               return NULL;
+       if (viewport->surface.width != -1)
+               return NULL;
        if (output->cursor_view)
                return NULL;
        if (ev->output_mask != (1u << output->base.id))
-- 
2.9.3

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to