Module: wine Branch: master Commit: 53393b0f1c88a33923d30a98d1b65d5130761f65 URL: http://source.winehq.org/git/wine.git/?a=commit;h=53393b0f1c88a33923d30a98d1...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Dec 17 13:01:11 2009 +0100
user32: Pre-allocate the window procedure for the MDI client class.
---
dlls/user32/controls.h | 1 + dlls/user32/mdi.c | 24 ++---------------------- dlls/user32/winproc.c | 13 +++++++++++++ 3 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 35be645..2df4f45 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -38,6 +38,7 @@ enum builtin_winprocs WINPROC_DIALOG, WINPROC_EDIT, WINPROC_LISTBOX, + WINPROC_MDICLIENT, WINPROC_SCROLLBAR, WINPROC_STATIC, NB_BUILTIN_WINPROCS diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index e1910f8..fcfbd27 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -150,8 +150,6 @@ static LONG MDI_ChildActivate( HWND, HWND ); static LRESULT MDI_RefreshMenu(MDICLIENTINFO *);
static HWND MDI_MoreWindowsDialog(HWND); -static LRESULT WINAPI MDIClientWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ); -static LRESULT WINAPI MDIClientWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam );
/* -------- Miscellaneous service functions ---------- * @@ -188,8 +186,8 @@ const struct builtin_class_descr MDICLIENT_builtin_class = { mdiclientW, /* name */ 0, /* style */ - MDIClientWndProcA, /* procA */ - MDIClientWndProcW, /* procW */ + NULL, /* procA */ + BUILTIN_WINPROC(WINPROC_MDICLIENT), /* procW */ sizeof(MDICLIENTINFO), /* extra */ IDC_ARROW, /* cursor */ (HBRUSH)(COLOR_APPWORKSPACE+1) /* brush */ @@ -1272,24 +1270,6 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM }
/*********************************************************************** - * MDIClientWndProcA - */ -static LRESULT WINAPI MDIClientWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) -{ - if (!IsWindow(hwnd)) return 0; - return wow_handlers.mdiclient_proc( hwnd, message, wParam, lParam, FALSE ); -} - -/*********************************************************************** - * MDIClientWndProcW - */ -static LRESULT WINAPI MDIClientWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) -{ - if (!IsWindow(hwnd)) return 0; - return wow_handlers.mdiclient_proc( hwnd, message, wParam, lParam, TRUE ); -} - -/*********************************************************************** * DefFrameProcA (USER32.@) */ LRESULT WINAPI DefFrameProcA( HWND hwnd, HWND hwndMDIClient, diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 89a1ae9..d71dca2 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -57,6 +57,8 @@ LRESULT WINAPI EditWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) static LRESULT WINAPI EditWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ListBoxWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ListBoxWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); +static LRESULT WINAPI MDIClientWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); +static LRESULT WINAPI MDIClientWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI StaticWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); @@ -69,6 +71,7 @@ static WINDOWPROC winproc_array[MAX_WINPROCS] = { DefDlgProcA, DefDlgProcW }, /* WINPROC_DIALOG */ { EditWndProcA, EditWndProcW }, /* WINPROC_EDIT */ { ListBoxWndProcA, ListBoxWndProcW }, /* WINPROC_LISTBOX */ + { MDIClientWndProcA, MDIClientWndProcW }, /* WINPROC_MDICLIENT */ { ScrollBarWndProcA, ScrollBarWndProcW }, /* WINPROC_SCROLLBAR */ { StaticWndProcA, StaticWndProcW }, /* WINPROC_STATIC */ }; @@ -1096,6 +1099,16 @@ static LRESULT WINAPI ListBoxWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARA return wow_handlers.listbox_proc( hwnd, msg, wParam, lParam, TRUE ); }
+static LRESULT WINAPI MDIClientWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + return wow_handlers.mdiclient_proc( hwnd, msg, wParam, lParam, FALSE ); +} + +static LRESULT WINAPI MDIClientWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + return wow_handlers.mdiclient_proc( hwnd, msg, wParam, lParam, TRUE ); +} + static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { return wow_handlers.scrollbar_proc( hwnd, msg, wParam, lParam, FALSE );