From 28740fc0e339b42f12ac7731820ced97d099f2cf Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 13 Nov 2014 15:38:27 +1100 Subject: Bug [#1643]. Only show system caret for GDI as it interferes with Direct2D. From Mat Berchtold. --- doc/ScintillaHistory.html | 4 ++++ win32/ScintillaWin.cxx | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 374dad6fe..61ed3b7bc 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -505,6 +505,10 @@ Feature #1080.
  • + On Windows, only call ShowCaret in GDI mode as it interferes with caret drawing when using Direct2D. + Bug #1643. +
  • +
  • For GTK+ on Windows, avoid extra space when pasting from external application.
  • diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 71cf7fc7d..132aea91a 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2913,7 +2913,10 @@ BOOL ScintillaWin::CreateSystemCaret() { BOOL retval = ::CreateCaret( MainHWND(), sysCaretBitmap, sysCaretWidth, sysCaretHeight); - ::ShowCaret(MainHWND()); + if (technology == SC_TECHNOLOGY_DEFAULT) { + // System caret interferes with Direct2D drawing so only show it for GDI. + ::ShowCaret(MainHWND()); + } return retval; } -- cgit v1.2.3