RFR: 8288325: [windows] Actual and Preferred Size of AWT Non-resizable frame are different [v3]

Harshitha Onkar honkar at openjdk.org
Mon Sep 19 21:39:13 UTC 2022


On Mon, 22 Aug 2022 21:53:53 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> And this is unclear to me. The frame is set to non-resizeable, `frame.pack()` is called. This, I assume, results in this code block being executed, so the calculated insets should be cached.
>> 
>> Why do the following calls to `getInsets` or `getPreferredSize` return the *resizeable* insets if the cached ones are *non-resizeable*?
>
>> Is this applicable to windows?
> 
> I mean to `Window` objects.

> And this is unclear to me. The frame is set to non-resizeable, `frame.pack()` is called. This, I assume, results in this code block being executed, so the calculated insets should be cached.
> 
> Why do the following calls to `getInsets` or `getPreferredSize` return the _resizeable_ insets if the cached ones are _non-resizeable_?

Initially the cause for swapping of insets was unclear to me as well. After looking closely at the native debug logs, it was found that the insets calculated using Client & Non-Client Rects were different in comparison to the native insets obtained from system metrics for Non-Resizable frame.

-------------

PR: https://git.openjdk.org/jdk/pull/9954



More information about the client-libs-dev mailing list