diff options
author | nyamatongwe <unknown> | 2009-07-03 06:36:25 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-07-03 06:36:25 +0000 |
commit | 5c649dc18f3610af94df30bfe457a8f6fabfc63a (patch) | |
tree | 23fca327b0795859289d499439b4d6968810f2a8 /win32/ScintillaWin.cxx | |
parent | 6c7369b142dbefe0323ca0af53b6359c78225a5c (diff) | |
download | scintilla-mirror-5c649dc18f3610af94df30bfe457a8f6fabfc63a.tar.gz |
Use screen point for caret that includes virtual spcace so that, for
example, the IME appears near the caret when the caret is in virtual space.
Changed LocationFromPosition to work on a SelectionPosition and
added convenience method for finding screen point of main caret.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r-- | win32/ScintillaWin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 9c8036aa9..248ae0d3d 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -524,7 +524,7 @@ sptr_t ScintillaWin::HandleComposition(uptr_t wParam, sptr_t lParam) { } } // Set new position after converted - Point pos = LocationFromPosition(sel.MainCaret()); + Point pos = PointMainCaret(); COMPOSITIONFORM CompForm; CompForm.dwStyle = CFS_POINT; CompForm.ptCurrentPos.x = pos.x; @@ -904,7 +904,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam Point pt = Point::FromLong(lParam); if ((pt.x == -1) && (pt.y == -1)) { // Caused by keyboard so display menu near caret - pt = LocationFromPosition(sel.MainCaret()); + pt = PointMainCaret(); POINT spt = {pt.x, pt.y}; ::ClientToScreen(MainHWND(), &spt); pt = Point(spt.x, spt.y); @@ -1136,7 +1136,7 @@ void ScintillaWin::UpdateSystemCaret() { DestroySystemCaret(); CreateSystemCaret(); } - Point pos = LocationFromPosition(sel.MainCaret()); + Point pos = PointMainCaret(); ::SetCaretPos(pos.x, pos.y); } } @@ -1817,7 +1817,7 @@ void ScintillaWin::ImeStartComposition() { if (caret.active) { // Move IME Window to current caret position HIMC hIMC = ::ImmGetContext(MainHWND()); - Point pos = LocationFromPosition(sel.MainCaret()); + Point pos = PointMainCaret(); COMPOSITIONFORM CompForm; CompForm.dwStyle = CFS_POINT; CompForm.ptCurrentPos.x = pos.x; |