Newt undecorated - round corners?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Newt undecorated - round corners?

Andre
This post was updated on .
Hi....

Is there a way to mask the GlWindow canvas with round corners in an unDecorated state? See reason = selfmade window on Win11. SetShape does not exist :(
I am a Robot
Reply | Threaded
Open this post in threaded view
|

Re: Newt undecorated - round corners?

gouessej
Administrator
Hello

You need to call CreateRoundRectRgn and SetWindowRgn somehow (if you keep the decoration). Maybe it's doable in pure Java by using the Foreign-Memory Access API. Otherwise, you have to modify the region used by the GLWindow if you want to use an undecorated window.

Good luck :s
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Newt undecorated - round corners?

Andre
Hey Gouesseij,

What you explained was like rocket science to my brain! 🚀 But hey, one day I’ll be a space cadet too!

I thought about using an undecorated JFrame to get a snazzy colored title bar. But then I discovered FlatLaf - Flat Look and Feel with GLWindow, and it was like finding the secret sauce! 🍔 So, I ditched the undecorated idea.

Cheers,
Andre

I am a Robot
Reply | Threaded
Open this post in threaded view
|

Re: Newt undecorated - round corners?

gouessej
Administrator
Reply | Threaded
Open this post in threaded view
|

Re: Newt undecorated - round corners?

Andre
Oh, that’s my teacher! Thanks a lot.
I am a Robot