Jacek Caban : win32u: Introduce DesktopWindowProc driver entry point.

Alexandre Julliard julliard at winehq.org
Thu May 19 16:15:13 CDT 2022


Module: wine
Branch: master
Commit: dfeb2d2474292b65795f431e2864b7364abcfdfe
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=dfeb2d2474292b65795f431e2864b7364abcfdfe

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu May 19 14:27:36 2022 +0200

win32u: Introduce DesktopWindowProc driver entry point.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/win32u/defwnd.c      | 4 ++++
 dlls/win32u/driver.c      | 7 +++++++
 include/wine/gdi_driver.h | 3 ++-
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c
index 444abd1657f..9b4edc90eaa 100644
--- a/dlls/win32u/defwnd.c
+++ b/dlls/win32u/defwnd.c
@@ -417,6 +417,10 @@ LRESULT desktop_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
     }
     case WM_NCCALCSIZE:
         return 0;
+
+    default:
+        if (msg >= WM_USER && hwnd == get_desktop_window())
+            return user_driver->pDesktopWindowProc( hwnd, msg, wparam, lparam );
     }
 
     return default_window_proc( hwnd, msg, wparam, lparam, FALSE );
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c
index 9185069208a..4dac0760464 100644
--- a/dlls/win32u/driver.c
+++ b/dlls/win32u/driver.c
@@ -721,6 +721,11 @@ static SHORT nulldrv_VkKeyScanEx( WCHAR ch, HKL layout )
     return -256; /* use default implementation */
 }
 
+static LRESULT nulldrv_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
+{
+    return default_window_proc( hwnd, msg, wparam, lparam, FALSE );
+}
+
 static void nulldrv_DestroyCursorIcon( HCURSOR cursor )
 {
 }
@@ -1175,6 +1180,7 @@ static const struct user_driver_funcs lazy_load_driver =
     /* windowing functions */
     loaderdrv_CreateDesktopWindow,
     loaderdrv_CreateWindow,
+    nulldrv_DesktopWindowProc,
     nulldrv_DestroyWindow,
     loaderdrv_FlashWindowEx,
     loaderdrv_GetDC,
@@ -1247,6 +1253,7 @@ void CDECL __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT v
     SET_USER_FUNC(UpdateDisplayDevices);
     SET_USER_FUNC(CreateDesktopWindow);
     SET_USER_FUNC(CreateWindow);
+    SET_USER_FUNC(DesktopWindowProc);
     SET_USER_FUNC(DestroyWindow);
     SET_USER_FUNC(FlashWindowEx);
     SET_USER_FUNC(GetDC);
diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h
index 82bac557c2a..21fff4d4aa2 100644
--- a/include/wine/gdi_driver.h
+++ b/include/wine/gdi_driver.h
@@ -168,7 +168,7 @@ struct gdi_dc_funcs
 };
 
 /* increment this when you change the DC function table */
-#define WINE_GDI_DRIVER_VERSION 78
+#define WINE_GDI_DRIVER_VERSION 79
 
 #define GDI_PRIORITY_NULL_DRV        0  /* null driver */
 #define GDI_PRIORITY_FONT_DRV      100  /* any font driver */
@@ -299,6 +299,7 @@ struct user_driver_funcs
     /* windowing functions */
     BOOL    (*pCreateDesktopWindow)(HWND);
     BOOL    (*pCreateWindow)(HWND);
+    LRESULT (*pDesktopWindowProc)(HWND,UINT,WPARAM,LPARAM);
     void    (*pDestroyWindow)(HWND);
     void    (*pFlashWindowEx)(FLASHWINFO*);
     void    (*pGetDC)(HDC,HWND,HWND,const RECT *,const RECT *,DWORD);




More information about the wine-cvs mailing list