From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/user32/desktop.c | 1 + dlls/wineandroid.drv/android.h | 1 + dlls/wineandroid.drv/init.c | 1 + dlls/wineandroid.drv/window.c | 9 ++------- 4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/dlls/user32/desktop.c b/dlls/user32/desktop.c index f2905b0efac..ca000972bc4 100644 --- a/dlls/user32/desktop.c +++ b/dlls/user32/desktop.c @@ -96,6 +96,7 @@ LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lP { case WM_NCCREATE: case WM_NCCALCSIZE: + case WM_PARENTNOTIFY: return NtUserMessageCall( hwnd, message, wParam, lParam, 0, NtUserDesktopWindowProc, FALSE );
default: diff --git a/dlls/wineandroid.drv/android.h b/dlls/wineandroid.drv/android.h index 414374c6c01..91f6dc83791 100644 --- a/dlls/wineandroid.drv/android.h +++ b/dlls/wineandroid.drv/android.h @@ -88,6 +88,7 @@ extern void ANDROID_DestroyWindow( HWND hwnd ) DECLSPEC_HIDDEN; extern NTSTATUS ANDROID_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, const LARGE_INTEGER *timeout, DWORD mask, DWORD flags ) DECLSPEC_HIDDEN; +extern LRESULT ANDROID_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) DECLSPEC_HIDDEN; extern void ANDROID_SetCursor( HCURSOR handle ) DECLSPEC_HIDDEN; extern void ANDROID_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ) DECLSPEC_HIDDEN; diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c index dec53657ccb..694ec1bae9c 100644 --- a/dlls/wineandroid.drv/init.c +++ b/dlls/wineandroid.drv/init.c @@ -343,6 +343,7 @@ static const struct user_driver_funcs android_drv_funcs = .pEnumDisplaySettingsEx = ANDROID_EnumDisplaySettingsEx, .pUpdateDisplayDevices = ANDROID_UpdateDisplayDevices, .pCreateWindow = ANDROID_CreateWindow, + .pDesktopWindowProc = ANDROID_DesktopWindowProc, .pDestroyWindow = ANDROID_DestroyWindow, .pMsgWaitForMultipleObjectsEx = ANDROID_MsgWaitForMultipleObjectsEx, .pSetCapture = ANDROID_SetCapture, diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index c738bc0527d..4b9fe5cb3ce 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -1186,9 +1186,7 @@ static int get_cursor_system_id( const ICONINFOEXW *info ) }
-static WNDPROC desktop_orig_wndproc; - -static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) +LRESULT ANDROID_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) { switch (msg) { @@ -1196,7 +1194,7 @@ static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, if (LOWORD(wp) == WM_DESTROY) destroy_ioctl_window( (HWND)lp, FALSE ); break; } - return desktop_orig_wndproc( hwnd, msg, wp, lp ); + return NtUserMessageCall( hwnd, msg, wp, lp, 0, NtUserDefWindowProc, FALSE ); }
@@ -1655,9 +1653,6 @@ LRESULT ANDROID_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) */ BOOL CDECL ANDROID_create_desktop( UINT width, UINT height ) { - desktop_orig_wndproc = (WNDPROC)SetWindowLongPtrW( GetDesktopWindow(), GWLP_WNDPROC, - (LONG_PTR)desktop_wndproc_wrapper ); - /* wait until we receive the surface changed event */ while (!screen_width) {