diff options
| -rw-r--r-- | doc/ScintillaHistory.html | 9 | ||||
| -rw-r--r-- | win32/ScintillaWin.cxx | 22 | 
2 files changed, 21 insertions, 10 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 1e8facbf7..1dd2ed9a7 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -473,8 +473,15 @@  	Composition popups appear near input.  	</li>  	<li> +	Fix lexer problem where no line end was seen at end of document. +	</li> +	<li>  	Fix crash on Cocoa when view deallocated. -	<a href="http://sourceforge.net/p/scintilla/bugs/1466/">Bug #1466</a>, +	<a href="http://sourceforge.net/p/scintilla/bugs/1466/">Bug #1466</a>. +	</li> +	<li> +	Fix drawing on Windows with Direct2D when returning from lock screen. +	The render target had to be recreated and an area would be black since the drawing was not retried.  	</li>  	<li>  	Fix display of DBCS documents on Windows Direct2D/DirectWrite with default character set. diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index f8d884a98..e300253de 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -580,15 +580,19 @@ LRESULT ScintillaWin::WndPaint(uptr_t wParam) {  		}  	} else {  #if defined(USE_D2D) -		EnsureRenderTarget(); -		AutoSurface surfaceWindow(pRenderTarget, this); -		if (surfaceWindow) { -			pRenderTarget->BeginDraw(); -			Paint(surfaceWindow, rcPaint); -			surfaceWindow->Release(); -			HRESULT hr = pRenderTarget->EndDraw(); -			if (hr == D2DERR_RECREATE_TARGET) { -				DropRenderTarget(); +		for (int attempt=0;attempt<2;attempt++) { +			EnsureRenderTarget(); +			AutoSurface surfaceWindow(pRenderTarget, this); +			if (surfaceWindow) { +				pRenderTarget->BeginDraw(); +				Paint(surfaceWindow, rcPaint); +				surfaceWindow->Release(); +				HRESULT hr = pRenderTarget->EndDraw(); +				if (hr == D2DERR_RECREATE_TARGET) { +					DropRenderTarget(); +				} else { +					break; +				}  			}  		}  #endif | 
