comparison src/video/win32/SDL_win32shape.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 14870d46ee2d
children c19c729eb201
comparison
equal deleted inserted replaced
4850:14870d46ee2d 4851:5624fb0190b5
30 int resized_properly; 30 int resized_properly;
31 SDL_WindowShaper* result = (SDL_WindowShaper *)SDL_malloc(sizeof(SDL_WindowShaper)); 31 SDL_WindowShaper* result = (SDL_WindowShaper *)SDL_malloc(sizeof(SDL_WindowShaper));
32 result->window = window; 32 result->window = window;
33 result->mode.mode = ShapeModeDefault; 33 result->mode.mode = ShapeModeDefault;
34 result->mode.parameters.binarizationCutoff = 1; 34 result->mode.parameters.binarizationCutoff = 1;
35 result->usershownflag = 0; 35 result->userx = result->usery = 0;
36 result->driverdata = (SDL_ShapeData*)SDL_malloc(sizeof(SDL_ShapeData)); 36 result->driverdata = (SDL_ShapeData*)SDL_malloc(sizeof(SDL_ShapeData));
37 ((SDL_ShapeData*)result->driverdata)->mask_tree = NULL; 37 ((SDL_ShapeData*)result->driverdata)->mask_tree = NULL;
38 //Put some driver-data here. 38 //Put some driver-data here.
39 window->shaper = result; 39 window->shaper = result;
40 resized_properly = Win32_ResizeWindowShape(window); 40 resized_properly = Win32_ResizeWindowShape(window);
99 return -1; 99 return -1;
100 100
101 if(data->mask_tree != NULL) 101 if(data->mask_tree != NULL)
102 SDL_FreeShapeTree(&data->mask_tree); 102 SDL_FreeShapeTree(&data->mask_tree);
103 103
104 window->shaper->usershownflag |= window->flags & SDL_WINDOW_SHOWN; 104 window->shaper->userx = window->x;
105 window->shaper->usery = window->y;
106 SDL_SetWindowPosition(window,-1000,-1000);
105 107
106 return 0; 108 return 0;
107 } 109 }