diff src/video/x11/SDL_x11shape.c @ 4817:c68e7490e4cf

Fixed a couple of bugs in the general and X11 shape code, and fixed a bug in testshape that was keeping it from recognizing surfaces without alpha. Thanks to Andreas's bit-bashing tip, X11 shaped windows now work entirely, AFAICT.
author Eli Gottlieb <eligottlieb@gmail.com>
date Sun, 01 Aug 2010 21:10:42 -0400
parents 329708ffe2a7
children 0c82f20327ec 1f9915666afd
line wrap: on
line diff
--- a/src/video/x11/SDL_x11shape.c	Fri Jul 30 18:04:21 2010 -0400
+++ b/src/video/x11/SDL_x11shape.c	Sun Aug 01 21:10:42 2010 -0400
@@ -70,8 +70,7 @@
 			return -1;
 		}
 	}
-	else
-		memset(data->bitmap,0,data->bitmapsize);
+	memset(data->bitmap,0,data->bitmapsize);
 	
 	window->shaper->usershownflag |= window->flags & SDL_WINDOW_SHOWN;
 	
@@ -90,7 +89,7 @@
 	SDL_ShapeData *data = shaper->driverdata;
 	
 	/* Assume that shaper->alphacutoff already has a value, because SDL_SetWindowShape() should have given it one. */
-	SDL_CalculateShapeBitmap(shaper->mode,shape,data->bitmap,8,1);
+	SDL_CalculateShapeBitmap(shaper->mode,shape,data->bitmap,8);
 		
 	SDL_WindowData *windowdata = (SDL_WindowData*)(shaper->window->driverdata);
 	Pixmap shapemask = XCreateBitmapFromData(windowdata->videodata->display,windowdata->xwindow,data->bitmap,shaper->window->w,shaper->window->h);