user32: Increase an initial buffer size from 32 to 128 hwnds for enumerated children. (RESEND)

Dmitry Timoshkov dmitry at codeweavers.com
Thu Mar 20 10:26:10 CDT 2008


Hello,

here is an updated patch, rebased to current git.
--

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:

Changelog:
    user32: Increase an initial buffer size from 32 to 128 hwnds 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 f0de769..d5d0267 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( HDESK desktop, 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