Stefan Dösinger : winex11: Do not cap the cursor size.
Alexandre Julliard
julliard at winehq.org
Thu Aug 21 10:02:46 CDT 2008
Module: wine
Branch: master
Commit: 08f4b87f96af7257d64a59488c0809679a439f80
URL: http://source.winehq.org/git/wine.git/?a=commit;h=08f4b87f96af7257d64a59488c0809679a439f80
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Fri Aug 8 16:01:51 2008 -0500
winex11: Do not cap the cursor size.
---
dlls/winex11.drv/mouse.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index d939bb0..5df71a7 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -408,8 +408,8 @@ void X11DRV_send_mouse_input( HWND hwnd, DWORD flags, DWORD x, DWORD y,
*/
static XcursorImage *create_cursor_image( CURSORICONINFO *ptr )
{
- int x, xmax;
- int y, ymax;
+ int x;
+ int y;
int and_size;
unsigned char *and_bits, *and_ptr, *xor_bits, *xor_ptr;
int and_width_bytes, xor_width_bytes;
@@ -417,10 +417,7 @@ static XcursorImage *create_cursor_image( CURSORICONINFO *ptr )
XcursorImage *image;
BOOL alpha_zero = TRUE;
- ymax = (ptr->nHeight > 32) ? 32 : ptr->nHeight;
- xmax = (ptr->nWidth > 32) ? 32 : ptr->nWidth;
-
- and_width_bytes = xmax / 8;
+ and_width_bytes = ptr->nWidth / 8;
xor_width_bytes = and_width_bytes * ptr->bBitsPerPixel;
and_size = ptr->nWidth * ptr->nHeight / 8;
@@ -428,7 +425,7 @@ static XcursorImage *create_cursor_image( CURSORICONINFO *ptr )
xor_ptr = xor_bits = and_ptr + and_size;
- image = pXcursorImageCreate( xmax, ymax );
+ image = pXcursorImageCreate( ptr->nWidth, ptr->nHeight );
pixel_ptr = image->pixels;
/* Generally 32 bit bitmaps have an alpha channel which is used in favor
@@ -447,10 +444,10 @@ static XcursorImage *create_cursor_image( CURSORICONINFO *ptr )
*/
if(ptr->bBitsPerPixel == 32)
{
- for (y = 0; alpha_zero && y < ymax; ++y)
+ for (y = 0; alpha_zero && y < ptr->nHeight; ++y)
{
xor_ptr = xor_bits + (y * xor_width_bytes);
- for (x = 0; x < xmax; ++x)
+ for (x = 0; x < ptr->nWidth; ++x)
{
if (xor_ptr[3] != 0x00)
{
@@ -476,12 +473,12 @@ static XcursorImage *create_cursor_image( CURSORICONINFO *ptr )
* the "xor" data to the alpha channel, and xor the color with either
* black or white.
*/
- for (y = 0; y < ymax; ++y)
+ for (y = 0; y < ptr->nHeight; ++y)
{
and_ptr = and_bits + (y * and_width_bytes);
xor_ptr = xor_bits + (y * xor_width_bytes);
- for (x = 0; x < xmax; ++x)
+ for (x = 0; x < ptr->nWidth; ++x)
{
/* Xcursor pixel data is in ARGB format, with A in the high byte */
switch (ptr->bBitsPerPixel)
More information about the wine-cvs
mailing list