On Wed, 7 Oct 2026 10:24:00 GMT, Alexander Zvegintsev <[email protected]>
wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Use Lock, remove static and make it per-peer state
>
> src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java line 1442:
>
>> 1440: synchronized (focusRestoreLock) {
>> 1441: focusRestoreTarget = focusedPeer != null &&
>> focusedPeer.isSimpleWindow()
>> 1442: ? new WeakReference<>(focusedPeer) : null;
>
> It looks like this assignment should be wrapped with `focusedPeer != null &&
> focusedPeer != this` check to avoid clearing `focusRestoreTarget` when
> switching to another application (e.g. Finder) and back.
Yes, updated PR to retain existing target when focusedPeer is `null `or `this`
when toggling to different application
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32831#discussion_r4207896442