diff options
Diffstat (limited to 'win32')
| -rw-r--r-- | win32/ScintillaWin.cxx | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 2ff660a09..86e274178 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -457,7 +457,8 @@ void ScintillaWin::EnsureRenderTarget() {  		D2D1_HWND_RENDER_TARGET_PROPERTIES dhrtp;  		dhrtp.hwnd = hw;  		dhrtp.pixelSize = size; -		dhrtp.presentOptions = D2D1_PRESENT_OPTIONS_NONE; +		dhrtp.presentOptions = (technology == SC_TECHNOLOGY_DIRECTWRITERETAIN) ? +			D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS : D2D1_PRESENT_OPTIONS_NONE;  		D2D1_RENDER_TARGET_PROPERTIES drtp;  		drtp.type = D2D1_RENDER_TARGET_TYPE_DEFAULT; @@ -1402,9 +1403,11 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam  			return keysAlwaysUnicode;  		case SCI_SETTECHNOLOGY: -			if ((wParam == SC_TECHNOLOGY_DEFAULT) || (wParam == SC_TECHNOLOGY_DIRECTWRITE)) { +			if ((wParam == SC_TECHNOLOGY_DEFAULT) ||  +				(wParam == SC_TECHNOLOGY_DIRECTWRITERETAIN) || +				(wParam == SC_TECHNOLOGY_DIRECTWRITE)) {  				if (technology != static_cast<int>(wParam)) { -					if (static_cast<int>(wParam) == SC_TECHNOLOGY_DIRECTWRITE) { +					if (static_cast<int>(wParam) > SC_TECHNOLOGY_DEFAULT) {  #if defined(USE_D2D)  						if (!LoadD2D())  							// Failed to load Direct2D or DirectWrite so no effect @@ -2960,7 +2963,8 @@ sptr_t PASCAL ScintillaWin::CTWndProc(  						D2D1_HWND_RENDER_TARGET_PROPERTIES dhrtp;  						dhrtp.hwnd = hWnd;  						dhrtp.pixelSize = D2D1::SizeU(rc.right - rc.left, rc.bottom - rc.top); -						dhrtp.presentOptions = D2D1_PRESENT_OPTIONS_NONE; +						dhrtp.presentOptions = (sciThis->technology == SC_TECHNOLOGY_DIRECTWRITERETAIN) ? +							D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS : D2D1_PRESENT_OPTIONS_NONE;  						D2D1_RENDER_TARGET_PROPERTIES drtp;  						drtp.type = D2D1_RENDER_TARGET_TYPE_DEFAULT; | 
