We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4473

Summary: shaped window how to reset window shape without window resizing
Product: SDL Reporter: Aleksey.Ozhigov <AlexBurnes>
Component: videoAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: 2.0.8   
Hardware: x86_64   
OS: Linux   
Attachments: patch add SDL_ResetWindowShape function

Description Aleksey.Ozhigov 2019-01-26 15:06:53 UTC
Created attachment 3585 [details]
patch add SDL_ResetWindowShape function

For shaped window created by SDL_CreateShapedWindow the SDL_SetWindowShape function combined previous assigned shape with new. But I need reset assigned shape and set new. The only way I can do this is call SDL_SetWindowSize which clear bitmask of a shaper in a driver ResizeShape function, but unfortunately resizing shaped window set its position to x,y:-1000,-1000 and you need to set window position again. When a shape changes several times per second an application window start blinking and it looks awful. Adding function SDL_ResetWindowShape solves blinking trouble, example of such function for X11 driver is in included patch for SDL 2.0.8 version. Is it possible to add it in SDL library or may be there is another way to solve it. I did't find any example of animated shaped window.