aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-08-11 13:17:37 +1000
committernyamatongwe <unknown>2011-08-11 13:17:37 +1000
commitd3cb2fd86ffe51a93548d4f0b48efc6bec3f0868 (patch)
tree656db107908da4a26eea362805cbb1d5aa3ab01a /win32/ScintillaWin.cxx
parent4e7c52c1935534fbd4ba3ebda77ae28155842f60 (diff)
downloadscintilla-mirror-d3cb2fd86ffe51a93548d4f0b48efc6bec3f0868.tar.gz
Fix bugs in calltip and autocompletion with technology choice.
Simplified Direct2D code.
Diffstat (limited to 'win32/ScintillaWin.cxx')
-rw-r--r--win32/ScintillaWin.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index bfc4c1b43..c16da8fdb 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -2792,20 +2792,25 @@ sptr_t PASCAL ScintillaWin::CTWndProc(
RECT rc;
GetClientRect(hWnd, &rc);
// Create a Direct2D render target.
- pD2DFactory->CreateHwndRenderTarget(
- D2D1::RenderTargetProperties(),
- D2D1::HwndRenderTargetProperties(hWnd, D2D1::SizeU(rc.right - rc.left, rc.bottom - rc.top)),
- &pCTRenderTarget);
- //surfaceWindow->Init(ps.hdc, hWnd);
- surfaceWindow->Init(pCTRenderTarget, hWnd);
+ if (sciThis->technology == SC_TECHNOLOGY_DEFAULT) {
+ surfaceWindow->Init(ps.hdc, hWnd);
+ } else {
+ pD2DFactory->CreateHwndRenderTarget(
+ D2D1::RenderTargetProperties(),
+ D2D1::HwndRenderTargetProperties(hWnd, D2D1::SizeU(rc.right - rc.left, rc.bottom - rc.top)),
+ &pCTRenderTarget);
+ surfaceWindow->Init(pCTRenderTarget, hWnd);
+ pCTRenderTarget->BeginDraw();
+ }
surfaceWindow->SetUnicodeMode(SC_CP_UTF8 == sciThis->ct.codePage);
surfaceWindow->SetDBCSMode(sciThis->ct.codePage);
- pCTRenderTarget->BeginDraw();
sciThis->ct.PaintCT(surfaceWindow);
- pCTRenderTarget->EndDraw();
+ if (pCTRenderTarget)
+ pCTRenderTarget->EndDraw();
surfaceWindow->Release();
delete surfaceWindow;
- pCTRenderTarget->Release();
+ if (pCTRenderTarget)
+ pCTRenderTarget->Release();
}
::EndPaint(hWnd, &ps);
return 0;