<AWT Dev> Review request for 7124553: [macosx] Need minimum size for titled Frames and JFrames
anthony.petrov at oracle.com
Wed Feb 15 06:23:41 PST 2012
Yes, this is a good suggestion. Here's the latest version of the fix:
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.
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:
> 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,
>> 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:
>>>> Please review a fix for
>>>> http://bugs.sun.com/view_bug.do?bug_id=7124553 at:
>>>> 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,
More information about the macosx-port-dev