Bug 103012 - Xwayland incorrectly converts simple cursors
Summary: Xwayland incorrectly converts simple cursors
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: XWayland (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Wayland bug list
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-27 15:14 UTC by Pierre Ossman
Modified: 2017-12-06 15:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test case (747 bytes, text/html)
2017-09-27 15:14 UTC, Pierre Ossman
Details
[PATCH xserver] xwayland: Fix non-argb cursor conversion (1.05 KB, patch)
2017-09-27 15:43 UTC, Olivier Fourdan
Details | Splinter Review

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.