diff options
author | Steve Northover <steve> | 2007-05-17 17:23:27 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2007-05-17 17:23:27 +0000 |
commit | a52d83b3067cf37f87f479eb78a07f1ae87135dd (patch) | |
tree | 7c8411e373c57d693877fbeb583dd5390926924d | |
parent | 60c974b8ab07394c314cf272353fa54cabbef0ee (diff) | |
download | eclipse.platform.swt-a52d83b3067cf37f87f479eb78a07f1ae87135dd.tar.gz eclipse.platform.swt-a52d83b3067cf37f87f479eb78a07f1ae87135dd.tar.xz eclipse.platform.swt-a52d83b3067cf37f87f479eb78a07f1ae87135dd.zip |
187597 - BeginBufferedPaint does not work in RTL and advanced
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java | 12 |
1 files 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; |