Commit 6a4ff4de authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winex11: Implement DesktopWindowProc driver entry point.

parent dfeb2d24
...@@ -408,6 +408,7 @@ static const struct user_driver_funcs x11drv_funcs = ...@@ -408,6 +408,7 @@ static const struct user_driver_funcs x11drv_funcs =
.pUpdateDisplayDevices = X11DRV_UpdateDisplayDevices, .pUpdateDisplayDevices = X11DRV_UpdateDisplayDevices,
.pCreateDesktopWindow = X11DRV_CreateDesktopWindow, .pCreateDesktopWindow = X11DRV_CreateDesktopWindow,
.pCreateWindow = X11DRV_CreateWindow, .pCreateWindow = X11DRV_CreateWindow,
.pDesktopWindowProc = X11DRV_DesktopWindowProc,
.pDestroyWindow = X11DRV_DestroyWindow, .pDestroyWindow = X11DRV_DestroyWindow,
.pFlashWindowEx = X11DRV_FlashWindowEx, .pFlashWindowEx = X11DRV_FlashWindowEx,
.pGetDC = X11DRV_GetDC, .pGetDC = X11DRV_GetDC,
......
...@@ -1860,13 +1860,14 @@ BOOL X11DRV_CreateDesktopWindow( HWND hwnd ) ...@@ -1860,13 +1860,14 @@ BOOL X11DRV_CreateDesktopWindow( HWND hwnd )
} }
static WNDPROC desktop_orig_wndproc;
#define WM_WINE_NOTIFY_ACTIVITY WM_USER #define WM_WINE_NOTIFY_ACTIVITY WM_USER
#define WM_WINE_DELETE_TAB (WM_USER + 1) #define WM_WINE_DELETE_TAB (WM_USER + 1)
#define WM_WINE_ADD_TAB (WM_USER + 2) #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) switch (msg)
{ {
...@@ -1891,7 +1892,7 @@ static LRESULT CALLBACK desktop_wndproc_wrapper( HWND hwnd, UINT msg, WPARAM wp, ...@@ -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 ); send_notify_message( (HWND)wp, WM_X11DRV_ADD_TAB, 0, 0 );
break; 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 ) ...@@ -1904,9 +1905,6 @@ BOOL X11DRV_CreateWindow( HWND hwnd )
struct x11drv_thread_data *data = x11drv_init_thread_data(); struct x11drv_thread_data *data = x11drv_init_thread_data();
XSetWindowAttributes attr; XSetWindowAttributes attr;
desktop_orig_wndproc = (WNDPROC)NtUserSetWindowLongPtr( hwnd, GWLP_WNDPROC,
(LONG_PTR)desktop_wndproc_wrapper, FALSE );
/* create the cursor clipping window */ /* create the cursor clipping window */
attr.override_redirect = TRUE; attr.override_redirect = TRUE;
attr.event_mask = StructureNotifyMask | FocusChangeMask; attr.event_mask = StructureNotifyMask | FocusChangeMask;
......
...@@ -218,6 +218,7 @@ extern void X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device ...@@ -218,6 +218,7 @@ extern void X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device
BOOL force, void *param ) DECLSPEC_HIDDEN; BOOL force, void *param ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_CreateDesktopWindow( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL X11DRV_CreateDesktopWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_CreateWindow( 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_DestroyWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern void X11DRV_FlashWindowEx( PFLASHWINFO pfinfo ) DECLSPEC_HIDDEN; extern void X11DRV_FlashWindowEx( PFLASHWINFO pfinfo ) DECLSPEC_HIDDEN;
extern void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, extern void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment