Skip to content

Commit d002362

Browse files
committed
Fix listview redraw issue
1 parent 4086cd4 commit d002362

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

ProcessHacker/chproc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ static VOID PhpRefreshProcessList(
8383

8484
lvHandle = Context->ListViewHandle;
8585

86-
ListView_DeleteAllItems(lvHandle);
87-
ImageList_RemoveAll(Context->ImageList);
88-
8986
if (!NT_SUCCESS(status = PhEnumProcesses(&processes)))
9087
{
9188
PhShowStatus(hwndDlg, L"Unable to enumerate processes", status, 0);
@@ -94,6 +91,9 @@ static VOID PhpRefreshProcessList(
9491

9592
ExtendedListView_SetRedraw(lvHandle, FALSE);
9693

94+
ListView_DeleteAllItems(lvHandle);
95+
ImageList_RemoveAll(Context->ImageList);
96+
9797
process = PH_FIRST_PROCESS(processes);
9898

9999
do

ProcessHacker/gdihndl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ VOID PhpRefreshGdiHandles(
236236

237237
lvHandle = GetDlgItem(hwndDlg, IDC_LIST);
238238

239-
ListView_DeleteAllItems(lvHandle);
240239
ExtendedListView_SetRedraw(lvHandle, FALSE);
240+
ListView_DeleteAllItems(lvHandle);
241241

242242
for (i = 0; i < Context->List->Count; i++)
243243
{

ProcessHacker/hidnproc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ static INT_PTR CALLBACK PhpHiddenProcessesDlgProc(
221221
PhDereferenceObject(ProcessesList);
222222
}
223223

224-
ListView_DeleteAllItems(PhHiddenProcessesListViewHandle);
225-
226224
ProcessesList = PhCreateList(40);
227225

228226
ProcessesMethod =
@@ -233,6 +231,7 @@ static INT_PTR CALLBACK PhpHiddenProcessesDlgProc(
233231
NumberOfTerminatedProcesses = 0;
234232

235233
ExtendedListView_SetRedraw(PhHiddenProcessesListViewHandle, FALSE);
234+
ListView_DeleteAllItems(PhHiddenProcessesListViewHandle);
236235
status = PhEnumHiddenProcesses(
237236
ProcessesMethod,
238237
PhpHiddenProcessesCallback,

ProcessHacker/thrdstk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ static NTSTATUS PhpRefreshThreadStack(
450450
ThreadStackContext->List = ThreadStackContext->NewList;
451451
ThreadStackContext->NewList = PhCreateList(10);
452452

453-
ListView_DeleteAllItems(ThreadStackContext->ListViewHandle);
454453
SendMessage(ThreadStackContext->ListViewHandle, WM_SETREDRAW, FALSE, 0);
454+
ListView_DeleteAllItems(ThreadStackContext->ListViewHandle);
455455

456456
for (i = 0; i < ThreadStackContext->List->Count; i++)
457457
{

0 commit comments

Comments
 (0)