diff options
author | Steve Northover <steve> | 2005-06-06 18:53:44 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2005-06-06 18:53:44 +0000 |
commit | 9d320f07641e79ba34cdf0cdd0acffd839827252 (patch) | |
tree | d4dd636ba6b97d715e7549c573d7bb9354dedcc5 | |
parent | ecb897396412f10f4d71a3c40a56bec4b1e117be (diff) | |
download | eclipse.platform.swt-9d320f07641e79ba34cdf0cdd0acffd839827252.tar.gz eclipse.platform.swt-9d320f07641e79ba34cdf0cdd0acffd839827252.tar.xz eclipse.platform.swt-9d320f07641e79ba34cdf0cdd0acffd839827252.zip |
97745 - header button stays pushed
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java | 1 | ||||
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java index d22736f6f0..4127ebe739 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/win32/org/eclipse/swt/internal/win32/OS.java @@ -858,6 +858,7 @@ public class OS extends Platform { public static final int NM_CUSTOMDRAW = NM_FIRST - 12; public static final int NM_DBLCLK = 0xfffffffd; public static final int NM_RECOGNIZEGESTURE = NM_FIRST - 16; + public static final int NM_RELEASEDCAPTURE = NM_FIRST - 16; public static final int NM_RETURN = 0xfffffffc; public static final int NOTIFYICONDATAA_V2_SIZE = 488; public static final int NOTIFYICONDATAW_V2_SIZE = 936; 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 52aa6dcea5..b11f8067e8 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 @@ -47,8 +47,8 @@ public class Table extends Composite { ImageList imageList; TableItem currentItem; int lastIndexOf, lastWidth; - boolean customDraw, dragStarted, fixScrollWidth, tipRequested, wasSelected; - boolean ignoreActivate, ignoreSelect, ignoreShrink, ignoreResize, resized; + boolean customDraw, cancelMove, dragStarted, fixScrollWidth, tipRequested; + boolean wasSelected, ignoreActivate, ignoreSelect, ignoreShrink, ignoreResize, resized; static final int INSET = 4; static final int GRID_WIDTH = 1; static final int HEADER_MARGIN = 10; @@ -3380,7 +3380,11 @@ LRESULT WM_NOTIFY (int wParam, int lParam) { } break; } + case OS.NM_RELEASEDCAPTURE: + cancelMove = false; + break; case OS.HDN_BEGINDRAG: { + if (cancelMove) return LRESULT.ONE; int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); if ((bits & OS.LVS_EX_HEADERDRAGDROP) == 0) break; int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); @@ -3390,13 +3394,14 @@ LRESULT WM_NOTIFY (int wParam, int lParam) { if (phdn.iItem != -1) { TableColumn column = columns [phdn.iItem]; if (column != null && !column.getMoveable ()) { - OS.ReleaseCapture (); + cancelMove = true; return LRESULT.ONE; } } break; } case OS.HDN_ENDDRAG: { + cancelMove = false; int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); if ((bits & OS.LVS_EX_HEADERDRAGDROP) == 0) break; NMHEADER phdn = new NMHEADER (); |