Author: jgardou
Date: Mon Nov 5 22:33:02 2012
New Revision: 57677
URL:
http://svn.reactos.org/svn/reactos?rev=57677&view=rev
Log:
[USER32]
- Avoid casting double to int.
Should fix MSC build
Modified:
trunk/reactos/win32ss/user/user32/controls/edit.c
trunk/reactos/win32ss/user/user32/windows/mdi.c
Modified: trunk/reactos/win32ss/user/user32/controls/edit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/contro…
==============================================================================
--- trunk/reactos/win32ss/user/user32/controls/edit.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/controls/edit.c [iso-8859-1] Mon Nov 5 22:33:02
2012
@@ -435,9 +435,9 @@
old_font = SelectObject(udc, es->font);
if (es->style & ES_PASSWORD)
- ScriptStringAnalyse(udc, &es->password_char, length, (1.5*length+16), -1,
SSA_LINK|SSA_FALLBACK|SSA_GLYPHS|SSA_PASSWORD, -1, NULL, NULL, NULL, NULL, NULL,
&es->ssa);
+ ScriptStringAnalyse(udc, &es->password_char, length, (3*length/2+16), -1,
SSA_LINK|SSA_FALLBACK|SSA_GLYPHS|SSA_PASSWORD, -1, NULL, NULL, NULL, NULL, NULL,
&es->ssa);
else
- ScriptStringAnalyse(udc, es->text, length, (1.5*length+16), -1,
SSA_LINK|SSA_FALLBACK|SSA_GLYPHS, -1, NULL, NULL, NULL, NULL, NULL, &es->ssa);
+ ScriptStringAnalyse(udc, es->text, length, (3*length/2+16), -1,
SSA_LINK|SSA_FALLBACK|SSA_GLYPHS, -1, NULL, NULL, NULL, NULL, NULL, &es->ssa);
if (es->font)
SelectObject(udc, old_font);
Modified: trunk/reactos/win32ss/user/user32/windows/mdi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/mdi.c [iso-8859-1] Mon Nov 5 22:33:02 2012
@@ -792,7 +792,7 @@
static void MDITile( HWND client, MDICLIENTINFO *ci, WPARAM wParam )
{
HWND *win_array;
- int i, total;
+ int i, total, rows, columns;
BOOL has_icons = FALSE;
if (ci->hwndChildMaximized)
@@ -803,7 +803,7 @@
if (!(win_array = WIN_ListChildren( client ))) return;
/* remove all the windows we don't want */
- for (i = total = 0; win_array[i]; i++)
+ for (i = total = rows = 0; win_array[i]; i++)
{
if (!IsWindowVisible( win_array[i] )) continue;
if (GetWindow( win_array[i], GW_OWNER )) continue; /* skip owned windows (icon
titles) */
@@ -813,6 +813,7 @@
continue;
}
if ((wParam & MDITILE_SKIPDISABLED) && !IsWindowEnabled( win_array[i]
)) continue;
+ if(total == (rows * (rows + 2))) rows++; /* total+1 == (rows+1)*(rows+1) */
win_array[total++] = win_array[i];
}
win_array[total] = 0;
@@ -824,11 +825,11 @@
HWND *pWnd = win_array;
RECT rect;
int x, y, xsize, ysize;
- int rows, columns, r, c, i;
+ int r, c, i;
GetClientRect(client,&rect);
- rows = (int) sqrt((double)total);
- columns = total / rows;
+ columns = total/rows;
+ //while(total < rows*columns) rows++;
if( wParam & MDITILE_HORIZONTAL ) /* version >= 3.1 */
{