bug 292263 ATOK's Moji Palette that is like software keyboard doesn't work. r=timeless, sr=neil, a=chofmann

git-svn-id: svn://10.0.0.236/trunk@172878 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
masayuki%d-toybox.com 2005-04-29 18:30:23 +00:00
parent f72008b311
commit 03d259c108

View File

@ -6009,15 +6009,25 @@ PresShell::HandleEvent(nsIView *aView,
esm->GetFocusedContent(getter_AddRefs(mCurrentEventContent));
esm->GetFocusedFrame(&mCurrentEventFrame);
if (!mCurrentEventFrame) {
#if defined(MOZ_X11) || defined(XP_WIN)
#if defined(MOZ_X11)
if (NS_IS_IME_EVENT(aEvent)) {
// bug 52416
// bug 52416 (MOZ_X11)
// Lookup region (candidate window) of UNIX IME grabs
// input focus from Mozilla but wants to send IME event
// to redraw pre-edit (composed) string
// If Mozilla does not have input focus and event is IME,
// sends IME event to pre-focused element
#else
if (NS_IS_KEY_EVENT(aEvent) || NS_IS_IME_EVENT(aEvent)) {
// bug 292263 (XP_WIN)
// If software keyboard has focus, it may send the key messages and
// the IME messages to pre-focused window. Therefore, if Mozilla
// doesn't have focus and event is key event or IME event, we should
// send the events to pre-focused element.
#endif /* defined(MOZ_X11) */
nsCOMPtr<nsPIDOMWindow> ourWindow = do_QueryInterface(mDocument->GetScriptGlobalObject());
if (ourWindow) {
nsIFocusController *focusController =
@ -6038,7 +6048,7 @@ PresShell::HandleEvent(nsIView *aView,
}
}
}
#endif /* defined(MOZ_X11) */
#endif /* defined(MOZ_X11) || defined(XP_WIN) */
if (!mCurrentEventContent) {
mCurrentEventContent = mDocument->GetRootContent();
}