Re: How to tell if a newt window is maximized?
Posted by GiGurra on Feb 23, 2012; 5:32pm
URL: https://forum.jogamp.org/How-to-tell-if-a-newt-window-is-maximized-tp3767837p3770416.html
Thats all good an well, but maybe I was not clear on this.
If you have a decorated maximized window, then the total insets + glwindow sizes will NOT be the same as the screen size.
Therefor, there is no way of detecting whether a window is maximized or not.
I do NOT need a way to set a window maximized, I merely need to detect if it is maximized, and windows adds extra padding to window sizes when maximized (more than just insets + size).
If you dont believe me I can create a quick application to show it for you.
Why is this interesting/important? Because I am building an application where I toggle decorated/undecorated to position windows on several screens. Therefor I need to be able to position maximized windows also OK. (I use the decorated variant to position it, then toggle to undecorated and save position to a config file - and it's important for the end users to also have this ability).
Worst case I'll need to make my own jni binding to do this in C, but I'd be much happier if I didnt have to add another dll dependency to my project. But the short answer is that getsize and insets do not return correct numbers when a window is maximized.