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 - shaped window how to reset window shape without window resizing
Summary: shaped window how to reset window shape without window resizing
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.8
Hardware: x86_64 Linux
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-26 15:06 UTC by Aleksey.Ozhigov
Modified: 2019-01-26 15:06 UTC (History)
0 users

See Also:


Attachments
patch add SDL_ResetWindowShape function (4.44 KB, text/plain)
2019-01-26 15:06 UTC, Aleksey.Ozhigov
Details

Note You need to log in before you can comment on or make changes to this bug.
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.