Alexandre Julliard : user32: Post notification to the desktop window for window creation/activation.
Alexandre Julliard
julliard at winehq.org
Tue May 31 10:42:52 CDT 2016
Module: wine
Branch: master
Commit: 596c16cc13f9f2af24d0e8e88519de9f1d1a3a4e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=596c16cc13f9f2af24d0e8e88519de9f1d1a3a4e
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue May 31 13:53:15 2016 +0900
user32: Post notification to the desktop window for window creation/activation.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/nonclient.c | 9 +++++++++
dlls/user32/win.c | 3 +++
2 files changed, 12 insertions(+)
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c
index 3352e46..a9de812 100644
--- a/dlls/user32/nonclient.c
+++ b/dlls/user32/nonclient.c
@@ -1102,6 +1102,7 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip )
*/
LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip)
{
+ HWND parent = GetAncestor( hwnd, GA_PARENT );
DWORD dwStyle = GetWindowLongW( hwnd, GWL_STYLE );
if( dwStyle & WS_VISIBLE )
@@ -1110,6 +1111,9 @@ LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip)
WINPOS_RedrawIconTitle( hwnd );
else
NC_DoNCPaint( hwnd, clip );
+
+ if (parent == GetDesktopWindow())
+ PostMessageW( parent, WM_PARENTNOTIFY, WM_NCPAINT, (LPARAM)hwnd );
}
return 0;
}
@@ -1122,6 +1126,7 @@ LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip)
*/
LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam )
{
+ HWND parent;
WND* wndPtr = WIN_GetPtr( hwnd );
if (!wndPtr || wndPtr == WND_OTHER_PROCESS) return FALSE;
@@ -1133,6 +1138,7 @@ LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam )
*/
if (wParam) wndPtr->flags |= WIN_NCACTIVATED;
else wndPtr->flags &= ~WIN_NCACTIVATED;
+ parent = wndPtr->parent;
WIN_ReleasePtr( wndPtr );
/* This isn't documented but is reproducible in at least XP SP2 and
@@ -1144,6 +1150,9 @@ LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam )
WINPOS_RedrawIconTitle( hwnd );
else
NC_DoNCPaint( hwnd, (HRGN)1 );
+
+ if (parent == GetDesktopWindow())
+ PostMessageW( parent, WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd );
}
return TRUE;
diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 8474e2d..eb1aeda 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1659,6 +1659,9 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
send_parent_notify( hwnd, WM_CREATE );
if (!IsWindow( hwnd )) return 0;
+ if (parent == GetDesktopWindow())
+ PostMessageW( parent, WM_PARENTNOTIFY, WM_CREATE, (LPARAM)hwnd );
+
if (cs->style & WS_VISIBLE)
{
if (cs->style & WS_MAXIMIZE)
More information about the wine-cvs
mailing list