Tip: Cut the “hole” inside shape

I had a need to lock the screen except a specific area. All existing solutions have not helped.
A good way was suggested to me by The Rabbit:

That code is drawing a rectangle with hole, it’s blocking mouse events (except hole area).

Result:


Comments are closed.