Resizing the main window when entering kiosk mode

Hi jules,

 

I have been looking for an answer for my question on the forum and I couldn't find the answer so here is my problem:

 

My main window is a DocumentWindow with a native title bar. The fullscreen button is activated, so when i press it the kiosk mode is activated. However unlike on windows, the window is not resized automatically to fit the screen when the kiosk mode is activated so I would have to do it myself.

So is there a way to detect that the fullscreen button has been pressed? (since the maximiseButtonPressed listener is only set for non native titlebars) Or should I just do my own fullscreen button that replaces the native titlebar's button?

 

Thanks in advance!

I'm unclear about what you mean by "fullscreen button"? The red one, or the top-right kiosk mode one?

Sorry, yes I mean the top-right kiosk mode button!

Ok, well I don't understand the issue.. I've used that in my own apps and it resizes as expected.. Maybe you're overriding something and interfering with the way the class works?

Thanks I will take a closer look at it know that I know it should work like I want it to work.

If something looks broken, then post a code sample I could use to reproduce it, and I'll have a look.

Apparently the window needs to be set resizable in order for it to be put to fullscreen on mac, I didn't think of that. Weirdly the maximize button on windows resizes the window even if the component is not set resizable.

 

Anyways it works now, thanks!