aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-12-30 08:59:11 +1100
committernyamatongwe <unknown>2011-12-30 08:59:11 +1100
commit3aeb11a8120857d626d3d09237b21513d21328b8 (patch)
tree04707c7c83f3883de5a0ba6d53e05f37e914d543
parentbf78662da5ce4167c9ae04a076ec8163b418a653 (diff)
downloadscintilla-mirror-3aeb11a8120857d626d3d09237b21513d21328b8.tar.gz
Returned to paint handling from before cange set 3983 as this change failed
to always draw the tab bar and output pane in SciTE.
-rw-r--r--win32/ScintillaWin.cxx39
1 files changed, 18 insertions, 21 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index 76e11e7b7..35f2044fc 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -548,22 +548,22 @@ LRESULT ScintillaWin::WndPaint(uptr_t wParam) {
// Redirect assertions to debug output and save current state
bool assertsPopup = Platform::ShowAssertionPopUps(false);
paintState = painting;
+ PAINTSTRUCT ps;
+ PAINTSTRUCT *pps;
+
+ bool IsOcxCtrl = (wParam != 0); // if wParam != 0, it contains
+ // a PAINSTRUCT* from the OCX
+ // Removed since this interferes with reporting other assertions as it occurs repeatedly
+ //PLATFORM_ASSERT(hRgnUpdate == NULL);
+ hRgnUpdate = ::CreateRectRgn(0, 0, 0, 0);
+ if (IsOcxCtrl) {
+ pps = reinterpret_cast<PAINTSTRUCT*>(wParam);
+ } else {
+ ::GetUpdateRgn(MainHWND(), hRgnUpdate, FALSE);
+ pps = &ps;
+ ::BeginPaint(MainHWND(), pps);
+ }
if (technology == SC_TECHNOLOGY_DEFAULT) {
- PAINTSTRUCT ps;
- PAINTSTRUCT *pps;
-
- bool IsOcxCtrl = (wParam != 0); // if wParam != 0, it contains
- // a PAINSTRUCT* from the OCX
- // Removed since this interferes with reporting other assertions as it occurs repeatedly
- //PLATFORM_ASSERT(hRgnUpdate == NULL);
- hRgnUpdate = ::CreateRectRgn(0, 0, 0, 0);
- if (IsOcxCtrl) {
- pps = reinterpret_cast<PAINTSTRUCT*>(wParam);
- } else {
- ::GetUpdateRgn(MainHWND(), hRgnUpdate, FALSE);
- pps = &ps;
- ::BeginPaint(MainHWND(), pps);
- }
AutoSurface surfaceWindow(pps->hdc, this);
if (surfaceWindow) {
rcPaint = PRectangle(pps->rcPaint.left, pps->rcPaint.top, pps->rcPaint.right, pps->rcPaint.bottom);
@@ -572,18 +572,13 @@ LRESULT ScintillaWin::WndPaint(uptr_t wParam) {
Paint(surfaceWindow, rcPaint);
surfaceWindow->Release();
}
- if (!IsOcxCtrl)
- ::EndPaint(MainHWND(), pps);
} else {
#if defined(USE_D2D)
EnsureRenderTarget();
AutoSurface surfaceWindow(pRenderTarget, this);
if (surfaceWindow) {
pRenderTarget->BeginDraw();
- RECT rcUpdate;
- ::GetUpdateRect(MainHWND(), &rcUpdate, FALSE);
- rcPaint = PRectangle(rcUpdate.left, rcUpdate.top, rcUpdate.right, rcUpdate.bottom);
- //rcPaint = GetClientRectangle();
+ rcPaint = PRectangle(pps->rcPaint.left, pps->rcPaint.top, pps->rcPaint.right, pps->rcPaint.bottom);
PRectangle rcClient = GetClientRectangle();
paintingAllText = rcPaint.Contains(rcClient);
if (paintingAllText) {
@@ -605,6 +600,8 @@ LRESULT ScintillaWin::WndPaint(uptr_t wParam) {
hRgnUpdate = 0;
}
+ if (!IsOcxCtrl)
+ ::EndPaint(MainHWND(), pps);
if (paintState == paintAbandoned) {
// Painting area was insufficient to cover new styling or brace highlight positions
FullPaint();