mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 02:13:38 +00:00
win32u: Allow separately storing the internal pixel format set by WGL_WINE_pixel_format_passthrough.
This commit is contained in:
parent
8da023fe8c
commit
c2018ff466
|
@ -90,6 +90,7 @@ typedef struct tagWND
|
|||
struct window_surface *surface; /* Window surface if any */
|
||||
struct tagDIALOGINFO *dlgInfo; /* Dialog additional info (dialogs only) */
|
||||
int pixel_format; /* Pixel format set by the graphics driver */
|
||||
int internal_pixel_format; /* Internal pixel format set via WGL_WINE_pixel_format_passthrough */
|
||||
int cbWndExtra; /* class cbWndExtra at window creation */
|
||||
DWORD_PTR userdata; /* User private data */
|
||||
DWORD wExtra[1]; /* Window extra bytes */
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
BOOL win32u_set_window_pixel_format( HWND hwnd, int format )
|
||||
BOOL win32u_set_window_pixel_format( HWND hwnd, int format, BOOL internal )
|
||||
{
|
||||
WND *win = get_win_ptr( hwnd );
|
||||
|
||||
|
@ -1450,7 +1450,10 @@ BOOL win32u_set_window_pixel_format( HWND hwnd, int format )
|
|||
WARN( "setting format %d on win %p not supported\n", format, hwnd );
|
||||
return FALSE;
|
||||
}
|
||||
win->pixel_format = format;
|
||||
if (internal)
|
||||
win->internal_pixel_format = format;
|
||||
else
|
||||
win->pixel_format = format;
|
||||
release_win_ptr( win );
|
||||
|
||||
update_window_state( hwnd );
|
||||
|
@ -1852,7 +1855,8 @@ static BOOL apply_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
|
|||
wine_server_add_data( req, extra_rects, sizeof(extra_rects) );
|
||||
}
|
||||
if (new_surface) req->paint_flags |= SET_WINPOS_PAINT_SURFACE;
|
||||
if (win->pixel_format) req->paint_flags |= SET_WINPOS_PIXEL_FORMAT;
|
||||
if (win->pixel_format || win->internal_pixel_format)
|
||||
req->paint_flags |= SET_WINPOS_PIXEL_FORMAT;
|
||||
|
||||
if ((ret = !wine_server_call( req )))
|
||||
{
|
||||
|
|
|
@ -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 (win32u_set_window_pixel_format( hwnd, format )) return TRUE;
|
||||
if (win32u_set_window_pixel_format( hwnd, format, FALSE )) return TRUE;
|
||||
destroy_gl_drawable( hwnd );
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -1587,7 +1587,8 @@ 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) win32u_set_window_pixel_format(hwnd, fmt);
|
||||
if (ret && gl_surface_mode == GL_SURFACE_BEHIND)
|
||||
win32u_set_window_pixel_format(hwnd, fmt, FALSE);
|
||||
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 );
|
||||
|
||||
win32u_set_window_pixel_format( hwnd, pixel_format_index( format ));
|
||||
win32u_set_window_pixel_format( hwnd, pixel_format_index( format ), FALSE );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -1512,7 +1512,7 @@ void set_gl_drawable_parent( HWND hwnd, HWND parent )
|
|||
else
|
||||
{
|
||||
destroy_gl_drawable( hwnd );
|
||||
win32u_set_window_pixel_format( hwnd, 0 );
|
||||
win32u_set_window_pixel_format( hwnd, 0, FALSE );
|
||||
}
|
||||
release_gl_drawable( old );
|
||||
}
|
||||
|
|
|
@ -339,7 +339,7 @@ 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 );
|
||||
extern BOOL win32u_set_window_pixel_format( HWND hwnd, int format, BOOL internal );
|
||||
extern int win32u_get_window_pixel_format( HWND hwnd );
|
||||
|
||||
#endif /* WINE_UNIX_LIB */
|
||||
|
|
Loading…
Reference in a new issue