Skip to content

Commit

Permalink
Sync SDL3 header -> wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
SDLWikiBot committed Oct 14, 2024
1 parent 26635b8 commit 310b50c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SDL3/SDL_SetWindowShape.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ bool SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape);
This sets the alpha channel of a transparent window and any fully
transparent areas are also transparent to mouse clicks. If you are using
something besides the SDL render API, then you are responsible for setting
the alpha channel of the window yourself.
something besides the SDL render API, then you are responsible for drawing
the alpha channel of the window to match the shape alpha channel to get
consistent cross-platform results.
The shape is copied inside this function, so you can free it afterwards. If
your shape surface changes, you should call
[SDL_SetWindowShape](SDL_SetWindowShape)() again to update the window.
[SDL_SetWindowShape](SDL_SetWindowShape)() again to update the window. This
is an expensive operation, so should be done sparingly.
The window must have been created with the
[SDL_WINDOW_TRANSPARENT](SDL_WINDOW_TRANSPARENT) flag.
Expand Down

0 comments on commit 310b50c

Please sign in to comment.