aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/ScintillaWin.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-08-11 13:17:37 +1000
committernyamatongwe <devnull@localhost>2011-08-11 13:17:37 +1000
commit418b4a0ab5ba38e060a9c843845a944b23ef86c6 (patch)
tree0b99ae0469645d8e098382a39d4ef04d55d36172 /win32/ScintillaWin.cxx
parent0f82453d4bcbdff2d0298bf23c8e5154d4674fc9 (diff)
downloadscintilla-mirror-418b4a0ab5ba38e060a9c843845a944b23ef86c6.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;