From: Zebediah Figura zfigura@codeweavers.com
This is simpler in general, given that this function is no longer used from user-space. In this particular case, the secondary purpose is to allow easily adding arguments to the function. --- dlls/win32u/window.c | 5 +---- dlls/wineandroid.drv/opengl.c | 2 +- dlls/winemac.drv/opengl.c | 2 +- dlls/winex11.drv/opengl.c | 4 ++-- include/ntuser.h | 6 ------ include/wine/gdi_driver.h | 2 ++ 6 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index a3ff0647dcd..cd8b6583249 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1441,7 +1441,7 @@ LONG_PTR WINAPI NtUserSetWindowLongPtr( HWND hwnd, INT offset, LONG_PTR newval, return set_window_long( hwnd, offset, sizeof(LONG_PTR), newval, ansi ); }
-static BOOL set_window_pixel_format( HWND hwnd, int format ) +BOOL win32u_set_window_pixel_format( HWND hwnd, int format ) { WND *win = get_win_ptr( hwnd );
@@ -5555,9 +5555,6 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code ) case NtUserCallHwndParam_SetWindowContextHelpId: return set_window_context_help_id( hwnd, param );
- case NtUserCallHwndParam_SetWindowPixelFormat: - return set_window_pixel_format( hwnd, param ); - case NtUserCallHwndParam_ShowOwnedPopups: return show_owned_popups( hwnd, param );
diff --git a/dlls/wineandroid.drv/opengl.c b/dlls/wineandroid.drv/opengl.c index a930e249ba5..41df3d3c09c 100644 --- a/dlls/wineandroid.drv/opengl.c +++ b/dlls/wineandroid.drv/opengl.c @@ -242,7 +242,7 @@ static BOOL set_pixel_format( HDC hdc, int format, BOOL allow_change ) release_gl_drawable( gl );
if (prev && prev != format && !allow_change) return FALSE; - if (NtUserSetWindowPixelFormat( hwnd, format )) return TRUE; + if (win32u_set_window_pixel_format( hwnd, format )) return TRUE; destroy_gl_drawable( hwnd ); return FALSE; } diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index ff78b183360..7251745258a 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -1588,7 +1588,7 @@ static BOOL set_pixel_format(HDC hdc, int fmt, BOOL allow_reset)
done: release_win_data(data); - if (ret && gl_surface_mode == GL_SURFACE_BEHIND) NtUserSetWindowPixelFormat(hwnd, fmt); + if (ret && gl_surface_mode == GL_SURFACE_BEHIND) win32u_set_window_pixel_format(hwnd, fmt); return ret; }
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index c44e9579cb6..783ac5f3a9d 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1402,7 +1402,7 @@ static BOOL set_win_format( HWND hwnd, const struct wgl_pixel_format *format, BO XFlush( gdi_display ); release_gl_drawable( gl );
- NtUserSetWindowPixelFormat( hwnd, pixel_format_index( format )); + win32u_set_window_pixel_format( hwnd, pixel_format_index( format )); return TRUE; }
@@ -1512,7 +1512,7 @@ void set_gl_drawable_parent( HWND hwnd, HWND parent ) else { destroy_gl_drawable( hwnd ); - NtUserSetWindowPixelFormat( hwnd, 0 ); + win32u_set_window_pixel_format( hwnd, 0 ); } release_gl_drawable( old ); } diff --git a/include/ntuser.h b/include/ntuser.h index 3b821f0c9fe..35ead9750c6 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -1331,7 +1331,6 @@ enum NtUserCallHwndParam_SetDialogInfo, NtUserCallHwndParam_SetMDIClientInfo, NtUserCallHwndParam_SetWindowContextHelpId, - NtUserCallHwndParam_SetWindowPixelFormat, NtUserCallHwndParam_ShowOwnedPopups, /* temporary exports */ NtUserSetWindowStyle, @@ -1498,11 +1497,6 @@ static inline BOOL NtUserSetWindowContextHelpId( HWND hwnd, DWORD id ) return NtUserCallHwndParam( hwnd, id, NtUserCallHwndParam_SetWindowContextHelpId ); }
-static inline BOOL NtUserSetWindowPixelFormat( HWND hwnd, int format ) -{ - return NtUserCallHwndParam( hwnd, format, NtUserCallHwndParam_SetWindowPixelFormat ); -} - static inline BOOL NtUserShowOwnedPopups( HWND hwnd, BOOL show ) { return NtUserCallHwndParam( hwnd, show, NtUserCallHwndParam_ShowOwnedPopups ); diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 3de7e20af9a..3590e0bede5 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -338,6 +338,8 @@ struct user_driver_funcs
extern void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version );
+extern BOOL win32u_set_window_pixel_format( HWND hwnd, int format ); + #endif /* WINE_UNIX_LIB */
#endif /* __WINE_WINE_GDI_DRIVER_H */