From 877c563c5d4a9e00bcca2579feab3f9ac7075fc3 Mon Sep 17 00:00:00 2001 From: "tague%netscape.com" Date: Mon, 9 Aug 1999 03:56:03 +0000 Subject: [PATCH] Added support for mapping the reply of a textevent (i18n input support) back into platform coordinate space --- view/src/nsViewManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index 35027bb7f84..a8007f225da 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -1613,6 +1613,14 @@ NS_IMETHODIMP nsViewManager :: DispatchEvent(nsGUIEvent *aEvent, nsEventStatus & aEvent->point.x = NSTwipsToIntPixels(aEvent->point.x, t2p); aEvent->point.y = NSTwipsToIntPixels(aEvent->point.y, t2p); + + // + // if the event is an nsTextEvent, we need to map the reply back into platform coordinates + // + if (aEvent->message==NS_TEXT_EVENT) { + ((nsTextEvent*)aEvent)->theReply.mCursorPosition.x=NSTwipsToIntPixels(((nsTextEvent*)aEvent)->theReply.mCursorPosition.x, t2p); + ((nsTextEvent*)aEvent)->theReply.mCursorPosition.y=NSTwipsToIntPixels(((nsTextEvent*)aEvent)->theReply.mCursorPosition.y, t2p); + } } break;