Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2015-08-14 11:06:48 +0000
committerNiraj Modi2015-08-14 11:06:48 +0000
commit2f396c011bd777248fd8421a4e4412f72fe5db52 (patch)
treed9c141da7d356541189699c9e320e63ee5a1dfa7
parent9fa97bc5c7a549e6fc2c96b92c38a33c1f8f888b (diff)
downloadeclipse.platform.swt-2f396c011bd777248fd8421a4e4412f72fe5db52.tar.gz
eclipse.platform.swt-2f396c011bd777248fd8421a4e4412f72fe5db52.tar.xz
eclipse.platform.swt-2f396c011bd777248fd8421a4e4412f72fe5db52.zip
Bug 474096 (Part2) - [Win10] Table header right beside column headers is
black on owner-draw tables Change-Id: I26412786fd8f8327a435c2fa944d996ca38ef666 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java27
1 files changed, 24 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index b678f6984d..2960b484e1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -611,7 +611,14 @@ long /*int*/ callWindowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, lo
/* Resize messages */
case OS.WM_WINDOWPOSCHANGED:
if (redraw) {
- OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
+ /*
+ * Windows10: Below work-around call leads to unintended black
+ * background in header where table is empty, hence making it
+ * conditional in win10, for more details refer bug 474096.
+ */
+ if (OS.WIN32_VERSION < OS.VERSION (6, 3)) {
+ OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
+ }
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
OS.InvalidateRect (handle, null, true);
long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
@@ -4362,7 +4369,14 @@ void setDeferResize (boolean defer) {
if (--resizeCount == 0) {
if (hooks (SWT.MeasureItem) || hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
if (--drawCount == 0 /*&& OS.IsWindowVisible (handle)*/) {
- OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
+ /*
+ * Windows10: Below work-around call leads to unintended black
+ * background in header where table is empty, hence making it
+ * conditional in win10, for more details refer bug 474096.
+ */
+ if (OS.WIN32_VERSION < OS.VERSION (6, 3)) {
+ OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
+ }
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 1, 0);
if (OS.IsWinCE) {
long /*int*/ hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);
@@ -6441,7 +6455,14 @@ LRESULT WM_SETREDRAW (long /*int*/ wParam, long /*int*/ lParam) {
if (wParam == 1) {
if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) != OS.CLR_NONE) {
if (hooks (SWT.MeasureItem) || hooks (SWT.EraseItem) || hooks (SWT.PaintItem)) {
- OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
+ /*
+ * Windows10: Below work-around call leads to unintended black
+ * background in header where table is empty, hence making it
+ * conditional in win10, for more details refer bug 474096.
+ */
+ if (OS.WIN32_VERSION < OS.VERSION (6, 3)) {
+ OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);
+ }
}
}
}

Back to the top