Win32: Use a hacky workaround to prevent a rare hang when starting up.

This commit is contained in:
The Dax committed 2014-01-22 17:38:34 -05:00
1 parent f53ef47528
commit 97a5382b50
1 file changed
+10 -4
+10 -4
View File
@@ -188,14 +188,20 @@ void GenericListControl::Update()
void GenericListControl::ResizeColumns()
{
RECT rect;
GetClientRect(handle,&rect);
static volatile bool inResizeColumns = false;
if (inResizeColumns)
return;
inResizeColumns = true;
int totalListSize = rect.right-rect.left;
RECT rect;
GetClientRect(handle, &rect);
int totalListSize = rect.right - rect.left;
for (int i = 0; i < columnCount; i++)
{
ListView_SetColumnWidth(handle,i,columns[i].size * totalListSize);
ListView_SetColumnWidth(handle, i, columns[i].size * totalListSize);
}
inResizeColumns = false;
}
LRESULT CALLBACK GenericListControl::wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)