<AWT Dev> Code Review Request for CR 7024749 - JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75
oleg.pekhovskiy at oracle.com
Thu Apr 19 06:41:59 PDT 2012
Please review the fix for this CR:
The idea of this fix based on IMM interaction theory (from MSDN) and
actual implementation in AWT.
AWT creates its own IME context. It is shared between all AWT windows.
This context is associated with window each time it receives WM_ACTIVATE
message (which surplus but not critical).
WM_IME_SETCONTEXT and WM_IME_NOTIFY (with INM_OPENSTATUSWINDOW) messages
apply to all AWT windows and usually are sent to the top-level window.
So there is no need to send them to the focus proxy.
That's why I removed CallProxyDefWindowProc() from their handlers in
I also removed switch cases for those messages from
AwtFrame::ProxyWindowProc() because they didn't make any sense there.
Thus, only IME messages between WM_IME_STARTCOMPOSITION and
WM_IME_ENDCOMPOSITION are sent to the proxy focus owner - that's a
I changed all places where IME context was used according to MSDN notes:
"The application retrieves the handle by using the ImmGetContext
function. It can use the retrieved handle in subsequent calls to the IMM
to retrieve and set IME values, such as the composition window style,
the composition style, and the status window position.
Once the application has finished using the context, it must release the
context using the ImmReleaseContext function."
All changes were tested by the regression tests in 'test/java/awt/Focus'
and all JCK tests.
I also tested them on hierarchy of owned windows with different
No bad influence was found. From that point of view it is safe.
More information about the awt-dev