Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added SDL_SetWindowPosition() call to SDL_SetWindowShape(), going to …
Browse files Browse the repository at this point in the history
…see what this does on Windows.
  • Loading branch information
Eli Gottlieb committed Aug 12, 2010
1 parent 02c1b25 commit 4f50d12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/video/SDL_shape.c
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/video/win32/SDL_win32shape.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4f50d12

Please sign in to comment.