mirror of
https://github.com/yawut/SDL.git
synced 2026-09-14 12:06:26 -05:00
Added SDL_SetWindowPosition() call to SDL_SetWindowShape(), going to see what this does on Windows.
This commit is contained in:
@@ -240,6 +240,7 @@ SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *sh
|
||||
result = window->display->device->shape_driver.SetWindowShape(window->shaper,shape,shapeMode);
|
||||
window->shaper->hasshape = SDL_TRUE;
|
||||
if((window->shaper->usershownflag & SDL_WINDOW_SHOWN) == SDL_WINDOW_SHOWN) {
|
||||
SDL_SetWindowPosition(window,window->x,window->y);
|
||||
SDL_ShowWindow(window);
|
||||
window->shaper->usershownflag &= !SDL_WINDOW_SHOWN;
|
||||
}
|
||||
|
||||
@@ -105,11 +105,11 @@ Win32_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShape
|
||||
/*
|
||||
* Set the new region mask for the window
|
||||
*/
|
||||
mask_region = CreatePolyPolygonRgn(polygons,polygonVertexNumbers,num_rects,WINDING);
|
||||
mask_region = CreatePolyPolygonRgn(polygons,polygonVertexNumbers,num_rects,WINDING);
|
||||
SetWindowRgn(((SDL_WindowData *)(shaper->window->driverdata))->hwnd, mask_region, TRUE);
|
||||
|
||||
SDL_free(polygons);
|
||||
SDL_free(polygonVertexNumbers);
|
||||
SDL_free(polygons);
|
||||
SDL_free(polygonVertexNumbers);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user