Bug 979148 - Use NOTIFY_IME_OF_POSITION_CHANGE for IMM32. r=masyuki

This commit is contained in:
Makoto Kato 2014-03-06 15:13:50 +09:00
parent 2f267e39eb
commit 32e2737215
3 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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))

View File

@ -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();