Hi Martin, I am not a reviewer, but I will test your fix with the reproducer test I wrote for this bug. Did you try it ? I will do asap.
You should use a single instance for your SequencedEventFilter and make this class final: private static final class SequencedEventsFilter implements EventFilter { + private static final SequencedEventsFilter INSTANCE = new SequencedEventsFilter(); Then edt.pumpEventsForFilter(() -> !SequencedEvent.this.isFirstOrDisposed(), + new SequencedEventsFilter()); => SequencedEventsFilter.INSTANCE); I noticed your patch do not provide any test... yet ? I think it is needed here. Good job for your detailed analysis and the webrev. Regards, Laurent Le mer. 10 oct. 2018 à 18:19, Martin Balao <mba...@redhat.com> a écrit : > Hi, > > Can I have a review for JDK-8204142 [1] Webrev 00? > > * http://cr.openjdk.java.net/~mbalao/webrevs/8204142/8204142.webrev.00/ > * > http://cr.openjdk.java.net/~mbalao/webrevs/8204142/8204142.webrev.00.zip > > As a result of [2], I propose Event Dispatch Threads to be aware of > SentEvent AWT events when sleeping. > > In the tests I did, the SequencedEvent.list is successfully flushed with > this patch. > > Thanks, > Martin.- > > -- > [1] - https://bugs.openjdk.java.net/browse/JDK-8204142 > [2] - > http://mail.openjdk.java.net/pipermail/awt-dev/2018-October/014426.html > -- -- Laurent Bourgès