Do not do screen work if refreshing is disabled.
Reimplement SetRedraw to cope with the changes.
This commit is contained in:
parent
c4e45d7f94
commit
5b8361463d
|
@ -1459,7 +1459,7 @@ static void LISTVIEW_UpdateScroll(LISTVIEW_INFO *infoPtr)
|
||||||
SCROLLINFO horzInfo, vertInfo;
|
SCROLLINFO horzInfo, vertInfo;
|
||||||
|
|
||||||
if (infoPtr->dwStyle & LVS_NOSCROLL) return;
|
if (infoPtr->dwStyle & LVS_NOSCROLL) return;
|
||||||
/*if (!is_redrawing(infoPtr)) return;*/
|
if (!is_redrawing(infoPtr)) return;
|
||||||
|
|
||||||
ZeroMemory(&horzInfo, sizeof(SCROLLINFO));
|
ZeroMemory(&horzInfo, sizeof(SCROLLINFO));
|
||||||
horzInfo.cbSize = sizeof(SCROLLINFO);
|
horzInfo.cbSize = sizeof(SCROLLINFO);
|
||||||
|
@ -3915,7 +3915,7 @@ static void LISTVIEW_ScrollColumns(LISTVIEW_INFO *infoPtr, INT nColumn, INT dx)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do not update screen if not in report mode */
|
/* do not update screen if not in report mode */
|
||||||
if ((infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT) return;
|
if (!is_redrawing(infoPtr) || (infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT) return;
|
||||||
|
|
||||||
/* if we have a focus, must first erase the focus rect */
|
/* if we have a focus, must first erase the focus rect */
|
||||||
if (infoPtr->bFocus) LISTVIEW_ShowFocusRect(infoPtr, FALSE);
|
if (infoPtr->bFocus) LISTVIEW_ShowFocusRect(infoPtr, FALSE);
|
||||||
|
@ -4029,7 +4029,7 @@ static void LISTVIEW_ScrollOnInsert(LISTVIEW_INFO *infoPtr, INT nItem, INT dir)
|
||||||
POINT Origin;
|
POINT Origin;
|
||||||
|
|
||||||
/* if we don't refresh, what's the point of scrolling? */
|
/* if we don't refresh, what's the point of scrolling? */
|
||||||
/*if (!is_redrawing(infoPtr)) return;*/
|
if (!is_redrawing(infoPtr)) return;
|
||||||
|
|
||||||
assert (abs(dir) == 1);
|
assert (abs(dir) == 1);
|
||||||
|
|
||||||
|
@ -7681,6 +7681,7 @@ static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc)
|
||||||
UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
|
UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
|
||||||
|
|
||||||
infoPtr->bFirstPaint = FALSE;
|
infoPtr->bFirstPaint = FALSE;
|
||||||
|
LISTVIEW_UpdateSize(infoPtr);
|
||||||
LISTVIEW_UpdateItemSize(infoPtr);
|
LISTVIEW_UpdateItemSize(infoPtr);
|
||||||
if (uView == LVS_ICON || uView == LVS_SMALLICON)
|
if (uView == LVS_ICON || uView == LVS_SMALLICON)
|
||||||
LISTVIEW_Arrange(infoPtr, LVA_DEFAULT);
|
LISTVIEW_Arrange(infoPtr, LVA_DEFAULT);
|
||||||
|
@ -7930,10 +7931,18 @@ static LRESULT LISTVIEW_SetFont(LISTVIEW_INFO *infoPtr, HFONT hFont, WORD fRedra
|
||||||
*/
|
*/
|
||||||
static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL bRedraw)
|
static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL bRedraw)
|
||||||
{
|
{
|
||||||
|
UINT uView = infoPtr->dwStyle & LVS_TYPEMASK;
|
||||||
|
|
||||||
infoPtr->bRedraw = bRedraw;
|
infoPtr->bRedraw = bRedraw;
|
||||||
if(bRedraw)
|
|
||||||
RedrawWindow(infoPtr->hwndSelf, NULL, 0,
|
if(!bRedraw) return 0;
|
||||||
RDW_INVALIDATE | RDW_FRAME | RDW_ERASE | RDW_ALLCHILDREN | RDW_ERASENOW);
|
|
||||||
|
LISTVIEW_UpdateSize(infoPtr);
|
||||||
|
if (uView == LVS_ICON || uView == LVS_SMALLICON)
|
||||||
|
LISTVIEW_Arrange(infoPtr, LVA_DEFAULT);
|
||||||
|
LISTVIEW_UpdateScroll(infoPtr);
|
||||||
|
LISTVIEW_InvalidateList(infoPtr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7956,6 +7965,8 @@ static LRESULT LISTVIEW_Size(LISTVIEW_INFO *infoPtr, int Width, int Height)
|
||||||
|
|
||||||
TRACE("(width=%d, height=%d)\n", Width, Height);
|
TRACE("(width=%d, height=%d)\n", Width, Height);
|
||||||
|
|
||||||
|
if (!is_redrawing(infoPtr)) return 0;
|
||||||
|
|
||||||
if (!LISTVIEW_UpdateSize(infoPtr)) return 0;
|
if (!LISTVIEW_UpdateSize(infoPtr)) return 0;
|
||||||
|
|
||||||
if ((infoPtr->dwStyle & LVS_AUTOARRANGE) && (uView == LVS_SMALLICON || uView == LVS_ICON))
|
if ((infoPtr->dwStyle & LVS_AUTOARRANGE) && (uView == LVS_SMALLICON || uView == LVS_ICON))
|
||||||
|
@ -8589,9 +8600,11 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
return LISTVIEW_MouseWheel(infoPtr, (short int)HIWORD(wParam));
|
return LISTVIEW_MouseWheel(infoPtr, (short int)HIWORD(wParam));
|
||||||
|
|
||||||
case WM_WINDOWPOSCHANGED:
|
case WM_WINDOWPOSCHANGED:
|
||||||
if (!(((WINDOWPOS *)lParam)->flags & SWP_NOSIZE)) {
|
if (!(((WINDOWPOS *)lParam)->flags & SWP_NOSIZE))
|
||||||
|
{
|
||||||
SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE |
|
SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE |
|
||||||
SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
|
SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
|
||||||
|
/* FIXME: why do we need this here? */
|
||||||
LISTVIEW_UpdateSize(infoPtr);
|
LISTVIEW_UpdateSize(infoPtr);
|
||||||
LISTVIEW_UpdateScroll(infoPtr);
|
LISTVIEW_UpdateScroll(infoPtr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue