Skip to content
Snippets Groups Projects
Commit be89816e authored by Huw D. M. Davies's avatar Huw D. M. Davies Committed by Alexandre Julliard
Browse files

Avoid infinite loop in WINPOS_FindIconPos if the width of the parent

client area is less than the icon spacing.
parent c64ec4a9
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,8 @@ static POINT16 WINPOS_FindIconPos( WND* wndPtr, POINT16 pt )
y = rectParent.bottom;
for (;;)
{
for (x = rectParent.left; x <= rectParent.right-xspacing; x += xspacing)
x = rectParent.left;
do
{
/* Check if another icon already occupies this spot */
WND *childPtr = WIN_LockWndPtr(wndPtr->parent->child);
......@@ -159,7 +160,8 @@ static POINT16 WINPOS_FindIconPos( WND* wndPtr, POINT16 pt )
pt.y = y - (yspacing + GetSystemMetrics(SM_CYICON)) / 2;
return pt;
}
}
x += xspacing;
} while(x <= rectParent.right-xspacing);
y -= yspacing;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment