winex11: 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-19 14:48:23 +02:00 committed by Alexandre Julliard
parent dfeb2d2474
commit 6a4ff4de66
3 changed files with 7 additions and 7 deletions

View File

@ -408,6 +408,7 @@ static const struct user_driver_funcs x11drv_funcs =
.pUpdateDisplayDevices = X11DRV_UpdateDisplayDevices,
.pCreateDesktopWindow = X11DRV_CreateDesktopWindow,
.pCreateWindow = X11DRV_CreateWindow,
.pDesktopWindowProc = X11DRV_DesktopWindowProc,
.pDestroyWindow = X11DRV_DestroyWindow,
.pFlashWindowEx = X11DRV_FlashWindowEx,
.pGetDC = X11DRV_GetDC,

View File

@ -1860,13 +1860,14 @@ BOOL X11DRV_CreateDesktopWindow( HWND hwnd )
}
static WNDPROC desktop_orig_wndproc;
#define WM_WINE_NOTIFY_ACTIVITY WM_USER
#define WM_WINE_DELETE_TAB (WM_USER + 1)
#define WM_WINE_ADD_TAB (WM_USER + 2)
static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
/**********************************************************************
* DesktopWindowProc (X11DRV.@)
*/
LRESULT X11DRV_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
{
switch (msg)
{
@ -1891,7 +1892,7 @@ static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp,
send_notify_message( (HWND)wp, WM_X11DRV_ADD_TAB, 0, 0 );
break;
}
return desktop_orig_wndproc( hwnd, msg, wp, lp );
return NtUserMessageCall( hwnd, msg, wp, lp, 0, NtUserDefWindowProc, FALSE );
}
/**********************************************************************
@ -1904,9 +1905,6 @@ BOOL X11DRV_CreateWindow( HWND hwnd )
struct x11drv_thread_data *data = x11drv_init_thread_data();
XSetWindowAttributes attr;
desktop_orig_wndproc = (WNDPROC)NtUserSetWindowLongPtr( hwnd, GWLP_WNDPROC,
(LONG_PTR)desktop_wndproc_wrapper, FALSE );
/* create the cursor clipping window */
attr.override_redirect = TRUE;
attr.event_mask = StructureNotifyMask | FocusChangeMask;

View File

@ -218,6 +218,7 @@ extern void X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device
BOOL force, void *param ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_CreateDesktopWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_CreateWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern LRESULT X11DRV_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) DECLSPEC_HIDDEN;
extern void X11DRV_DestroyWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern void X11DRV_FlashWindowEx( PFLASHWINFO pfinfo ) DECLSPEC_HIDDEN;
extern void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect,