Commit b545ca0f authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

win32u: Make NtUserSetWindowPixelFormat() into a proper export.

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.
parent 606e0c19
......@@ -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 );
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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 );
}
......
......@@ -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 );
......
......@@ -339,6 +339,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 */
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