This wine-specific extension will allow us to correctly implement fullscreen-exclusive windows without manipulating the window styles.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/opengl32/make_opengl | 1 + dlls/opengl32/winegl.xml | 10 ++++++++++ 2 files changed, 11 insertions(+)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index f91796ee3af..2e7e35ee626 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -391,6 +391,7 @@ my %supported_wgl_extensions = "WGL_NV_render_depth_texture" => 1, "WGL_NV_render_texture_rectangle" => 1, "WGL_NV_vertex_array_range" => 1, + "WGL_WINE_fullscreen_exclusive" => 1, "WGL_WINE_pixel_format_passthrough" => 1, "WGL_WINE_query_renderer" => 1, ); diff --git a/dlls/opengl32/winegl.xml b/dlls/opengl32/winegl.xml index 7918c3ff894..c046bc033ce 100644 --- a/dlls/opengl32/winegl.xml +++ b/dlls/opengl32/winegl.xml @@ -301,6 +301,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA <!-- pixel format is wrongly specified 'const' in wgl.xml --> <param><ptype>PIXELFORMATDESCRIPTOR</ptype> *<name>ppfd</name></param> </command> + <command> + <proto>BOOL <name>wglSetFullscreenExclusiveWINE</name></proto> + <param><ptype>HWND</ptype> <name>hwnd</name></param> + <param>int <name>fullscreen_exclusive</name></param> + </command> <command> <proto>BOOL <name>wglSetPixelFormatWINE</name></proto> <param><ptype>HDC</ptype> <name>hdc</name></param> @@ -413,6 +418,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA <command name="glDeleteObjectBufferATI"/> </require> </extension> + <extension name="WGL_WINE_fullscreen_exclusive" supported="wgl"> + <require> + <command name="wglSetFullscreenExclusiveWINE"/> + </require> + </extension> <extension name="WGL_WINE_pixel_format_passthrough" supported="wgl"> <require> <command name="wglSetPixelFormatWINE"/>
Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
I wasn't sure if this was required, but the testbot doesn't regenerate theses apparently. Also, I manually edited the generated files to only include the new extension, it looks like the file is a bit outdated compared to the OpenGL registry.
dlls/opengl32/opengl_ext.c | 12 ++++++++++-- dlls/opengl32/opengl_norm.c | 2 ++ include/wine/wgl_driver.h | 1 + 3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/opengl32/opengl_ext.c b/dlls/opengl32/opengl_ext.c index c27af43c359..0e05c74ef26 100644 --- a/dlls/opengl32/opengl_ext.c +++ b/dlls/opengl32/opengl_ext.c @@ -8,7 +8,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(opengl);
-const int extension_registry_size = 2679; +const int extension_registry_size = 2680;
static void WINAPI glAccumxOES( GLenum op, GLfixed value ) { @@ -18650,6 +18650,13 @@ static const GLchar * WINAPI wglQueryRendererStringWINE( HDC dc, GLint renderer, return funcs->ext.p_wglQueryRendererStringWINE( dc, renderer, attribute ); }
+static BOOL WINAPI wglSetFullscreenExclusiveWINE( HWND hwnd, int fullscreen_exclusive ) +{ + const struct opengl_funcs *funcs = NtCurrentTeb()->glTable; + TRACE( "(%d)\n", fullscreen_exclusive ); + return funcs->ext.p_wglSetFullscreenExclusiveWINE( hwnd, fullscreen_exclusive ); +} + static BOOL WINAPI wglSetPixelFormatWINE( HDC hdc, int format ) { const struct opengl_funcs *funcs = get_dc_funcs( hdc ); @@ -18681,7 +18688,7 @@ extern int WINAPI wglReleasePbufferDCARB( HPBUFFERARB hPbuffer, HDC hDC ) DECLSP extern BOOL WINAPI wglReleaseTexImageARB( HPBUFFERARB hPbuffer, int iBuffer ) DECLSPEC_HIDDEN; extern BOOL WINAPI wglSetPbufferAttribARB( HPBUFFERARB hPbuffer, const int *piAttribList ) DECLSPEC_HIDDEN;
-const OpenGL_extension extension_registry[2679] = { +const OpenGL_extension extension_registry[2680] = { { "glAccumxOES", "GL_OES_fixed_point", glAccumxOES }, { "glAcquireKeyedMutexWin32EXT", "GL_EXT_win32_keyed_mutex", glAcquireKeyedMutexWin32EXT }, { "glActiveProgramEXT", "GL_EXT_separate_shader_objects", glActiveProgramEXT }, @@ -21358,6 +21365,7 @@ const OpenGL_extension extension_registry[2679] = { { "wglQueryRendererStringWINE", "WGL_WINE_query_renderer", wglQueryRendererStringWINE }, { "wglReleasePbufferDCARB", "WGL_ARB_pbuffer", wglReleasePbufferDCARB }, { "wglReleaseTexImageARB", "WGL_ARB_render_texture", wglReleaseTexImageARB }, + { "wglSetFullscreenExclusiveWINE", "WGL_WINE_fullscreen_exclusive", wglSetFullscreenExclusiveWINE }, { "wglSetPbufferAttribARB", "WGL_ARB_render_texture", wglSetPbufferAttribARB }, { "wglSetPixelFormatWINE", "WGL_WINE_pixel_format_passthrough", wglSetPixelFormatWINE }, { "wglSwapIntervalEXT", "WGL_EXT_swap_control", wglSwapIntervalEXT } diff --git a/dlls/opengl32/opengl_norm.c b/dlls/opengl32/opengl_norm.c index 137333ce2d3..592da895df8 100644 --- a/dlls/opengl32/opengl_norm.c +++ b/dlls/opengl32/opengl_norm.c @@ -5368,6 +5368,7 @@ static BOOL null_wglQueryRendererIntegerWINE( HDC dc, GLint renderer, GLenum att static const GLchar * null_wglQueryRendererStringWINE( HDC dc, GLint renderer, GLenum attribute ) { return 0; } static int null_wglReleasePbufferDCARB( struct wgl_pbuffer * hPbuffer, HDC hDC ) { return 0; } static BOOL null_wglReleaseTexImageARB( struct wgl_pbuffer * hPbuffer, int iBuffer ) { return 0; } +static BOOL null_wglSetFullscreenExclusiveWINE( HWND hwnd, int fullscreen_exclusive ) { return 0; } static BOOL null_wglSetPbufferAttribARB( struct wgl_pbuffer * hPbuffer, const int *piAttribList ) { return 0; } static BOOL null_wglSetPixelFormatWINE( HDC hdc, int format ) { return 0; } static BOOL null_wglSwapIntervalEXT( int interval ) { return 0; } @@ -8401,6 +8402,7 @@ struct opengl_funcs null_opengl_funcs = null_wglQueryRendererStringWINE, null_wglReleasePbufferDCARB, null_wglReleaseTexImageARB, + null_wglSetFullscreenExclusiveWINE, null_wglSetPbufferAttribARB, null_wglSetPixelFormatWINE, null_wglSwapIntervalEXT, diff --git a/include/wine/wgl_driver.h b/include/wine/wgl_driver.h index d8600c2bf84..8f87328f0b6 100644 --- a/include/wine/wgl_driver.h +++ b/include/wine/wgl_driver.h @@ -3046,6 +3046,7 @@ struct opengl_funcs const GLchar * (WINE_GLAPI *p_wglQueryRendererStringWINE)( HDC dc, GLint renderer, GLenum attribute ); int (WINE_GLAPI *p_wglReleasePbufferDCARB)( struct wgl_pbuffer * hPbuffer, HDC hDC ); BOOL (WINE_GLAPI *p_wglReleaseTexImageARB)( struct wgl_pbuffer * hPbuffer, int iBuffer ); + BOOL (WINE_GLAPI *p_wglSetFullscreenExclusiveWINE)( HWND hwnd, int fullscreen_exclusive ); BOOL (WINE_GLAPI *p_wglSetPbufferAttribARB)( struct wgl_pbuffer * hPbuffer, const int *piAttribList ); BOOL (WINE_GLAPI *p_wglSetPixelFormatWINE)( HDC hdc, int format ); BOOL (WINE_GLAPI *p_wglSwapIntervalEXT)( int interval );
On Sat, 7 Mar 2020, Rémi Bernon wrote:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
I wasn't sure if this was required, but the testbot doesn't regenerate theses apparently. Also, I manually edited the generated files to only include the new extension, it looks like the file is a bit outdated compared to the OpenGL registry.
[...]
-const int extension_registry_size = 2679; +const int extension_registry_size = 2680;
So that's strange. When I run make_opengl extension_registry_size grows to 2695 and Wine does not compile because gl.xml now depends on khronos_*_t types that we don't have in Wine:
In file included from ../d3dx9_36/txc_dxtn.h:29, from ../d3dx9_36/surface.c:28: ../../include/wine/wgl.h:14:9: error: unknown type name ‘khronos_int8_t’ typedef khronos_int8_t GLbyte; ^~~~~~~~~~~~~~
This seems to come from:
diff --git a/include/wine/wgl.h b/include/wine/wgl.h index d4fe96025d1..f3ddbe3eb45 100644 --- a/include/wine/wgl.h +++ b/include/wine/wgl.h @@ -11,32 +11,32 @@ typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; typedef void GLvoid; -typedef signed char GLbyte; -typedef short GLshort; +typedef khronos_int8_t GLbyte; +typedef khronos_uint8_t GLubyte; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort;
And from gl.xml before that:
<type name="khrplatform">#include <KHR/khrplatform.h></type> [...] <type requires="khrplatform">typedef khronos_int8_t <name>GLbyte</name>;</type> <type requires="khrplatform">typedef khronos_uint8_t <name>GLubyte</name>;</type> <type requires="khrplatform">typedef khronos_int16_t <name>GLshort</name>;</type> <type requires="khrplatform">typedef khronos_uint16_t <name>GLushort</name>;</type>
The khronos_*_t types seem to have been introduced back in mid 2018 in the 1e2f5a0d commit.
https://github.com/KhronosGroup/OpenGL-Registry/commit/1e2f5a0d5dddae4beafb2...
Is there a trick to running make_opengl?
I see three options:
* Tweak the wget URLs to retrieve older versions of gl.xml and wgl.xml. Which would likely freeze the extension registry to about 2680.
* Add the khronos_*_t types to Wine (but I don't see them in the Windows headers).
* Tweak make_opengl to remove the khronos_*_t references when generating the source files.
On 3/10/20 12:30 PM, Francois Gouget wrote:
On Sat, 7 Mar 2020, Rémi Bernon wrote:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
I wasn't sure if this was required, but the testbot doesn't regenerate theses apparently. Also, I manually edited the generated files to only include the new extension, it looks like the file is a bit outdated compared to the OpenGL registry.
[...]
-const int extension_registry_size = 2679; +const int extension_registry_size = 2680;
So that's strange. When I run make_opengl extension_registry_size grows to 2695 and Wine does not compile because gl.xml now depends on khronos_*_t types that we don't have in Wine:
In file included from ../d3dx9_36/txc_dxtn.h:29, from ../d3dx9_36/surface.c:28: ../../include/wine/wgl.h:14:9: error: unknown type name ‘khronos_int8_t’ typedef khronos_int8_t GLbyte; ^~~~~~~~~~~~~~
This seems to come from:
diff --git a/include/wine/wgl.h b/include/wine/wgl.h index d4fe96025d1..f3ddbe3eb45 100644 --- a/include/wine/wgl.h +++ b/include/wine/wgl.h @@ -11,32 +11,32 @@ typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; typedef void GLvoid; -typedef signed char GLbyte; -typedef short GLshort; +typedef khronos_int8_t GLbyte; +typedef khronos_uint8_t GLubyte; +typedef khronos_int16_t GLshort; +typedef khronos_uint16_t GLushort;
And from gl.xml before that:
<type name="khrplatform">#include <KHR/khrplatform.h></type>
[...] <type requires="khrplatform">typedef khronos_int8_t <name>GLbyte</name>;</type> <type requires="khrplatform">typedef khronos_uint8_t <name>GLubyte</name>;</type> <type requires="khrplatform">typedef khronos_int16_t <name>GLshort</name>;</type> <type requires="khrplatform">typedef khronos_uint16_t <name>GLushort</name>;</type>
The khronos_*_t types seem to have been introduced back in mid 2018 in the 1e2f5a0d commit.
https://github.com/KhronosGroup/OpenGL-Registry/commit/1e2f5a0d5dddae4beafb2...
Is there a trick to running make_opengl?
I see three options:
Tweak the wget URLs to retrieve older versions of gl.xml and wgl.xml. Which would likely freeze the extension registry to about 2680.
Add the khronos_*_t types to Wine (but I don't see them in the Windows headers).
Tweak make_opengl to remove the khronos_*_t references when generating the source files.
Yeah, as I said in the notes I had the same issue, so I manually edited the generated files to only keep my new extension. I wasn't sure how this should be handled. I can try to fix it upfront.
Instead of HWND, so we can then access the fullscreen_exclusive field.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winex11.drv/window.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 99e4094ebd9..723f0c6e7b0 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -222,18 +222,18 @@ static struct x11drv_win_data *alloc_win_data( Display *display, HWND hwnd ) * * Check if a given window should be managed */ -static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) +static BOOL is_window_managed( struct x11drv_win_data *data, UINT swp_flags, const RECT *window_rect ) { DWORD style, ex_style;
if (!managed_mode) return FALSE;
/* child windows are not managed */ - style = GetWindowLongW( hwnd, GWL_STYLE ); + style = GetWindowLongW( data->hwnd, GWL_STYLE ); if ((style & (WS_CHILD|WS_POPUP)) == WS_CHILD) return FALSE; /* activated windows are managed */ if (!(swp_flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW))) return TRUE; - if (hwnd == GetActiveWindow()) return TRUE; + if (data->hwnd == GetActiveWindow()) return TRUE; /* windows with caption are managed */ if ((style & WS_CAPTION) == WS_CAPTION) return TRUE; /* windows with thick frame are managed */ @@ -246,7 +246,7 @@ static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rec /* popup with sysmenu == caption are managed */ if (style & WS_SYSMENU) return TRUE; /* full-screen popup windows are managed */ - hmon = MonitorFromWindow( hwnd, MONITOR_DEFAULTTOPRIMARY ); + hmon = MonitorFromWindow( data->hwnd, MONITOR_DEFAULTTOPRIMARY ); mi.cbSize = sizeof( mi ); GetMonitorInfoW( hmon, &mi ); if (window_rect->left <= mi.rcWork.left && window_rect->right >= mi.rcWork.right && @@ -254,10 +254,10 @@ static BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rec return TRUE; } /* application windows are managed */ - ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE ); + ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); if (ex_style & WS_EX_APPWINDOW) return TRUE; /* windows that own popups are managed */ - if (has_owned_popups( hwnd )) return TRUE; + if (has_owned_popups( data->hwnd )) return TRUE; /* default: not managed */ return FALSE; } @@ -1495,7 +1495,7 @@ static void create_whole_window( struct x11drv_win_data *data ) HRGN win_rgn; POINT pos;
- if (!data->managed && is_window_managed( data->hwnd, SWP_NOACTIVATE, &data->window_rect )) + if (!data->managed && is_window_managed( data, SWP_NOACTIVATE, &data->window_rect )) { TRACE( "making win %p/%lx managed\n", data->hwnd, data->whole_window ); data->managed = TRUE; @@ -2264,7 +2264,7 @@ void CDECL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flag if (!data && !(data = X11DRV_create_win_data( hwnd, window_rect, client_rect ))) return;
/* check if we need to switch the window to managed */ - if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, window_rect )) + if (!data->managed && data->whole_window && is_window_managed( data, swp_flags, window_rect )) { TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window ); release_win_data( data );
Fullscreen exclusive windows are treated as undecorated managed windows and the window rect as the rendering area, instead of client rect.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winex11.drv/event.c | 2 +- dlls/winex11.drv/opengl.c | 28 ++++++++++++++++++++++++ dlls/winex11.drv/window.c | 45 ++++++++++++++++++++++++++++++--------- dlls/winex11.drv/x11drv.h | 1 + 4 files changed, 65 insertions(+), 11 deletions(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 07f7a1ad502..30d15b9a236 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -1160,7 +1160,7 @@ static BOOL X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev ) data->window_rect.bottom - data->window_rect.top, cx, cy );
style = GetWindowLongW( data->hwnd, GWL_STYLE ); - if ((style & WS_CAPTION) == WS_CAPTION) + if ((style & WS_CAPTION) == WS_CAPTION && !data->fullscreen_exclusive) { read_net_wm_states( event->display, data ); if ((data->net_wm_state & (1 << NET_WM_STATE_MAXIMIZED))) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 7fb97f5f446..997df873b16 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3043,6 +3043,30 @@ static BOOL X11DRV_wglSwapIntervalEXT(int interval) return ret; }
+ +/** + * X11DRV_wglSetFullscreenExclusiveWINE + * + * WGL_WINE_fullscreen_exclusive: wglSetFullscreenExclusiveWINE + */ +static BOOL X11DRV_wglSetFullscreenExclusiveWINE(HWND hwnd, int fullscreen_exclusive) +{ + struct x11drv_win_data *data; + + TRACE("(%p,%d)\n", hwnd, fullscreen_exclusive); + + if (!(data = get_win_data( hwnd ))) + { + WARN("not a proper window %p\n", hwnd); + return FALSE; + } + + data->fullscreen_exclusive = fullscreen_exclusive; + release_win_data( data ); + return TRUE; +} + + /** * X11DRV_wglSetPixelFormatWINE * @@ -3213,6 +3237,10 @@ static void X11DRV_WineGL_LoadExtensions(void)
/* WINE-specific WGL Extensions */
+ /* In WineD3D we need the ability to make a window fullscreen exclusive. */ + register_extension( "WGL_WINE_fullscreen_exclusive" ); + opengl_funcs.ext.p_wglSetFullscreenExclusiveWINE = X11DRV_wglSetFullscreenExclusiveWINE; + /* In WineD3D we need the ability to set the pixel format more than once (e.g. after a device reset). * The default wglSetPixelFormat doesn't allow this, so add our own which allows it. */ diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 723f0c6e7b0..144da39f3ab 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -227,6 +227,7 @@ static BOOL is_window_managed( struct x11drv_win_data *data, UINT swp_flags, con DWORD style, ex_style;
if (!managed_mode) return FALSE; + if (data->fullscreen_exclusive) return TRUE;
/* child windows are not managed */ style = GetWindowLongW( data->hwnd, GWL_STYLE ); @@ -272,7 +273,8 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl { if (style & WS_THICKFRAME) return TRUE; /* Metacity needs the window to be resizable to make it fullscreen */ - return is_window_rect_fullscreen( &data->whole_rect ); + return is_window_rect_fullscreen( &data->whole_rect ) || + data->fullscreen_exclusive; }
@@ -285,6 +287,7 @@ static unsigned long get_mwm_decorations( struct x11drv_win_data *data, unsigned long ret = 0;
if (!decorated_mode) return 0; + if (data->fullscreen_exclusive) return 0;
if (IsRectEmpty( &data->window_rect )) return 0; if (data->shaped) return 0; @@ -944,7 +947,9 @@ void update_net_wm_states( struct x11drv_win_data *data ) style = GetWindowLongW( data->hwnd, GWL_STYLE ); if (style & WS_MINIMIZE) new_state |= data->net_wm_state & ((1 << NET_WM_STATE_FULLSCREEN)|(1 << NET_WM_STATE_MAXIMIZED)); - if (is_window_rect_fullscreen( &data->whole_rect )) + if (data->fullscreen_exclusive) + new_state |= (1 << NET_WM_STATE_FULLSCREEN); + else if (is_window_rect_fullscreen( &data->whole_rect )) { if ((style & WS_MAXIMIZE) && (style & WS_CAPTION) == WS_CAPTION) new_state |= (1 << NET_WM_STATE_MAXIMIZED); @@ -1298,10 +1303,20 @@ static void sync_client_position( struct x11drv_win_data *data,
if (!data->client_window) return;
- changes.x = data->client_rect.left - data->whole_rect.left; - changes.y = data->client_rect.top - data->whole_rect.top; - changes.width = min( max( 1, data->client_rect.right - data->client_rect.left ), 65535 ); - changes.height = min( max( 1, data->client_rect.bottom - data->client_rect.top ), 65535 ); + if (data->fullscreen_exclusive) + { + changes.x = data->whole_rect.left; + changes.y = data->whole_rect.top; + changes.width = min( max( 1, data->whole_rect.right - data->whole_rect.left ), 65535 ); + changes.height = min( max( 1, data->whole_rect.bottom - data->whole_rect.top ), 65535 ); + } + else + { + changes.x = data->client_rect.left - data->whole_rect.left; + changes.y = data->client_rect.top - data->whole_rect.top; + changes.width = min( max( 1, data->client_rect.right - data->client_rect.left ), 65535 ); + changes.height = min( max( 1, data->client_rect.bottom - data->client_rect.top ), 65535 ); + }
if (changes.x != old_client_rect->left - old_whole_rect->left) mask |= CWX; if (changes.y != old_client_rect->top - old_whole_rect->top) mask |= CWY; @@ -1456,10 +1471,20 @@ Window create_client_window( HWND hwnd, const XVisualInfo *visual ) attr.backing_store = NotUseful; attr.border_pixel = 0;
- x = data->client_rect.left - data->whole_rect.left; - y = data->client_rect.top - data->whole_rect.top; - cx = min( max( 1, data->client_rect.right - data->client_rect.left ), 65535 ); - cy = min( max( 1, data->client_rect.bottom - data->client_rect.top ), 65535 ); + if (data->fullscreen_exclusive) + { + x = data->whole_rect.left; + y = data->whole_rect.top; + cx = min( max( 1, data->whole_rect.right - data->whole_rect.left ), 65535 ); + cy = min( max( 1, data->whole_rect.bottom - data->whole_rect.top ), 65535 ); + } + else + { + x = data->client_rect.left - data->whole_rect.left; + y = data->client_rect.top - data->whole_rect.top; + cx = min( max( 1, data->client_rect.right - data->client_rect.left ), 65535 ); + cy = min( max( 1, data->client_rect.bottom - data->client_rect.top ), 65535 ); + }
ret = data->client_window = XCreateWindow( gdi_display, data->whole_window ? data->whole_window : dummy_parent, diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 98cab8947be..baa0f7478e9 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -565,6 +565,7 @@ struct x11drv_win_data RECT whole_rect; /* X window rectangle for the whole window relative to parent */ RECT client_rect; /* client area relative to parent */ XIC xic; /* X input context */ + BOOL fullscreen_exclusive : 1; /* is window fullscreen exclusive? */ BOOL managed : 1; /* is window managed? */ BOOL mapped : 1; /* is window mapped? (in either normal or iconic state) */ BOOL iconic : 1; /* is window in iconic state? */
On Sat, 7 Mar 2020 at 14:00, Rémi Bernon rbernon@codeweavers.com wrote:
Fullscreen exclusive windows are treated as undecorated managed windows and the window rect as the rendering area, instead of client rect.
So this ends up not having a whole lot to do with the window being fullscreen, at least from the WGL perspective.
- /* In WineD3D we need the ability to make a window fullscreen exclusive. */
As an aside on terminology, there's "wined3d" the module, and "Wine Direct3D"/"Wine D3D" the subsystem (i.e., the collection of Wine's various Direct3D modules like wined3d, ddraw, d3d9, d3d11, d3d12, etc.). The term "WineD3D" is ambiguous at best, but mostly just a rather persistent misunderstanding.
We need that in the next patch to have access to swapchain_ops.
This parameter may be NULL if the swapchain is not actually a wined3d swapchain (in the case of d3d12 swapchain).
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dxgi/swapchain.c | 11 ++++++----- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/swapchain.c | 17 +++++++++-------- dlls/wined3d/wined3d.spec | 4 ++-- dlls/wined3d/wined3d_main.c | 2 +- dlls/wined3d/wined3d_private.h | 4 ++-- include/wine/wined3d.h | 2 +- 7 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index b86a79a94cf..b4497eb257f 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -153,7 +153,8 @@ static HRESULT dxgi_get_output_from_window(IDXGIAdapter *adapter, HWND window, I }
static HRESULT dxgi_swapchain_set_fullscreen_state(struct wined3d_swapchain_state *state, - const struct wined3d_swapchain_desc *swapchain_desc, IDXGIOutput *output) + const struct wined3d_swapchain_desc *swapchain_desc, IDXGIOutput *output, + struct wined3d_swapchain *swapchain) { struct dxgi_output *dxgi_output; HRESULT hr; @@ -162,7 +163,7 @@ static HRESULT dxgi_swapchain_set_fullscreen_state(struct wined3d_swapchain_stat
wined3d_mutex_lock(); hr = wined3d_swapchain_state_set_fullscreen(state, swapchain_desc, - dxgi_output->wined3d_output, NULL); + dxgi_output->wined3d_output, NULL, swapchain); wined3d_mutex_unlock();
return hr; @@ -431,7 +432,7 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreen state = wined3d_swapchain_get_state(swapchain->wined3d_swapchain); wined3d_swapchain_get_desc(swapchain->wined3d_swapchain, &swapchain_desc); swapchain_desc.windowed = !fullscreen; - hr = dxgi_swapchain_set_fullscreen_state(state, &swapchain_desc, target); + hr = dxgi_swapchain_set_fullscreen_state(state, &swapchain_desc, target, swapchain->wined3d_swapchain); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -899,7 +900,7 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi goto cleanup; }
- if (FAILED(hr = dxgi_swapchain_set_fullscreen_state(state, desc, swapchain->target))) + if (FAILED(hr = dxgi_swapchain_set_fullscreen_state(state, desc, swapchain->target, swapchain->wined3d_swapchain))) { WARN("Failed to set fullscreen state, hr %#x.\n", hr); IDXGIOutput_Release(swapchain->target); @@ -2237,7 +2238,7 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreen goto fail; wined3d_mutex_lock(); wined3d_desc.windowed = !fullscreen; - hr = dxgi_swapchain_set_fullscreen_state(swapchain->state, &wined3d_desc, target); + hr = dxgi_swapchain_set_fullscreen_state(swapchain->state, &wined3d_desc, target, NULL); wined3d_mutex_unlock(); if (FAILED(hr)) goto fail; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 407dd20469e..4bd34938117 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5156,7 +5156,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, return E_FAIL; } if (FAILED(hr = wined3d_swapchain_state_set_fullscreen(&swapchain->state, - swapchain_desc, output, mode))) + swapchain_desc, output, mode, swapchain))) return hr;
/* Switch from fullscreen to windowed. */ @@ -5174,7 +5174,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, swapchain_state->style = 0; swapchain_state->exstyle = 0; wined3d_swapchain_state_setup_fullscreen(swapchain_state, swapchain_state->device_window, - swapchain_desc->backbuffer_width, swapchain_desc->backbuffer_height); + swapchain_desc->backbuffer_width, swapchain_desc->backbuffer_height, swapchain); swapchain_state->style = style; swapchain_state->exstyle = exstyle; } diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index c0eb25ffb66..65c5d34def7 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -80,13 +80,14 @@ void wined3d_swapchain_cleanup(struct wined3d_swapchain *swapchain) if (swapchain->state.desc.flags & WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT) { wined3d_swapchain_state_restore_from_fullscreen(&swapchain->state, - swapchain->state.device_window, &swapchain->state.original_window_rect); + swapchain->state.device_window, &swapchain->state.original_window_rect, swapchain); wined3d_device_release_focus_window(swapchain->device); } } else { - wined3d_swapchain_state_restore_from_fullscreen(&swapchain->state, swapchain->state.device_window, NULL); + wined3d_swapchain_state_restore_from_fullscreen(&swapchain->state, swapchain->state.device_window, NULL, + swapchain); } } } @@ -923,7 +924,7 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc else { wined3d_swapchain_state_setup_fullscreen(&swapchain->state, - window, desc->backbuffer_width, desc->backbuffer_height); + window, desc->backbuffer_width, desc->backbuffer_height, swapchain); } swapchain->state.desc = *desc; wined3d_swapchain_apply_sample_count_override(swapchain, swapchain->state.desc.backbuffer_format, @@ -1534,7 +1535,7 @@ static LONG fullscreen_exstyle(LONG exstyle) }
HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state, - HWND window, unsigned int w, unsigned int h) + HWND window, unsigned int w, unsigned int h, struct wined3d_swapchain *swapchain) { LONG style, exstyle; BOOL filter; @@ -1574,7 +1575,7 @@ HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state }
void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_state *state, - HWND window, const RECT *window_rect) + HWND window, const RECT *window_rect, struct wined3d_swapchain *swapchain) { unsigned int window_pos_flags = SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOACTIVATE; LONG style, exstyle; @@ -1627,7 +1628,7 @@ void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_st
HRESULT CDECL wined3d_swapchain_state_set_fullscreen(struct wined3d_swapchain_state *state, const struct wined3d_swapchain_desc *swapchain_desc, struct wined3d_output *output, - const struct wined3d_display_mode *mode) + const struct wined3d_display_mode *mode, struct wined3d_swapchain *swapchain) { struct wined3d_display_mode actual_mode; HRESULT hr; @@ -1681,7 +1682,7 @@ HRESULT CDECL wined3d_swapchain_state_set_fullscreen(struct wined3d_swapchain_st if (state->desc.windowed) { /* Switch from windowed to fullscreen */ - if (FAILED(hr = wined3d_swapchain_state_setup_fullscreen(state, state->device_window, width, height))) + if (FAILED(hr = wined3d_swapchain_state_setup_fullscreen(state, state->device_window, width, height, swapchain))) return hr; } else @@ -1703,7 +1704,7 @@ HRESULT CDECL wined3d_swapchain_state_set_fullscreen(struct wined3d_swapchain_st RECT *window_rect = NULL; if (state->desc.flags & WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT) window_rect = &state->original_window_rect; - wined3d_swapchain_state_restore_from_fullscreen(state, state->device_window, window_rect); + wined3d_swapchain_state_restore_from_fullscreen(state, state->device_window, window_rect, swapchain); }
state->desc.windowed = swapchain_desc->windowed; diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 51745e24183..3960d702d34 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -282,8 +282,8 @@
@ cdecl wined3d_swapchain_state_create(ptr ptr ptr ptr) @ cdecl wined3d_swapchain_state_destroy(ptr) -@ cdecl wined3d_swapchain_state_resize_target(ptr ptr ptr) -@ cdecl wined3d_swapchain_state_set_fullscreen(ptr ptr ptr ptr) +@ cdecl wined3d_swapchain_state_resize_target(ptr ptr ptr ptr) +@ cdecl wined3d_swapchain_state_set_fullscreen(ptr ptr ptr ptr ptr)
@ cdecl wined3d_texture_add_dirty_region(ptr long ptr) @ cdecl wined3d_texture_blt(ptr long ptr ptr long ptr long ptr long) diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c index e681ac1b61b..942c030ae69 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -571,7 +571,7 @@ static LRESULT CALLBACK wined3d_hook_proc(int code, WPARAM wparam, LPARAM lparam break; } wined3d_swapchain_state_set_fullscreen(&swapchain->state, &swapchain_desc, output, - NULL); + NULL, swapchain);
wined3d_wndproc_mutex_unlock();
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 5c00883d413..25c4c2dcb26 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4449,9 +4449,9 @@ struct wined3d_swapchain_state };
void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_state *state, - HWND window, const RECT *window_rect) DECLSPEC_HIDDEN; + HWND window, const RECT *window_rect, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state, - HWND window, unsigned int w, unsigned int h) DECLSPEC_HIDDEN; + HWND window, unsigned int w, unsigned int h, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN;
struct wined3d_swapchain_ops { diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 6fc3a1aaa85..c04d865ca8b 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2765,7 +2765,7 @@ HRESULT __cdecl wined3d_swapchain_state_resize_target(struct wined3d_swapchain_s struct wined3d_output *output, const struct wined3d_display_mode *mode); HRESULT __cdecl wined3d_swapchain_state_set_fullscreen(struct wined3d_swapchain_state *state, const struct wined3d_swapchain_desc *desc, struct wined3d_output *output, - const struct wined3d_display_mode *mode); + const struct wined3d_display_mode *mode, struct wined3d_swapchain *swapchain);
HRESULT __cdecl wined3d_texture_add_dirty_region(struct wined3d_texture *texture, UINT layer, const struct wined3d_box *dirty_region);
On Sat, 7 Mar 2020 at 14:00, Rémi Bernon rbernon@codeweavers.com wrote:
We need that in the next patch to have access to swapchain_ops.
This parameter may be NULL if the swapchain is not actually a wined3d swapchain (in the case of d3d12 swapchain).
The swapchain_state structure was for a large part introduced to avoid needing a wined3d swapchain for d3d12 swapchains, so this change doesn't seem all that attractive. Would it make sense to pass an ops structure to wined3d_swapchain_state_init() instead?
Instead of GetClientRect: when fullscreen exclusive mode is supported, the window decorations aren't removed anymore and the client rectangle will not be sized as expected.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/wined3d/context.c | 5 ++++- dlls/wined3d/swapchain.c | 8 ++++++-- dlls/wined3d/texture.c | 5 ++++- dlls/wined3d/wined3d_private.h | 2 ++ 4 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 28e0d262a57..a7023f83af6 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2701,7 +2701,10 @@ static void wined3d_context_gl_get_rt_size(const struct wined3d_context_gl *cont { RECT window_size;
- GetClientRect(context_gl->window, &window_size); + if (rt->swapchain->state.fullscreen_exclusive) + GetWindowRect(context_gl->window, &window_size); + else + GetClientRect(context_gl->window, &window_size); size->cx = window_size.right - window_size.left; size->cy = window_size.bottom - window_size.top;
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 65c5d34def7..4b2c42b5bc4 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -203,7 +203,10 @@ HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain,
if (!dst_rect) { - GetClientRect(swapchain->win_handle, &d); + if (swapchain->state.fullscreen_exclusive) + GetWindowRect(swapchain->win_handle, &d); + else + GetClientRect(swapchain->win_handle, &d); dst_rect = &d; }
@@ -856,6 +859,7 @@ static HRESULT wined3d_swapchain_state_init(struct wined3d_swapchain_state *stat
GetWindowRect(window, &state->original_window_rect); state->device_window = window; + state->fullscreen_exclusive = FALSE;
return hr; } @@ -899,9 +903,9 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc swapchain->swap_interval = WINED3D_SWAP_INTERVAL_DEFAULT; swapchain_set_max_frame_latency(swapchain, device);
- GetClientRect(window, &client_rect); if (desc->windowed) { + GetClientRect(window, &client_rect); TRACE("Client rect %s.\n", wine_dbgstr_rect(&client_rect));
if (!desc->backbuffer_width) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index b663a44fbb1..159e96792ea 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -89,7 +89,10 @@ void wined3d_texture_translate_drawable_coords(const struct wined3d_texture *tex OffsetRect(rect, offset.x, offset.y); }
- GetClientRect(window, &windowsize); + if (texture->swapchain->state.fullscreen_exclusive) + GetWindowRect(window, &windowsize); + else + GetClientRect(window, &windowsize); drawable_height = windowsize.bottom - windowsize.top;
rect->top = drawable_height - rect->top; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 25c4c2dcb26..3edfe17c87b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4446,6 +4446,8 @@ struct wined3d_swapchain_state LONG style; LONG exstyle; HWND device_window; + + BOOL fullscreen_exclusive; };
void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_state *state,
On Sat, 7 Mar 2020 at 14:00, Rémi Bernon rbernon@codeweavers.com wrote:
GetClientRect(context_gl->window, &window_size);
if (rt->swapchain->state.fullscreen_exclusive)
GetWindowRect(context_gl->window, &window_size);
else
GetClientRect(context_gl->window, &window_size);
This looks like it would benefit from a helper function.
This replaces the legacy behavior involving window style manipulation.
If the swapchain is not a wined3d swapchain, or if the extension is not available it will fallback to the legacy implementation.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/d3d8/tests/device.c | 10 ++--- dlls/d3d9/tests/d3d9ex.c | 14 +++--- dlls/d3d9/tests/device.c | 14 +++--- dlls/wined3d/adapter_gl.c | 2 + dlls/wined3d/swapchain.c | 78 ++++++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_gl.h | 1 + dlls/wined3d/wined3d_private.h | 2 + 7 files changed, 106 insertions(+), 15 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 008395df1a6..533bae42d12 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -3784,12 +3784,12 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | WS_VISIBLE; - todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, + ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window style %#x, got %#x.\n", expected_style, style); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | WS_EX_TOPMOST; - todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, + ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window extended style %#x, got %#x.\n", expected_style, style);
@@ -3804,7 +3804,7 @@ static void test_window_style(void) ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r)); GetClientRect(device_window, &r); - todo_wine ok(!EqualRect(&r, &fullscreen_rect) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, + ok(!EqualRect(&r, &fullscreen_rect) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, "Client rect and window rect are equal.\n"); GetWindowRect(focus_window, &r); ok(EqualRect(&r, &focus_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&focus_rect), @@ -3838,11 +3838,11 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | WS_MINIMIZE | WS_VISIBLE; - todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x.\n", + ok(style == expected_style, "Expected device window style %#x, got %#x.\n", expected_style, style); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | WS_EX_TOPMOST; - todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x.\n", + ok(style == expected_style, "Expected device window extended style %#x, got %#x.\n", expected_style, style);
style = GetWindowLongA(focus_window, GWL_STYLE); diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 17dd3c5c12e..a47ec8ef917 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -3515,7 +3515,8 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style; - todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, + todo_wine_if (!(tests[i].style_flags & WS_VISIBLE)) + ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); @@ -3539,7 +3540,7 @@ static void test_window_style(void) ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s, i=%u.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r), i); GetClientRect(device_window, &r2); - todo_wine ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, + ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, "Client rect and window rect are equal, i=%u.\n", i); GetWindowRect(focus_window, &r); ok(EqualRect(&r, &focus_rect), "Expected %s, got %s, i=%u.\n", @@ -3593,12 +3594,14 @@ static void test_window_style(void) ok(!!device, "Failed to create a D3D device.\n"); style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].create2_style; - todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, + todo_wine_if ((tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) && !(tests[i].style_flags & WS_VISIBLE)) + ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | tests[i].create2_exstyle; - todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, + todo_wine_if ((tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES)) + ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
@@ -3626,7 +3629,8 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].focus_loss_style; - todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", + todo_wine_if (!(tests[i].style_flags & WS_VISIBLE)) + ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle; diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index d00a26b942c..5ce763f2494 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -4859,12 +4859,14 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].style; - todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, + todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) + ok(style == expected_style || broken(style == (expected_style & ~WS_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | tests[i].exstyle; - todo_wine ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, + todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) + ok(style == expected_style || broken(style == (expected_style & ~WS_EX_OVERLAPPEDWINDOW)) /* w1064v1809 */, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
@@ -4883,7 +4885,7 @@ static void test_window_style(void) ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s, i=%u.\n", wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r), i); GetClientRect(device_window, &r2); - todo_wine ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, + ok(!EqualRect(&r, &r2) || broken(!(style & WS_THICKFRAME)) /* w1064v1809 */, "Client rect and window rect are equal, i=%u.\n", i); GetWindowRect(focus_window, &r); ok(EqualRect(&r, &focus_rect), "Expected %s, got %s, i=%u.\n", @@ -4919,11 +4921,13 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE); expected_style = device_style | tests[i].focus_loss_style | tests[i].style; - todo_wine ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", + todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) + ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n", expected_style, style, i); style = GetWindowLongA(device_window, GWL_EXSTYLE); expected_style = device_exstyle | tests[i].exstyle; - todo_wine ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", + todo_wine_if (tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) + ok(style == expected_style, "Expected device window extended style %#x, got %#x, i=%u.\n", expected_style, style, i);
style = GetWindowLongA(focus_window, GWL_STYLE); diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 3ad64754ec6..38660aeeaa2 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -236,6 +236,7 @@ static const struct wined3d_extension_map wgl_extension_map[] = { {"WGL_ARB_pixel_format", WGL_ARB_PIXEL_FORMAT }, {"WGL_EXT_swap_control", WGL_EXT_SWAP_CONTROL }, + {"WGL_WINE_fullscreen_exclusive", WGL_WINE_FULLSCREEN_EXCLUSIVE }, {"WGL_WINE_pixel_format_passthrough", WGL_WINE_PIXEL_FORMAT_PASSTHROUGH}, {"WGL_WINE_query_renderer", WGL_WINE_QUERY_RENDERER }, }; @@ -2663,6 +2664,7 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) USE_GL_FUNC(wglQueryCurrentRendererStringWINE) USE_GL_FUNC(wglQueryRendererIntegerWINE) USE_GL_FUNC(wglQueryRendererStringWINE) + USE_GL_FUNC(wglSetFullscreenExclusiveWINE) USE_GL_FUNC(wglSetPixelFormatWINE) USE_GL_FUNC(wglSwapIntervalEXT)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 4b2c42b5bc4..2996a0ffbed 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -652,10 +652,73 @@ static void swapchain_frontbuffer_updated(struct wined3d_swapchain *swapchain) SetRectEmpty(&swapchain->front_buffer_update); }
+static BOOL swapchain_gl_set_fullscreen_exclusive(struct wined3d_swapchain *swapchain, + BOOL fullscreen_exclusive, HWND window, const RECT *window_rect) +{ + const struct wined3d_output *output; + const struct wined3d_gl_info *gl_info; + DWORD window_pos_flags = SWP_FRAMECHANGED | SWP_NOACTIVATE; + HWND window_pos_after = 0; + BOOL filter; + RECT rect = {0}; + + TRACE("swapchain %p fullscreen %d window %p rect %s\n", + swapchain, fullscreen_exclusive, window, wine_dbgstr_rect(window_rect)); + + if (!(output = get_output_from_window(swapchain->device->wined3d, window)) || + !output->adapter) + { + WARN("Failed to %s fullscreen exclusive for window %p, unable to find output.\n", + fullscreen_exclusive ? "set" : "unset", window); + return FALSE; + } + + gl_info = &output->adapter->gl_info; + if (!gl_info->supported[WGL_WINE_FULLSCREEN_EXCLUSIVE]) + { + WARN("Failed to %s fullscreen exclusive for window %p," + "WGL_WINE_fullscreen_exclusive extension is not supported.\n", + fullscreen_exclusive ? "set" : "unset", window); + return FALSE; + } + + if (!GL_EXTCALL(wglSetFullscreenExclusiveWINE(window, fullscreen_exclusive))) + { + WARN("Failed to %s fullscreen exclusive for window %p, last error %#x.\n", + fullscreen_exclusive ? "set" : "unset", window, GetLastError()); + return FALSE; + } + + if (fullscreen_exclusive) + { + window_pos_after = HWND_TOPMOST; + window_pos_flags |= SWP_SHOWWINDOW; + } + else + { + window_pos_after = 0; + window_pos_flags |= SWP_NOZORDER; + } + + if (window_rect) + rect = *window_rect; + else + window_pos_flags |= (SWP_NOMOVE | SWP_NOSIZE); + + filter = wined3d_filter_messages(window, TRUE); + SetWindowPos(window, window_pos_after, rect.left, rect.top, + rect.right - rect.left, rect.bottom - rect.top, window_pos_flags); + wined3d_filter_messages(window, filter); + + swapchain->state.fullscreen_exclusive = fullscreen_exclusive; + return TRUE; +} + static const struct wined3d_swapchain_ops swapchain_gl_ops = { swapchain_gl_present, swapchain_frontbuffer_updated, + swapchain_gl_set_fullscreen_exclusive, };
static void swapchain_vk_present(struct wined3d_swapchain *swapchain, const RECT *src_rect, @@ -664,10 +727,18 @@ static void swapchain_vk_present(struct wined3d_swapchain *swapchain, const RECT FIXME("Not implemented.\n"); }
+static BOOL swapchain_vk_set_fullscreen_exclusive(struct wined3d_swapchain *swapchain, + BOOL fullscreen_exclusive, HWND window, const RECT *window_rect) +{ + FIXME("Not implemented.\n"); + return FALSE; +} + static const struct wined3d_swapchain_ops swapchain_vk_ops = { swapchain_vk_present, swapchain_frontbuffer_updated, + swapchain_vk_set_fullscreen_exclusive, };
static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchain) @@ -1543,6 +1614,7 @@ HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state { LONG style, exstyle; BOOL filter; + RECT rect = {0, 0, w, h};
TRACE("Setting up window %p for fullscreen mode.\n", window);
@@ -1552,6 +1624,9 @@ HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state return WINED3DERR_NOTAVAILABLE; }
+ if (swapchain && swapchain->swapchain_ops->swapchain_set_fullscreen_exclusive(swapchain, TRUE, window, &rect)) + return WINED3D_OK; + if (state->style || state->exstyle) { ERR("Changing the window style for window %p, but another style (%08x, %08x) is already stored.\n", @@ -1586,6 +1661,9 @@ void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_st RECT rect = {0}; BOOL filter;
+ if (swapchain && swapchain->swapchain_ops->swapchain_set_fullscreen_exclusive(swapchain, FALSE, window, window_rect)) + return; + if (!state->style && !state->exstyle) return;
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 3372b4b6be3..6761c4d8387 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -209,6 +209,7 @@ enum wined3d_gl_extension /* WGL extensions */ WGL_ARB_PIXEL_FORMAT, WGL_EXT_SWAP_CONTROL, + WGL_WINE_FULLSCREEN_EXCLUSIVE, WGL_WINE_PIXEL_FORMAT_PASSTHROUGH, WGL_WINE_QUERY_RENDERER, /* Internally used */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 3edfe17c87b..837dcd9a9e0 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4460,6 +4460,8 @@ struct wined3d_swapchain_ops void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, const RECT *dst_rect, unsigned int swap_interval, DWORD flags); void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain); + BOOL (*swapchain_set_fullscreen_exclusive)(struct wined3d_swapchain *swapchain, BOOL fullscreen_exclusive, + HWND window, const RECT *window_rect); };
struct wined3d_swapchain
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=66590
Your paranoid android.
=== debiant (32 bit report) ===
Report validation errors: d3d9:d3d9ex has unaccounted for todo messages The report seems to have been truncated
=== debiant (build log) ===
0009:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0009:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly. Task: WineTest did not produce the win32_fr_FR report
=== debiant (32 bit WoW report) ===
dxgi: dxgi.c:1930: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:1954: Test failed: Got client rect (0,0)-(634,455), expected (0,0)-(640,480). dxgi.c:3163: Test failed: Got client rect (0,0)-(634,455), expected (0,0)-(640,480). dxgi.c:3189: Test failed: Got client rect (0,0)-(634,455), expected (0,0)-(640,480). dxgi.c:3220: Test failed: Got client rect (0,0)-(634,455), expected (0,0)-(640,480). dxgi.c:3163: Test failed: Got client rect (0,0)-(634,455), expected (0,0)-(640,480). dxgi.c:3189: Test failed: Got client rect (0,0)-(634,455), expected (0,0)-(640,480). dxgi.c:3220: Test failed: Got client rect (0,0)-(634,455), expected (0,0)-(640,480). dxgi.c:3163: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:3189: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:3220: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:5236: Test failed: Expected message 0x7c. dxgi.c:5267: Test failed: Expected message 0x7c. dxgi.c:5381: Test failed: Test 0: Got exstyle 0x108, expected 0x8. dxgi.c:5381: Test failed: Test 1: Got exstyle 0x108, expected 0x8. dxgi.c:5381: Test failed: Test 2: Got exstyle 0x108, expected 0x8. dxgi.c:5381: Test failed: Test 3: Got exstyle 0x108, expected 0x8. dxgi.c:5381: Test failed: Test 4: Got exstyle 0x108, expected 0x8. dxgi.c:5381: Test failed: Test 5: Got exstyle 0x40108, expected 0x40008. dxgi.c:2237: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2241: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2298: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2312: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2315: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2237: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2241: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2298: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2312: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2315: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2875: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2879: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2875: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2879: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2875: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2879: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2762: Test failed: Got client rect (0,0)-(634,455), expected (0,0)-(640,480). dxgi.c:2762: Test failed: Got client rect (0,0)-(714,455), expected (0,0)-(720,480). dxgi.c:2762: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2762: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2762: Test failed: Got client rect (0,0)-(842,455), expected (0,0)-(848,480). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1146,743), expected (0,0)-(1152,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,695), expected (0,0)-(1280,720). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,743), expected (0,0)-(1280,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,743), expected (0,0)-(1280,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,775), expected (0,0)-(1280,800). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,775), expected (0,0)-(1280,800). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,829), expected (0,0)-(1280,854). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,935), expected (0,0)-(1280,960). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,999), expected (0,0)-(1280,1024). dxgi.c:2762: Test failed: Got client rect (0,0)-(1354,743), expected (0,0)-(1360,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1360,743), expected (0,0)-(1366,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1360,743), expected (0,0)-(1366,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1394,1025), expected (0,0)-(1400,1050). dxgi.c:2875: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2879: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2762: Test failed: Got client rect (0,0)-(634,455), expected (0,0)-(640,480). dxgi.c:2762: Test failed: Got client rect (0,0)-(714,455), expected (0,0)-(720,480). dxgi.c:2762: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2762: Test failed: Got client rect (0,0)-(794,575), expected (0,0)-(800,600). dxgi.c:2762: Test failed: Got client rect (0,0)-(842,455), expected (0,0)-(848,480). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1018,743), expected (0,0)-(1024,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1146,743), expected (0,0)-(1152,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,695), expected (0,0)-(1280,720). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,743), expected (0,0)-(1280,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,743), expected (0,0)-(1280,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,775), expected (0,0)-(1280,800). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,775), expected (0,0)-(1280,800). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,829), expected (0,0)-(1280,854). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,935), expected (0,0)-(1280,960). dxgi.c:2762: Test failed: Got client rect (0,0)-(1274,999), expected (0,0)-(1280,1024). dxgi.c:2762: Test failed: Got client rect (0,0)-(1354,743), expected (0,0)-(1360,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1360,743), expected (0,0)-(1366,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1360,743), expected (0,0)-(1366,768). dxgi.c:2762: Test failed: Got client rect (0,0)-(1394,1025), expected (0,0)-(1400,1050).
=== debiant (64 bit WoW report) ===
Report validation errors: d3d9:d3d9ex has unaccounted for todo messages The report seems to have been truncated
Looks like I missed the dxgi test, and it seems to behave differently from d3d9 wrt. client rect and maybe window styles.
The other failures are a bit weird though.
On Sat, 7 Mar 2020 at 14:01, Rémi Bernon rbernon@codeweavers.com wrote:
dlls/d3d8/tests/device.c | 10 ++--- dlls/d3d9/tests/d3d9ex.c | 14 +++--- dlls/d3d9/tests/device.c | 14 +++--- dlls/wined3d/adapter_gl.c | 2 + dlls/wined3d/swapchain.c | 78 ++++++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_gl.h | 1 + dlls/wined3d/wined3d_private.h | 2 + 7 files changed, 106 insertions(+), 15 deletions(-)
I think you missed "swapchain_no3d_ops".
Am 07.03.20 um 13:29 schrieb Rémi Bernon:
This wine-specific extension will allow us to correctly implement fullscreen-exclusive windows without manipulating the window styles.
Did you look for ways to make it opengl independent so that we don't need a separate Vulkan extension? E.g. ExtEscape might provide a way to do it, although it operates on HDCs rather than HWNDs.
On 3/8/20 10:16 AM, Stefan Dösinger wrote:
Am 07.03.20 um 13:29 schrieb Rémi Bernon:
This wine-specific extension will allow us to correctly implement fullscreen-exclusive windows without manipulating the window styles.
Did you look for ways to make it opengl independent so that we don't need a separate Vulkan extension? E.g. ExtEscape might provide a way to do it, although it operates on HDCs rather than HWNDs.
Actually Vulkan has VK_EXT_full_screen_exclusive extension that may very well fit for the job, and that we will have to implement at some point anyway (I've been told that some games require it). I'm planning on implementing it as well, assuming it does the right thing on Windows.
I initially tried using a user32 wine extension, but it didn't seem very flexible. Then I didn't know of other ways to introduce extensions though, so ExtEscape may be another possibility, or as I've been also told, SetPropA with a wine specific prop.