mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 00:31:27 +00:00
[User32]
- Fix crash by use of MDI container rules. - Patch by Michael Müller: Preserve beginning of extra data for MDI windows. - Patch by Jacek Caban : Ignore WM_CHILDACTIVATE on disabled windows in DefMDIChildProc. - CORE-10912 Wine Staging 1.9.4 svn path=/trunk/; revision=71059
This commit is contained in:
parent
b0c749c4ea
commit
bc08222791
2 changed files with 16 additions and 5 deletions
|
@ -731,6 +731,15 @@ typedef struct _SBWND
|
||||||
SBCALC SBCalc;
|
SBCALC SBCalc;
|
||||||
} SBWND, *PSBWND;
|
} SBWND, *PSBWND;
|
||||||
|
|
||||||
|
typedef struct _MDIWND
|
||||||
|
{
|
||||||
|
WND wnd;
|
||||||
|
DWORD dwReserved;
|
||||||
|
PVOID pmdi;
|
||||||
|
} MDIWND, *PMDIWND;
|
||||||
|
|
||||||
|
#define GWLP_MDIWND 4
|
||||||
|
|
||||||
typedef struct _MENUWND
|
typedef struct _MENUWND
|
||||||
{
|
{
|
||||||
WND wnd;
|
WND wnd;
|
||||||
|
|
|
@ -112,6 +112,7 @@ typedef struct
|
||||||
* states it must keep coherency with USER32 on its own. This is true for
|
* states it must keep coherency with USER32 on its own. This is true for
|
||||||
* Windows as well.
|
* Windows as well.
|
||||||
*/
|
*/
|
||||||
|
LONG reserved;
|
||||||
UINT nActiveChildren;
|
UINT nActiveChildren;
|
||||||
HWND hwndChildMaximized;
|
HWND hwndChildMaximized;
|
||||||
HWND hwndActiveChild;
|
HWND hwndActiveChild;
|
||||||
|
@ -216,7 +217,7 @@ const struct builtin_class_descr MDICLIENT_builtin_class =
|
||||||
0, /* style */
|
0, /* style */
|
||||||
MDIClientWndProcA, /* procA */
|
MDIClientWndProcA, /* procA */
|
||||||
MDIClientWndProcW, /* procW */
|
MDIClientWndProcW, /* procW */
|
||||||
sizeof(MDICLIENTINFO), /* extra */
|
sizeof(MDIWND), /* extra */
|
||||||
IDC_ARROW, /* cursor */
|
IDC_ARROW, /* cursor */
|
||||||
(HBRUSH)(COLOR_APPWORKSPACE+1) /* brush */
|
(HBRUSH)(COLOR_APPWORKSPACE+1) /* brush */
|
||||||
};
|
};
|
||||||
|
@ -225,7 +226,7 @@ const struct builtin_class_descr MDICLIENT_builtin_class =
|
||||||
static MDICLIENTINFO *get_client_info( HWND client )
|
static MDICLIENTINFO *get_client_info( HWND client )
|
||||||
{
|
{
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
return (MDICLIENTINFO *)GetWindowLongPtr(client, 0);
|
return (MDICLIENTINFO *)GetWindowLongPtr(client, GWLP_MDIWND);
|
||||||
#else
|
#else
|
||||||
MDICLIENTINFO *ret = NULL;
|
MDICLIENTINFO *ret = NULL;
|
||||||
WND *win = WIN_GetPtr( client );
|
WND *win = WIN_GetPtr( client );
|
||||||
|
@ -1123,7 +1124,7 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam,
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
if (!(ci = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ci))))
|
if (!(ci = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ci))))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
SetWindowLongPtrW( hwnd, 0, (LONG_PTR)ci );
|
SetWindowLongPtrW( hwnd, GWLP_MDIWND, (LONG_PTR)ci );
|
||||||
ci->hBmpClose = 0;
|
ci->hBmpClose = 0;
|
||||||
NtUserSetWindowFNID( hwnd, FNID_MDICLIENT); // wine uses WIN_ISMDICLIENT
|
NtUserSetWindowFNID( hwnd, FNID_MDICLIENT); // wine uses WIN_ISMDICLIENT
|
||||||
#else
|
#else
|
||||||
|
@ -1174,7 +1175,7 @@ LRESULT WINAPI MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam,
|
||||||
HeapFree( GetProcessHeap(), 0, ci->frameTitle );
|
HeapFree( GetProcessHeap(), 0, ci->frameTitle );
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
HeapFree( GetProcessHeap(), 0, ci );
|
HeapFree( GetProcessHeap(), 0, ci );
|
||||||
SetWindowLongPtrW( hwnd, 0, 0 );
|
SetWindowLongPtrW( hwnd, GWLP_MDIWND, 0 );
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1592,6 +1593,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_CHILDACTIVATE:
|
case WM_CHILDACTIVATE:
|
||||||
|
if (IsWindowEnabled( hwnd ))
|
||||||
MDI_ChildActivate( client, hwnd );
|
MDI_ChildActivate( client, hwnd );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue