luapower / nw

Native windows (Windows, Linux, OSX) for Lua
http://luapower.com/nw
29 stars 5 forks source link

backward-compatible windows with rounded corners #56

Open capr opened 9 years ago

capr commented 9 years ago

Windows with rounded corners can be done trivially with transparent = true option.

But that doesn't work in Linux with non-composite window managers, and it also uses a different code path in Windows (UpdateLayeredWindow instead of WM_PAINT) that doesn't work with RemoteDesktop (see #2) and doesn't allow direct OpenGL/D3D rendering.

The idea with this issue is to have a corner_radius = radius (default 0) window() option that we can use instead of transparent = true:

Windows: CreateRoundRectRgn() ? sigh... X11: XShape? sigh even more... OSX: make a clipping path? ignore and let the user make a clipping path?

capr commented 9 years ago

Update: Windows: done (60683a06ef7347d66b2c1d9ebf3deafd2fa78fe0)