Bug 103012

Summary: Xwayland incorrectly converts simple cursors
Product: Wayland Reporter: Pierre Ossman <ossman>
Component: XWaylandAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: test case
[PATCH xserver] xwayland: Fix non-argb cursor conversion

Description Pierre Ossman 2017-09-27 15:14:03 UTC
Created attachment 134505 [details]
test case

Xwayland doesn't correctly convert non-argb cursor, resulting in a distorted cursor image. Attached test case demonstrates the effect using the browser.

The bug is this line in xwayland-cursor.c:

>    stride = (bits->width / 8 + 3) & ~3;

What happens if bits->width is less than 8? :)

Other parts seem to use BitmapBytePad(), so I would suggest that Xwayland is converted to do the same.
Comment 1 Pierre Ossman 2017-09-27 15:14:25 UTC
PS. no one seems to have added a Xwayland component, so I stuck this in "other" for now
Comment 2 Olivier Fourdan 2017-09-27 15:19:48 UTC
(In reply to Pierre Ossman from comment #1)
> PS. no one seems to have added a Xwayland component, so I stuck this in
> "other" for now
Moving to Wayland/Xwayland
Comment 3 Pierre Ossman 2017-09-27 15:22:14 UTC
I see. I figured it would be under xorg since it lives in the xserver tree. :)
Comment 4 Olivier Fourdan 2017-09-27 15:43:12 UTC
Created attachment 134508 [details] [review]
[PATCH xserver] xwayland: Fix non-argb cursor conversion

That seems to fix the issue, will send that to the ML.

PS: great test case!
Comment 5 Adam Jackson 2017-12-06 15:30:22 UTC
commit 97ac59b1ed3624f7c04e54dd3e3dadfa46a8f170 (origin/master, origin/HEAD, master)
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Wed Sep 27 18:01:01 2017 +0200

    xwayland: Fix non-argb cursor conversion

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.