wineandroid: Implement desktop window proc using driver interface.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
Jacek Caban 2022-06-04 13:04:50 +02:00 committed by Alexandre Julliard
parent 2887655bbc
commit 6b8b981199
4 changed files with 5 additions and 7 deletions

View file

@ -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:

View file

@ -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;

View file

@ -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,

View file

@ -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)
{