diff --git a/widget/windows/WinIMEHandler.cpp b/widget/windows/WinIMEHandler.cpp index 470a0c84627..fd62d1afd6c 100644 --- a/widget/windows/WinIMEHandler.cpp +++ b/widget/windows/WinIMEHandler.cpp @@ -198,6 +198,7 @@ IMEHandler::NotifyIME(nsWindow* aWindow, case REQUEST_TO_CANCEL_COMPOSITION: nsIMM32Handler::CancelComposition(aWindow); return NS_OK; + case NOTIFY_IME_OF_POSITION_CHANGE: case NOTIFY_IME_OF_COMPOSITION_UPDATE: nsIMM32Handler::OnUpdateComposition(aWindow); return NS_OK; @@ -226,7 +227,7 @@ IMEHandler::GetUpdatePreference() } #endif //NS_ENABLE_TSF - return nsIMEUpdatePreference(); + return nsIMM32Handler::GetIMEUpdatePreference(); } // static diff --git a/widget/windows/nsIMM32Handler.cpp b/widget/windows/nsIMM32Handler.cpp index 275af68b426..0bb2dd78325 100644 --- a/widget/windows/nsIMM32Handler.cpp +++ b/widget/windows/nsIMM32Handler.cpp @@ -138,6 +138,13 @@ nsIMM32Handler::GetKeyboardCodePage() return sCodePage; } +/* static */ +nsIMEUpdatePreference +nsIMM32Handler::GetIMEUpdatePreference() +{ + return nsIMEUpdatePreference(nsIMEUpdatePreference::NOTIFY_POSITION_CHANGE); +} + // used for checking the lParam of WM_IME_COMPOSITION #define IS_COMPOSING_LPARAM(lParam) \ ((lParam) & (GCS_COMPSTR | GCS_COMPATTR | GCS_COMPCLAUSE | GCS_CURSORPOS)) diff --git a/widget/windows/nsIMM32Handler.h b/widget/windows/nsIMM32Handler.h index 107c2b1bfa6..656a1bdde4a 100644 --- a/widget/windows/nsIMM32Handler.h +++ b/widget/windows/nsIMM32Handler.h @@ -11,9 +11,9 @@ #include "nsCOMPtr.h" #include "nsString.h" #include "nsTArray.h" +#include "nsIWidget.h" #include "mozilla/EventForwards.h" -class nsIWidget; class nsWindow; struct nsIntRect; @@ -143,6 +143,8 @@ public: static void CancelComposition(nsWindow* aWindow, bool aForce = false); static void OnUpdateComposition(nsWindow* aWindow); + static nsIMEUpdatePreference GetIMEUpdatePreference(); + protected: static void EnsureHandlerInstance();