Added patch to allow setting pixel format for desktop window.

This commit is contained in:
Sebastian Lackner 2015-06-04 00:21:47 +02:00
parent 9acb14c728
commit 002f664b68
5 changed files with 221 additions and 127 deletions

View File

@ -39,9 +39,10 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features included in the next upcoming release [7]:**
**Bug fixes and features included in the next upcoming release [8]:**
* Add implementation for kernel32.GetNumaProcessorNode ([Wine Bug #38660](https://bugs.winehq.org/show_bug.cgi?id=38660))
* Allow to set pixel format for desktop window
* Implement mscoree._CorValidateImage for mono runtime ([Wine Bug #38662](https://bugs.winehq.org/show_bug.cgi?id=38662))
* Implement proper handling of CLI .NET images in Wine library loader ([Wine Bug #38661](https://bugs.winehq.org/show_bug.cgi?id=38661))
* Multiple applications needs better NtQueryInformationJobObject stub ([Wine Bug #38658](https://bugs.winehq.org/show_bug.cgi?id=38658))

1
debian/changelog vendored
View File

@ -21,6 +21,7 @@ wine-staging (1.7.45) UNRELEASED; urgency=low
with ERROR_MORE_DATA.
* Added patch to set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe
in NtQueryInformationFile.
* Added patch to allow setting pixel format for desktop window.
* Removed patch to fix NULL pointer dereference in get_frame_by_name
(identical patch accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 31 May 2015 14:46:37 +0200

View File

@ -0,0 +1,75 @@
From aced729294b868190d7c133a17e357f56e2c29d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 3 Jun 2015 22:57:21 +0200
Subject: winex11.drv: Allow changing the opengl pixel format on the desktop
window.
This patch is not 100% correct because the old behavior was more similar to
windows. However, Direct3D supports using the desktop window to create a
context and since Wine translates Direct3D to OpenGL, using the desktop
window will fail because of this limitation. Unless someone comes up with
a more correct solution or finds an application that breaks because of this,
it seems to be a suitable workaround as it fixes multiple applications.
---
dlls/d3d9/tests/device.c | 16 ++++++++++++++++
dlls/winex11.drv/opengl.c | 5 ++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index cb4a6e8..7872b32 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -10152,6 +10152,21 @@ static void test_resource_priority(void)
DestroyWindow(window);
}
+static void test_desktop_window(void)
+{
+ IDirect3DDevice9 *device = NULL;
+ IDirect3D9 *d3d;
+
+ d3d = Direct3DCreate9(D3D_SDK_VERSION);
+ ok(!!d3d, "Failed to create a D3D object.\n");
+
+ device = create_device(d3d, GetDesktopWindow(), NULL);
+ ok(!!device, "Failed to created device on desktop window.\n");
+
+ if (device) IDirect3DDevice9_Release(device);
+ IDirect3D9_Release(d3d);
+}
+
START_TEST(device)
{
WNDCLASSA wc = {0};
@@ -10262,6 +10277,7 @@ START_TEST(device)
test_writeonly_resource();
test_lost_device();
test_resource_priority();
+ test_desktop_window();
UnregisterClassA("d3d9_test_wc", GetModuleHandleA(NULL));
}
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 7b8ba82..72445fb 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1436,12 +1436,15 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
TRACE("(%p,%d)\n", hdc, format);
- if (!hwnd || hwnd == GetDesktopWindow())
+ if (!hwnd)
{
WARN( "not a valid window DC %p/%p\n", hdc, hwnd );
return FALSE;
}
+ if (hwnd == GetDesktopWindow())
+ FIXME("Using desktop window for OpenGL is not supported on windows\n");
+
fmt = get_pixel_format(gdi_display, format, FALSE /* Offscreen */);
if (!fmt)
{
--
2.4.2

View File

@ -0,0 +1 @@
Fixes: Allow to set pixel format for desktop window

View File

@ -90,6 +90,7 @@ patch_enable_all ()
enable_crypt32_CMS_Certificates="$1"
enable_d3d11_D3D11CreateDeviceAndSwapChain="$1"
enable_d3d8_Hotpatch="$1"
enable_d3d9_DesktopWindow="$1"
enable_d3d9_Skip_Tests="$1"
enable_d3d9_Surface_Refcount="$1"
enable_d3drm_Specfile="$1"
@ -341,6 +342,9 @@ patch_enable ()
d3d8-Hotpatch)
enable_d3d8_Hotpatch="$2"
;;
d3d9-DesktopWindow)
enable_d3d9_DesktopWindow="$2"
;;
d3d9-Skip_Tests)
enable_d3d9_Skip_Tests="$2"
;;
@ -1829,13 +1833,6 @@ if test "$enable_kernel32_CopyFileEx" -eq 1; then
enable_ntdll_FileDispositionInformation=1
fi
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
if test "$enable_kernel32_SetFileCompletionNotificationMode" -gt 1; then
abort "Patchset kernel32-SetFileCompletionNotificationMode disabled, but kernel32-SetFileInformationByHandle depends on that."
fi
enable_kernel32_SetFileCompletionNotificationMode=1
fi
if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
if test "$enable_server_File_Permissions" -gt 1; then
abort "Patchset server-File_Permissions disabled, but ntdll-FileDispositionInformation depends on that."
@ -1843,6 +1840,13 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
enable_server_File_Permissions=1
fi
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
if test "$enable_kernel32_SetFileCompletionNotificationMode" -gt 1; then
abort "Patchset kernel32-SetFileCompletionNotificationMode disabled, but kernel32-SetFileInformationByHandle depends on that."
fi
enable_kernel32_SetFileCompletionNotificationMode=1
fi
if test "$enable_dxva2_Video_Decoder" -eq 1; then
if test "$enable_winecfg_Staging" -gt 1; then
abort "Patchset winecfg-Staging disabled, but dxva2-Video_Decoder depends on that."
@ -2045,6 +2049,23 @@ if test "$enable_Staging" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-Misc_ACL
# |
# | This patchset fixes the following Wine bugs:
# | * [#15980] GetSecurityInfo returns NULL DACL for process object
# |
# | Modified files:
# | * dlls/advapi32/tests/security.c, server/process.c, server/security.h, server/token.c
# |
if test "$enable_server_Misc_ACL" -eq 1; then
patch_apply server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch
patch_apply server-Misc_ACL/0002-server-Add-default-security-descriptor-DACL-for-proc.patch
(
echo '+ { "Erich E. Hoover", "server: Add default security descriptor ownership for processes.", 1 },';
echo '+ { "Erich E. Hoover", "server: Add default security descriptor DACL for processes.", 1 },';
) >> "$patchlist"
fi
# Patchset server-CreateProcess_ACLs
# |
# | This patchset fixes the following Wine bugs:
@ -2064,23 +2085,6 @@ if test "$enable_server_CreateProcess_ACLs" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-Misc_ACL
# |
# | This patchset fixes the following Wine bugs:
# | * [#15980] GetSecurityInfo returns NULL DACL for process object
# |
# | Modified files:
# | * dlls/advapi32/tests/security.c, server/process.c, server/security.h, server/token.c
# |
if test "$enable_server_Misc_ACL" -eq 1; then
patch_apply server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch
patch_apply server-Misc_ACL/0002-server-Add-default-security-descriptor-DACL-for-proc.patch
(
echo '+ { "Erich E. Hoover", "server: Add default security descriptor ownership for processes.", 1 },';
echo '+ { "Erich E. Hoover", "server: Add default security descriptor DACL for processes.", 1 },';
) >> "$patchlist"
fi
# Patchset advapi32-LsaLookupSids
# |
# | Modified files:
@ -2222,6 +2226,18 @@ if test "$enable_d3d8_Hotpatch" -eq 1; then
) >> "$patchlist"
fi
# Patchset d3d9-DesktopWindow
# |
# | Modified files:
# | * dlls/d3d9/tests/device.c, dlls/winex11.drv/opengl.c
# |
if test "$enable_d3d9_DesktopWindow" -eq 1; then
patch_apply d3d9-DesktopWindow/0001-winex11.drv-Allow-changing-the-opengl-pixel-format-o.patch
(
echo '+ { "Michael Müller", "winex11.drv: Allow changing the opengl pixel format on the desktop window.", 1 },';
) >> "$patchlist"
fi
# Patchset d3d9-Skip_Tests
# |
# | Modified files:
@ -2954,6 +2970,36 @@ if test "$enable_kernel32_CompareStringEx" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileCompletionNotificationMode
# |
# | This patchset fixes the following Wine bugs:
# | * [#38493] Add stub for kernel32.SetFileCompletionNotificationModes (for Steam in Win7 mode)
# |
# | Modified files:
# | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/kernel32/file.c,
# | dlls/kernel32/kernel32.spec, include/winbase.h
# |
if test "$enable_kernel32_SetFileCompletionNotificationMode" -eq 1; then
patch_apply kernel32-SetFileCompletionNotificationMode/0001-kernel32-Implement-SetFileCompletionNotificationMode.patch
(
echo '+ { "Olivier F. R. Dierick", "kernel32: Implement SetFileCompletionNotificationModes as a stub.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * dlls/kernel32/file.c, include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset server-File_Permissions
# |
# | Modified files:
@ -3025,36 +3071,6 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileCompletionNotificationMode
# |
# | This patchset fixes the following Wine bugs:
# | * [#38493] Add stub for kernel32.SetFileCompletionNotificationModes (for Steam in Win7 mode)
# |
# | Modified files:
# | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/kernel32/file.c,
# | dlls/kernel32/kernel32.spec, include/winbase.h
# |
if test "$enable_kernel32_SetFileCompletionNotificationMode" -eq 1; then
patch_apply kernel32-SetFileCompletionNotificationMode/0001-kernel32-Implement-SetFileCompletionNotificationMode.patch
(
echo '+ { "Olivier F. R. Dierick", "kernel32: Implement SetFileCompletionNotificationModes as a stub.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * dlls/kernel32/file.c, include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-CopyFileEx
# |
# | This patchset fixes the following Wine bugs:
@ -4200,27 +4216,6 @@ if test "$enable_secur32_ANSI_NTLM_Credentials" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-ObjectTypeInformation
# |
# | Modified files:
# | * dlls/ntdll/om.c, dlls/ntdll/tests/om.c, server/change.c, server/completion.c, server/directory.c, server/file.c,
# | server/handle.c, server/object.h, server/protocol.def
# |
if test "$enable_server_ObjectTypeInformation" -eq 1; then
patch_apply server-ObjectTypeInformation/0001-ntdll-Implemenent-ObjectTypeInformation-class-suppor.patch
patch_apply server-ObjectTypeInformation/0002-ntdll-tests-Add-a-few-more-ObjectTypeInformation-tes.patch
patch_apply server-ObjectTypeInformation/0003-server-Fix-type-name-of-IoCompletion.patch
patch_apply server-ObjectTypeInformation/0004-server-Fix-type-name-of-File.patch
patch_apply server-ObjectTypeInformation/0005-server-Fix-type-name-of-directory-file.patch
(
echo '+ { "Qian Hong", "ntdll: Implemenent ObjectTypeInformation class support in NtQueryObject.", 2 },';
echo '+ { "Qian Hong", "ntdll/tests: Add a few more ObjectTypeInformation tests.", 1 },';
echo '+ { "Qian Hong", "server: Fix type name of IoCompletion.", 1 },';
echo '+ { "Qian Hong", "server: Fix type name of File.", 1 },';
echo '+ { "Qian Hong", "server: Fix type name of directory file.", 1 },';
) >> "$patchlist"
fi
# Patchset server-RootDirectory_File
# |
# | Modified files:
@ -4261,6 +4256,27 @@ if test "$enable_server_Stored_ACLs" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-ObjectTypeInformation
# |
# | Modified files:
# | * dlls/ntdll/om.c, dlls/ntdll/tests/om.c, server/change.c, server/completion.c, server/directory.c, server/file.c,
# | server/handle.c, server/object.h, server/protocol.def
# |
if test "$enable_server_ObjectTypeInformation" -eq 1; then
patch_apply server-ObjectTypeInformation/0001-ntdll-Implemenent-ObjectTypeInformation-class-suppor.patch
patch_apply server-ObjectTypeInformation/0002-ntdll-tests-Add-a-few-more-ObjectTypeInformation-tes.patch
patch_apply server-ObjectTypeInformation/0003-server-Fix-type-name-of-IoCompletion.patch
patch_apply server-ObjectTypeInformation/0004-server-Fix-type-name-of-File.patch
patch_apply server-ObjectTypeInformation/0005-server-Fix-type-name-of-directory-file.patch
(
echo '+ { "Qian Hong", "ntdll: Implemenent ObjectTypeInformation class support in NtQueryObject.", 2 },';
echo '+ { "Qian Hong", "ntdll/tests: Add a few more ObjectTypeInformation tests.", 1 },';
echo '+ { "Qian Hong", "server: Fix type name of IoCompletion.", 1 },';
echo '+ { "Qian Hong", "server: Fix type name of File.", 1 },';
echo '+ { "Qian Hong", "server: Fix type name of directory file.", 1 },';
) >> "$patchlist"
fi
# Patchset server-Inherited_ACLs
# |
# | This patchset fixes the following Wine bugs:
@ -5096,57 +5112,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-UnhandledBlendFactor
# |
# | Modified files:
# | * dlls/wined3d/state.c
# |
if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
patch_apply wined3d-UnhandledBlendFactor/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-wined3d_swapchain_present
# |
# | Modified files:
# | * dlls/wined3d/swapchain.c
# |
if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
patch_apply wined3d-wined3d_swapchain_present/0001-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-resource_check_usage
# |
# | Modified files:
# | * dlls/wined3d/resource.c
# |
if test "$enable_wined3d_resource_check_usage" -eq 1; then
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
(
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
) >> "$patchlist"
fi
# Patchset wined3d-Multisampling
# |
# | This patchset fixes the following Wine bugs:
# | * [#12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE.
# |
# | Modified files:
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_Multisampling" -eq 1; then
patch_apply wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch
(
echo '+ { "Austin English", "wined3d: Allow to specify multisampling AA quality levels via registry.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-Revert_PixelFormat
# |
# | This patchset fixes the following Wine bugs:
@ -5181,6 +5146,57 @@ if test "$enable_wined3d_Revert_PixelFormat" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-resource_check_usage
# |
# | Modified files:
# | * dlls/wined3d/resource.c
# |
if test "$enable_wined3d_resource_check_usage" -eq 1; then
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
(
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
) >> "$patchlist"
fi
# Patchset wined3d-UnhandledBlendFactor
# |
# | Modified files:
# | * dlls/wined3d/state.c
# |
if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
patch_apply wined3d-UnhandledBlendFactor/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-wined3d_swapchain_present
# |
# | Modified files:
# | * dlls/wined3d/swapchain.c
# |
if test "$enable_wined3d_wined3d_swapchain_present" -eq 1; then
patch_apply wined3d-wined3d_swapchain_present/0001-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-Multisampling
# |
# | This patchset fixes the following Wine bugs:
# | * [#12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE.
# |
# | Modified files:
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_Multisampling" -eq 1; then
patch_apply wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch
(
echo '+ { "Austin English", "wined3d: Allow to specify multisampling AA quality levels via registry.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Main
# |
# | This patchset fixes the following Wine bugs: