comparison src/windows/native/sun/windows/awt_Frame.cpp @ 4084:6303d3a93040

7034291: Regression : Preedit String on active client is committed into unexpected component Reviewed-by: art, naoto
author dcherepanov
date Fri, 29 Apr 2011 16:02:05 +0400
parents 43be19b7c945
children 997f464f8446
comparison
equal deleted inserted replaced
15:dcf8b9184276 16:3208b4bfe3bd
107 m_isEmbedded = FALSE; 107 m_isEmbedded = FALSE;
108 m_ignoreWmSize = FALSE; 108 m_ignoreWmSize = FALSE;
109 m_isMenuDropped = FALSE; 109 m_isMenuDropped = FALSE;
110 m_isInputMethodWindow = FALSE; 110 m_isInputMethodWindow = FALSE;
111 m_isUndecorated = FALSE; 111 m_isUndecorated = FALSE;
112 m_lastProxiedFocusOwner = NULL; 112 m_imeTargetComponent = NULL;
113 m_actualFocusedWindow = NULL; 113 m_actualFocusedWindow = NULL;
114 m_iconic = FALSE; 114 m_iconic = FALSE;
115 m_zoomed = FALSE; 115 m_zoomed = FALSE;
116 m_maxBoundsSet = FALSE; 116 m_maxBoundsSet = FALSE;
117 m_forceResetZoomed = FALSE; 117 m_forceResetZoomed = FALSE;
309 LRESULT AwtFrame::ProxyWindowProc(UINT message, WPARAM wParam, LPARAM lParam, MsgRouting &mr) 309 LRESULT AwtFrame::ProxyWindowProc(UINT message, WPARAM wParam, LPARAM lParam, MsgRouting &mr)
310 { 310 {
311 LRESULT retValue = 0L; 311 LRESULT retValue = 0L;
312 312
313 AwtComponent *focusOwner = NULL; 313 AwtComponent *focusOwner = NULL;
314 AwtComponent *imeTargetComponent = NULL;
315
314 // IME and input language related messages need to be sent to a window 316 // IME and input language related messages need to be sent to a window
315 // which has the Java input focus 317 // which has the Java input focus
316 switch (message) { 318 switch (message) {
317 case WM_IME_STARTCOMPOSITION: 319 case WM_IME_STARTCOMPOSITION:
318 case WM_IME_ENDCOMPOSITION: 320 case WM_IME_ENDCOMPOSITION:
321 case WM_IME_NOTIFY: 323 case WM_IME_NOTIFY:
322 case WM_IME_CONTROL: 324 case WM_IME_CONTROL:
323 case WM_IME_COMPOSITIONFULL: 325 case WM_IME_COMPOSITIONFULL:
324 case WM_IME_SELECT: 326 case WM_IME_SELECT:
325 case WM_IME_CHAR: 327 case WM_IME_CHAR:
326 case 0x0288: // WM_IME_REQUEST 328 case WM_IME_REQUEST:
327 case WM_IME_KEYDOWN: 329 case WM_IME_KEYDOWN:
328 case WM_IME_KEYUP: 330 case WM_IME_KEYUP:
329 case WM_INPUTLANGCHANGEREQUEST: 331 case WM_INPUTLANGCHANGEREQUEST:
330 case WM_INPUTLANGCHANGE: 332 case WM_INPUTLANGCHANGE:
333 if (message == WM_IME_STARTCOMPOSITION) {
334 SetImeTargetComponent(sm_focusOwner);
335 }
336 imeTargetComponent = AwtComponent::GetComponent(GetImeTargetComponent());
337 if (imeTargetComponent != NULL &&
338 imeTargetComponent != this) // avoid recursive calls
339 {
340 retValue = imeTargetComponent->WindowProc(message, wParam, lParam);
341 mr = mrConsume;
342 }
343 if (message == WM_IME_ENDCOMPOSITION) {
344 SetImeTargetComponent(NULL);
345 }
346 break;
331 // TODO: when a Choice's list is dropped down and we're scrolling in 347 // TODO: when a Choice's list is dropped down and we're scrolling in
332 // the list WM_MOUSEWHEEL messages come to the poxy, not to the list. Why? 348 // the list WM_MOUSEWHEEL messages come to the poxy, not to the list. Why?
333 case WM_MOUSEWHEEL: 349 case WM_MOUSEWHEEL:
334 focusOwner = AwtComponent::GetComponent(GetLastProxiedFocusOwner()); 350 focusOwner = AwtComponent::GetComponent(sm_focusOwner);
335 if (focusOwner != NULL && 351 if (focusOwner != NULL &&
336 focusOwner != this) // avoid recursive calls 352 focusOwner != this) // avoid recursive calls
337 { 353 {
338 retValue = focusOwner->WindowProc(message, wParam, lParam); 354 retValue = focusOwner->WindowProc(message, wParam, lParam);
339 mr = mrConsume; 355 mr = mrConsume;