Login  Register

Newt undecorated - round corners?

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

Newt undecorated - round corners?

Andre
35 posts
This post was updated on Jul 16, 2022; 12:13pm.
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
| More
Print post
Permalink

Re: Newt undecorated - round corners?

gouessej
Administrator
6035 posts
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
| More
Print post
Permalink

Re: Newt undecorated - round corners?

Andre
35 posts
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
| More
Print post
Permalink

Re: Newt undecorated - round corners?

gouessej
Administrator
6035 posts
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Newt undecorated - round corners?

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