Commit e41a4828 authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Add a Wine-specific entry point to set the pixel format of a window.

parent 3d73e0a3
......@@ -779,3 +779,4 @@
# or 'wine_' (for user-visible functions) to avoid namespace conflicts.
#
@ cdecl __wine_send_input(long ptr)
@ cdecl __wine_set_pixel_format(long long)
......@@ -3592,6 +3592,21 @@ BOOL WINAPI SwitchDesktop( HDESK hDesktop)
return TRUE;
}
/***********************************************************************
* __wine_set_pixel_format
*/
BOOL CDECL __wine_set_pixel_format( HWND hwnd, int format )
{
RECT window_rect, client_rect;
WIN_GetRectangles( hwnd, COORDS_PARENT, &window_rect, &client_rect );
return set_window_pos( hwnd, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE |
SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW,
&window_rect, &client_rect, NULL );
}
/*****************************************************************************
* SetLayeredWindowAttributes (USER32.@)
*/
......
......@@ -1286,6 +1286,8 @@ static BOOL set_win_format( HWND hwnd, const struct wgl_pixel_format *format )
free_gl_drawable( prev );
XSaveContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char *)gl );
LeaveCriticalSection( &context_section );
__wine_set_pixel_format( hwnd, pixel_format_index( format ));
return TRUE;
}
......
......@@ -2853,5 +2853,6 @@ struct opengl_funcs
USE_GL_FUNC(glViewport)
extern struct opengl_funcs * CDECL __wine_get_wgl_driver( HDC hdc, UINT version );
extern BOOL CDECL __wine_set_pixel_format( HWND hwnd, int format );
#endif /* __WINE_WGL_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