From a52d83b3067cf37f87f479eb78a07f1ae87135dd Mon Sep 17 00:00:00 2001 From: Steve Northover Date: Thu, 17 May 2007 17:23:27 +0000 Subject: 187597 - BeginBufferedPaint does not work in RTL and advanced --- .../Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java index ba8ee341d0..c18e9b20e4 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java @@ -1123,8 +1123,16 @@ LRESULT WM_PAINT (int wParam, int lParam) { PAINTSTRUCT ps = new PAINTSTRUCT (); if (hooks (SWT.Paint)) { - /* Use the buffered paint when available */ - if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0) && (style & SWT.DOUBLE_BUFFERED) != 0 && (style & SWT.NO_MERGE_PAINTS) == 0) { + /* Use the buffered paint when possible */ + boolean bufferedPaint = false; + if ((style & SWT.DOUBLE_BUFFERED) != 0) { + if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) { + if ((style & (SWT.NO_MERGE_PAINTS | SWT.RIGHT_TO_LEFT)) == 0) { + bufferedPaint = true; + } + } + } + if (bufferedPaint) { int hDC = OS.BeginPaint (handle, ps); int width = ps.right - ps.left; int height = ps.bottom - ps.top; -- cgit