<AWT Dev> COMPONENT_RESIZED/COMPONENT_MOVED events for toplevel windows
Artem.Ananiev at Sun.COM
Mon Apr 27 01:39:45 PDT 2009
Oleg Sukhodolsky wrote:
> Hi Anthony,
> I agree that it is a good idea to follow native events is a good idea.
> So, I'd vote for closing this bug (well, you could also write
> something in javadoc about this ;)
I don't think the bug should be closed. First, it's a regression and we
should at least document why the new behavior is correct. Second, some
of the events are really posted from the Java code, but not received
from the native system (mostly, for lw components).
> but only if we do really follow native events on platforms (you sad
> that this is a true for Windows,
> but sad nothing about X) and if we miss no geometry/placement changes.
Agree. This is what should be done: check that Java events correspond to
the native events for hw components and check that lw components are
handled the same way.
> And, of course, I assume that user does receive (de)iconification events.
> With best regards, Oleg.
> On Fri, Apr 24, 2009 at 6:45 PM, Anthony Petrov <Anthony.Petrov at sun.com> wrote:
>> There's a bug: 6754618 (Frame triggers componentMoved and componentResized
>> events when restored from iconified state) 
>> Running the test on different platforms with different Java versions I
>> observe different results:
>> 1.5.0, 6u13:
>> Immediately after running the test I receive the Resized and Moved event.
>> Subsequent iconification/deiconification of the frame does not generate any
>> additional events.
>> 7 (~b56):
>> I receive only the Resized event on startup. Iconification/deiconification
>> do not generate any events. The Moved event gets never delivered.
>> MS Windows Vista:
>> I receive no events at all, neither on startup, nor on subsequent actions.
>> 1.6.0, 6u14, 7 (~b56):
>> No events on startup. Each deiconification generates the Moved/Resized pair.
>> Because of the different behavior, I can not decide which one should be
>> considered a correct one. In most cases the AWT sends the events to
>> components when it receives the events from the native system. Some time ago
>> we decided that this would be the most correct behavior that we could
>> achieve. Indeed, the Moved/Resized pair observed currently on MS Windows get
>> generated as a reaction on the natively received WM_SIZE/WM_MOVE messages
>> (in JDK 7: see the src/windows/native/sun/windows/awt_Window.cpp file for
>> Does anyone have any ideas on what should be done with the bug?
>>  http://bugs.sun.com/view_bug.do?bug_id=6754618
>> best regards,
More information about the awt-dev