On Thu, 18 Dec 2025 08:25:37 GMT, Sergey Bylokhov <[email protected]> wrote:
> The fix in LWListPeer introduced by > [JDK-7125456](https://bugs.openjdk.org/browse/JDK-7125456) was intended to > suppress ItemEvents for programmatic changes to a List, while still allowing > events generated by user interaction. > > The implementation unconditionally bypasses the listener logic: > https://hg.openjdk.org/jdk7u/jdk7u-osx/jdk/rev/dfa991721457 > Unfortunately that logic also updates the cached selection state. As a > result, when the application select something programmatically, the cached > state is not updated. > > The change move out the `oldSelectedIndices = source.getSelectedIndices();` > from the `!isSkipStateChangedEvent()` condition, plus some cleanup. This pull request has now been integrated. Changeset: be2ac088 Author: Sergey Bylokhov <[email protected]> URL: https://git.openjdk.org/jdk/commit/be2ac088e86f2be59f26997003cd02bad16672a0 Stats: 135 lines in 2 files changed: 121 ins; 5 del; 9 mod 8373967: [macos] User interactions with List do not trigger ItemEvent after programmatic change Reviewed-by: azvegint ------------- PR: https://git.openjdk.org/jdk/pull/28890
