Module: wine Branch: master Commit: cdf88e9c2900a791883cbd08a697f3513db5e537 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cdf88e9c2900a791883cbd08a6...
Author: Andrew Riedi andrewriedi@gmail.com Date: Wed Dec 24 14:35:39 2008 -0800
winex11.drv: Calculate the cursor bitmap offsets in a way consistent with user32.
---
dlls/winex11.drv/mouse.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index b79f149..728a8cd 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -436,10 +436,10 @@ static XcursorImage *create_cursor_image( CURSORICONINFO *ptr ) unsigned char tmp; BOOL alpha_zero = TRUE;
- and_width_bytes = ptr->nWidth / 8; - xor_width_bytes = and_width_bytes * ptr->bBitsPerPixel; + and_width_bytes = 2 * ((ptr->nWidth+15) / 16); + xor_width_bytes = ptr->nWidthBytes;
- and_size = ptr->nWidth * ptr->nHeight / 8; + and_size = ptr->nHeight * and_width_bytes; and_ptr = and_bits = (unsigned char *)(ptr + 1);
xor_ptr = xor_bits = and_ptr + and_size;