Bug 6641 - xcb-demo/neko "mouse-shaped cursor" not rendered properly
Summary: xcb-demo/neko "mouse-shaped cursor" not rendered properly
Status: RESOLVED FIXED
Alias: None
Product: XCB
Classification: Unclassified
Component: Demos (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Jamey Sharp
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-18 13:26 UTC by Bart Massey
Modified: 2006-04-19 21:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
See if this patch fixes the problem. (1.13 KB, patch)
2006-04-19 07:50 UTC, Ian Osgood
Details | Splinter Review

Description Bart Massey 2006-04-18 13:26:25 UTC
The "mouse-shaped cursor" that the xcb-demo/neko kitty follows around the window
isn't rendered properly.  There is a rumor that iano thinks that this is a bug
in XCB's XY-format pixmap handling...
Comment 1 Jamey Sharp 2006-04-18 15:08:36 UTC
I think it's a bug in the XCBImage library's XY-pixmap handling too. But the
cause sure isn't obvious to me.
Comment 2 Bart Massey 2006-04-18 16:13:08 UTC
See also bug #5958, "XCBImage with XYPixmap format does not work"
Comment 3 Ian Osgood 2006-04-19 06:43:28 UTC
Is this on Intel Linux or Sparc Solaris?  For this bug, the server's bitmap unit, bit order, and byte order 
should be reported.

In my experience, the cursor (bitmap format 1Ll) works on PPC Mac servers (4Mm) and is corrupt on 
Intel Linux servers (4Ll). Xlib's XPutImage has a 12x12 array of bitmap converters to handle all 
permutations of client-side to server-side bitmap formats. I only implemented the one I could test (1Ll-
>4Mm). From inspection, it looked like the 1Ll->4Ll conversion was a no-op, but maybe I was wrong.

For reference, the xlib functions I refactored, merged, and inlined are XCreatePixmapFromBitmapData 
(for the neko bitmaps) and XCreateBitmapFromData (for the cursor and mask).

Notably, the neko bitmaps themselves (which are also 1Ll bitmaps) seem to work fine!

(BTW, these and other deficiencies are noted in the xcbneko README file.)

Also, to be clear, xcbneko does not use the XCBImage convenience library, partly because of its 
advertised lack of XYPixmap support.
Comment 4 Ian Osgood 2006-04-19 07:50:52 UTC
Created attachment 5367 [details] [review]
See if this patch fixes the problem.

Indeed, I think my inspection was wrong; I need to adjust for scanline padding.
 This shows up for the 
cursor because, unlike the other bitmaps, it is only 17 pixels (3 bytes) wide.
Comment 5 Ian Osgood 2006-04-20 14:33:57 UTC
It works! Committed.


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.