don't fake full row select when the selection happens to be on an item
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 9b664c0..42ecae1 100755
--- 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
@@ -3412,6 +3412,7 @@
if (code != 0) {
pinfo.x = rect.left;
OS.SendMessage (handle, OS.LVM_SUBITEMHITTEST, 0, pinfo);
+ pinfo.flags &= ~(OS.LVHT_ONITEMICON | OS.LVHT_ONITEMLABEL);
}
}
} else {
@@ -3474,6 +3475,10 @@
if ((style & SWT.FULL_SELECTION) == 0) {
if (hooks (SWT.MeasureItem)) {
fullRowSelect = hitTestSelection (pinfo.iItem, pinfo.x, pinfo.y);
+ if (fullRowSelect) {
+ int flags = OS.LVHT_ONITEMICON | OS.LVHT_ONITEMLABEL;
+ if ((pinfo.flags & flags) != 0) fullRowSelect = false;
+ }
}
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
index c94048d..89a866c 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tree.java
@@ -6253,7 +6253,9 @@
if ((bits & OS.TVS_FULLROWSELECT) == 0) fakeSelection = true;
} else {
if (hooks (SWT.MeasureItem)) {
- if (hitTestSelection (lpht.hItem, lpht.x, lpht.y)) fakeSelection = true;
+ if (hitTestSelection (lpht.hItem, lpht.x, lpht.y)) {
+ if ((lpht.flags & OS.TVHT_ONITEM) == 0) fakeSelection = true;
+ }
}
}
}