winemac: Implement DesktopWindowProc driver entry point.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2022-05-20 14:09:13 +02:00 committed by Alexandre Julliard
parent fe52b067bf
commit b34018db20
3 changed files with 4 additions and 7 deletions

View File

@ -268,6 +268,7 @@ static const struct user_driver_funcs macdrv_funcs =
.pClipCursor = macdrv_ClipCursor,
.pCreateDesktopWindow = macdrv_CreateDesktopWindow,
.pCreateWindow = macdrv_CreateWindow,
.pDesktopWindowProc = macdrv_DesktopWindowProc,
.pDestroyCursorIcon = macdrv_DestroyCursorIcon,
.pDestroyWindow = macdrv_DestroyWindow,
.pEnumDisplaySettingsEx = macdrv_EnumDisplaySettingsEx,

View File

@ -137,6 +137,7 @@ extern void macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device
extern BOOL macdrv_ClipCursor(LPCRECT clip) DECLSPEC_HIDDEN;
extern BOOL macdrv_CreateDesktopWindow(HWND hwnd) DECLSPEC_HIDDEN;
extern BOOL macdrv_CreateWindow(HWND hwnd) DECLSPEC_HIDDEN;
extern LRESULT macdrv_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) DECLSPEC_HIDDEN;
extern void macdrv_DestroyWindow(HWND hwnd) DECLSPEC_HIDDEN;
extern void macdrv_SetFocus(HWND hwnd) DECLSPEC_HIDDEN;
extern void macdrv_SetLayeredWindowAttributes(HWND hwnd, COLORREF key, BYTE alpha,

View File

@ -1557,11 +1557,9 @@ BOOL macdrv_CreateDesktopWindow(HWND hwnd)
}
static WNDPROC desktop_orig_wndproc;
#define WM_WINE_NOTIFY_ACTIVITY WM_USER
static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
LRESULT macdrv_DesktopWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
{
switch (msg)
{
@ -1580,7 +1578,7 @@ static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp,
break;
}
}
return desktop_orig_wndproc( hwnd, msg, wp, lp );
return NtUserMessageCall(hwnd, msg, wp, lp, 0, NtUserDefWindowProc, FALSE);
}
/**********************************************************************
@ -1590,9 +1588,6 @@ BOOL macdrv_CreateWindow(HWND hwnd)
{
if (hwnd == GetDesktopWindow())
{
desktop_orig_wndproc = (WNDPROC)SetWindowLongPtrW( GetDesktopWindow(),
GWLP_WNDPROC, (LONG_PTR)desktop_wndproc_wrapper );
macdrv_init_clipboard();
}
return TRUE;