From f6801f794185bb37b9d568faae85cd3b8f9d3d0f Mon Sep 17 00:00:00 2001 From: egottlieb Date: Thu, 5 Aug 2010 01:03:24 -0400 Subject: [PATCH] Shaped windows for Cocoa build and testshape runs, but the actual shaping doesn't work. Something, however, is definitely happening, because we get the backgrounds drawn in two different colors. --- src/video/cocoa/SDL_cocoashape.m | 2 ++ src/video/x11/SDL_x11shape.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/cocoa/SDL_cocoashape.m b/src/video/cocoa/SDL_cocoashape.m index 7c6e74585..87720ea0a 100644 --- a/src/video/cocoa/SDL_cocoashape.m +++ b/src/video/cocoa/SDL_cocoashape.m @@ -20,6 +20,7 @@ eligottlieb@gmail.com */ +#include "SDL_assert.h" #include "SDL_stdinc.h" #include "SDL_cocoavideo.h" #include "SDL_shape.h" @@ -81,6 +82,7 @@ int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowS //NSRectFill([[((SDL_WindowData*)shaper->window->driverdata)->nswindow contentView] frame]); /* TODO: It looks like Cocoa can set a clipping path based on a list of rectangles. That's what we get from the Windoze shape-calculation code: a list of rectangles. This will work... I think. */ + data->shape = SDL_CalculateShapeTree(*shapeMode,shape,SDL_FALSE); NSBezierPath* clipPath = [NSBezierPath bezierPath]; SDL_PathConglomeration cong = {clipPath,shaper->window}; diff --git a/src/video/x11/SDL_x11shape.c b/src/video/x11/SDL_x11shape.c index d3714546d..3aec10ca3 100644 --- a/src/video/x11/SDL_x11shape.c +++ b/src/video/x11/SDL_x11shape.c @@ -21,7 +21,6 @@ */ #include "SDL_assert.h" -#include "SDL_malloc.h" #include "SDL_x11video.h" #include "SDL_x11shape.h" #include "SDL_x11window.h"