diff options
author | Steve Northover <steve> | 2007-08-27 17:58:58 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2007-08-27 17:58:58 +0000 |
commit | 1851f3e5d0668b5e44448e29212e4915714170b5 (patch) | |
tree | b92ce16f609425084196c720f685cfeebcddc704 | |
parent | ffec28c86b01629084c0700ff0cfca257ec3b679 (diff) | |
download | eclipse.platform.swt-1851f3e5d0668b5e44448e29212e4915714170b5.tar.gz eclipse.platform.swt-1851f3e5d0668b5e44448e29212e4915714170b5.tar.xz eclipse.platform.swt-1851f3e5d0668b5e44448e29212e4915714170b5.zip |
redraw background image when list scrolled
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java index 59f722f77c..8171a9c6be 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java @@ -175,7 +175,27 @@ public void addSelectionListener(SelectionListener listener) { int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) { if (handle == 0) return 0; - return OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam); + boolean redraw = false; + switch (msg) { + case OS.WM_HSCROLL: + case OS.WM_VSCROLL: { + redraw = findImageControl () != null && drawCount == 0 && OS.IsWindowVisible (handle); + if (redraw) OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0); + break; + } + } + int /*long*/ code = OS.CallWindowProc (ListProc, hwnd, msg, wParam, lParam); + switch (msg) { + case OS.WM_HSCROLL: + case OS.WM_VSCROLL: { + if (redraw) { + OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0); + OS.InvalidateRect (handle, null, true); + } + break; + } + } + return code; } static int checkStyle (int style) { |