user32: Increase an initial size for enumerated children

Dmitry Timoshkov dmitry at codeweavers.com
Wed Mar 19 08:22:12 CDT 2008


Hello,

while looking at a lot of Photoshop CS2 logs I noticied that almost every
window related operation needs to call server twice, that's because there are
about 100 windows to enumerate, but we start only with 32, and all top level
windows in CS2 are WS_POPUP with parent set to desktop.

Changelog:
    user32: Increase an initial size for enumerated children.
---
 dlls/user32/win.c    |    2 +-
 dlls/user32/winpos.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 6d065be..c184c15 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -215,7 +215,7 @@ static WND *free_window_handle( HWND hwnd )
 static HWND *list_window_children( HWND hwnd, LPCWSTR class, DWORD tid )
 {
     HWND *list;
-    int size = 32;
+    int size = 128;
 
     for (;;)
     {
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 6ee3508..35ac5b0 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -259,7 +259,7 @@ BOOL WINAPI ScreenToClient( HWND hwnd, LPPOINT lppnt )
 static HWND *list_children_from_point( HWND hwnd, POINT pt )
 {
     HWND *list;
-    int size = 32;
+    int size = 128;
 
     for (;;)
     {
-- 
1.5.4.3






More information about the wine-patches mailing list