diff options
author | Nikita Nemkin | 2018-04-13 07:09:42 +0000 |
---|---|---|
committer | Lars Vogel | 2018-04-13 10:00:40 +0000 |
commit | 932adc1c8e531bf57e4948d87e5db9ae3f4c9a54 (patch) | |
tree | fac38d2d8f1e2033aa3efe53491e890c72e229ae /bundles/org.eclipse.swt/Eclipse SWT/win32 | |
parent | 104e4028712414d8d18700491e038d8daa5f9721 (diff) | |
download | eclipse.platform.swt-932adc1c8e531bf57e4948d87e5db9ae3f4c9a54.tar.gz eclipse.platform.swt-932adc1c8e531bf57e4948d87e5db9ae3f4c9a54.tar.xz eclipse.platform.swt-932adc1c8e531bf57e4948d87e5db9ae3f4c9a54.zip |
[Win32] Remove dead code from Display.windowProc
Some code added in bug 124965 (Table scrolling optimization)
is dead. In particular, Display.columnCount variable is never set.
Scrolling optimization itself is not affected.
Change-Id: I3b2cc89d5698625818e71134d9d036c4d9baba0d
Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java | 29 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java | 14 |
2 files changed, 6 insertions, 37 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java index e0aa444757..6abc801719 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java @@ -275,11 +275,6 @@ public class Display extends Device { /* Table */ char [] tableBuffer; - NMHDR hdr = new NMHDR (); - NMLVDISPINFO plvfi = new NMLVDISPINFO (); - long /*int*/ hwndParent; - int columnCount; - boolean [] columnVisible; /* Resize and move recursion */ int resizeCount; @@ -3730,12 +3725,9 @@ void releaseDisplay () { imageList = toolImageList = toolHotImageList = toolDisabledImageList = null; timerList = null; tableBuffer = null; - columnVisible = null; eventTable = filterTable = null; items = null; clickRect = null; - hdr = null; - plvfi = null; monitors = null; touchSources = null; @@ -4769,27 +4761,6 @@ void wakeThread () { } long /*int*/ windowProc (long /*int*/ hwnd, long /*int*/ msg, long /*int*/ wParam, long /*int*/ lParam) { - /* - * Feature in Windows. On Vista only, it is faster to - * compute and answer the data for the visible columns - * of a table when scrolling, rather than just return - * the data for each column when asked. - */ - if (columnVisible != null) { - if (msg == OS.WM_NOTIFY && hwndParent == hwnd) { - OS.MoveMemory (hdr, lParam, NMHDR.sizeof); - switch (hdr.code) { - case OS.LVN_GETDISPINFOA: - case OS.LVN_GETDISPINFOW: { - OS.MoveMemory (plvfi, lParam, NMLVDISPINFO.sizeof); - if (0 <= plvfi.iSubItem && plvfi.iSubItem < columnCount) { - if (!columnVisible [plvfi.iSubItem]) return 0; - } - break; - } - } - } - } if ((int)/*64*/msg == TASKBARBUTTONCREATED) { if (taskBar != null) { TaskItem [] items = taskBar.items; 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 f5c30bc2ed..0936214622 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 @@ -80,6 +80,7 @@ public class Table extends Composite { TableItem currentItem; TableColumn sortColumn; RECT focusRect; + boolean [] columnVisible; long /*int*/ headerToolTipHandle, hwndHeader; boolean ignoreCustomDraw, ignoreDrawForeground, ignoreDrawBackground, ignoreDrawFocus, ignoreDrawSelection, ignoreDrawHot; boolean customDraw, dragStarted, explorerTheme, firstColumnImage, fixScrollWidth, tipRequested, wasSelected, wasResized, painted; @@ -6346,11 +6347,10 @@ LRESULT WM_HSCROLL (long /*int*/ wParam, long /*int*/ lParam) { } } try { - display.hwndParent = OS.GetParent (handle); - display.columnVisible = visible; + columnVisible = visible; OS.UpdateWindow (handle); } finally { - display.columnVisible = null; + columnVisible = null; } } } @@ -6447,11 +6447,10 @@ LRESULT WM_VSCROLL (long /*int*/ wParam, long /*int*/ lParam) { } } try { - display.hwndParent = OS.GetParent (handle); - display.columnVisible = visible; + columnVisible = visible; OS.UpdateWindow (handle); } finally { - display.columnVisible = null; + columnVisible = null; } } } @@ -6558,8 +6557,7 @@ LRESULT wmNotifyChild (NMHDR hdr, long /*int*/ wParam, long /*int*/ lParam) { NMLVDISPINFO plvfi = new NMLVDISPINFO (); OS.MoveMemory (plvfi, lParam, NMLVDISPINFO.sizeof); - boolean [] visible = display.columnVisible; - if (visible != null && !visible [plvfi.iSubItem]) { + if (columnVisible != null && !columnVisible [plvfi.iSubItem]) { break; } |