aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2009-07-03 06:36:25 +0000
committernyamatongwe <devnull@localhost>2009-07-03 06:36:25 +0000
commit1d772be5dea42ff8cd8632806589bbc92effec35 (patch)
tree23fca327b0795859289d499439b4d6968810f2a8 /win32
parent603237d7ed409ff08a0b92aa703be8c6e469795a (diff)
downloadscintilla-mirror-1d772be5dea42ff8cd8632806589bbc92effec35.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')
-rw-r--r--win32/ScintillaWin.cxx8
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;