Patch: Fix endless loop because FocusEvents were processed in the wrong order
ralf.heini at aicas.de
Mon Jan 9 00:34:07 PST 2012
I agree that we are really kind of "patching" the code and to ensure that all kinds of focus handling (and setting the visibility) works fine on every platform is an important goal. And to be sure that everything will still work fine in the future would really make me happy! :-)
So I will have a look at the testing backend. I will probably need to use OpenJDK because JamaicaVM unfortunately does not fully support the Robot yet. For further patches, we also want to test (manually) against the CacioWeb implementation as this is currently the most important one for Cacio.
Roman Kennke schrieb:
> Hi Ralf,
> Nice to hear from you!
> The patch (and the other one you sent) seem to be fine. I will test it
> (we have a bunch of things that we need to verify don't break) and
> integrate it asap.
> I have a little request: There are a couple of things in the code that I
> know we keep bouncing back and forth and I feel we never really get to a
> real solution. Both the focus and visibility I remember we have already
> changed a couple of times, mostly based on experimenting and single
> (ofter corner) cases that make problems. I really would like to see some
> little testing for this code, ideally a unit test the shows how the code
> breaks, and which the patch resolves. This way we avoid that in some
> future changes we do something that breaks your patch again.
> The big question of course is how to test it. Especially when something
> is only exposed on particular platforms. The testing backend (which only
> draws to BufferedImage and generates events by means of java.awt.Robot)
> might be very useful here. Maybe you can think about a test that shows
> the problem, using this testing backend (tta)? You would make me very
> happy, and ensure the same problem doesn't happen in the future (i.e.
> make you happy!).
> Cheers, Roman
> Am Mittwoch, den 04.01.2012, 16:46 +0100 schrieb Ralf Heini:
>> This issue came up using a JDialog on Windows.
>> Unterschiede zwischen Dateien-Anlage (fix-focus-event-loop.patch)
>> diff -r 5601f95ef66a cacio-shared/src/main/java/sun/awt/peer/cacio/CacioWindowPeer.java
>> --- a/cacio-shared/src/main/java/sun/awt/peer/cacio/CacioWindowPeer.java Fri Dec 30 17:09:13 2011 +0100
>> +++ b/cacio-shared/src/main/java/sun/awt/peer/cacio/CacioWindowPeer.java Wed Jan 04 16:41:38 2012 +0100
>> @@ -226,10 +226,10 @@
>> // Simulate what the native system thinks is the currently focused window.
>> + super.handlePeerEvent(ev);
>> WindowEvent we =
>> new WindowEvent(w, WindowEvent.WINDOW_GAINED_FOCUS);
>> - super.handlePeerEvent(ev);
>> case FocusEvent.FOCUS_LOST:
Dipl.-Inform. Ralf Heini * Development and Support * Tel: +49-721-663 968-51
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com * Tel: +49-721-663 968-0
USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim
Geschäftsführer: Dr. James J. Hunt
More information about the caciocavallo-dev