comparison src/video/x11/SDL_x11shape.c @ 4851:5624fb0190b5

Changed flags and positioning (for the fake-hiding) as Andreas recommended.
author Eli Gottlieb <eligottlieb@gmail.com>
date Sun, 15 Aug 2010 18:52:57 -0400
parents 4f1573996a65
children
comparison
equal deleted inserted replaced
4850:14870d46ee2d 4851:5624fb0190b5
38 if (SDL_X11_HAVE_XSHAPE) { /* Make sure X server supports it. */ 38 if (SDL_X11_HAVE_XSHAPE) { /* Make sure X server supports it. */
39 result = malloc(sizeof(SDL_WindowShaper)); 39 result = malloc(sizeof(SDL_WindowShaper));
40 result->window = window; 40 result->window = window;
41 result->mode.mode = ShapeModeDefault; 41 result->mode.mode = ShapeModeDefault;
42 result->mode.parameters.binarizationCutoff = 1; 42 result->mode.parameters.binarizationCutoff = 1;
43 result->usershownflag = 0; 43 result->userx = result->usery = 0;
44 SDL_ShapeData* data = SDL_malloc(sizeof(SDL_ShapeData)); 44 SDL_ShapeData* data = SDL_malloc(sizeof(SDL_ShapeData));
45 result->driverdata = data; 45 result->driverdata = data;
46 data->bitmapsize = 0; 46 data->bitmapsize = 0;
47 data->bitmap = NULL; 47 data->bitmap = NULL;
48 window->shaper = result; 48 window->shaper = result;
73 return -1; 73 return -1;
74 } 74 }
75 } 75 }
76 memset(data->bitmap,0,data->bitmapsize); 76 memset(data->bitmap,0,data->bitmapsize);
77 77
78 window->shaper->usershownflag |= window->flags & SDL_WINDOW_SHOWN; 78 window->shaper->userx = window->x;
79 window->shaper->usery = window->y;
80 SDL_SetWindowPosition(window,-1000,-1000);
79 81
80 return 0; 82 return 0;
81 } 83 }
82 84
83 int 85 int