Hi Sergey,
Yes, this is a good suggestion. Here's the latest version of the fix:
http://cr.openjdk.java.net/~anthony/x-15-frameMinSize-7124553.2/
Regarding doing this in native: everything is possible to do in native
code. However, Java code is easier to maintain, and as such it's best to
keep as much code in Java peers as possible. The reason I put the
constrainBounds: in native is because it relies on -shouldShowGrowBox
which checks for the version of the OS and is available in native code
only. And there's no practical reason to expose it in Java.
--
best regards,
Anthony
On 2/15/2012 6:13 PM, Sergey Bylokhov wrote:
15.02.2012 18:01, Anthony Petrov пишет:
Hi Sergey,
Thanks for the review. Indeed, the size constraints must be re-applied
in this case. Please find an updated fix here:
http://cr.openjdk.java.net/~anthony/x-15-frameMinSize-7124553.1/
I guess we should use peers bounds in line
596 Rectangle bounds = target.getBounds();
Is it possible to do it in the native part in the nativeSetNSWindowBounds?
--
best regards,
Anthony
On 2/15/2012 5:36 PM, Sergey Bylokhov wrote:
Hi, Anthony.
What happens if small decorated nonresizable window became
resizable(growbox will be shown). As far I understand window should
increase its size? Correct?
15.02.2012 17:15, Anthony Petrov wrote:
Hello,
Please review a fix for
http://bugs.sun.com/view_bug.do?bug_id=7124553 at:
http://cr.openjdk.java.net/~anthony/x-15-frameMinSize-7124553.0/
With this fix we constrain the size used for setBounds() and
setMinMaxSize() operations so that it always includes the size of
window decorations and the grow box when they're enabled. The size
of (1, 1) is considered as the smallest possible size for a window
in any case.
--
best regards,
Anthony