On Mon, 22 Aug 2022 21:53:53 GMT, Alexey Ivanov <[email protected]> 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
