Remove various patches (accepted upstream).

This commit is contained in:
Sebastian Lackner 2015-03-17 19:13:04 +01:00
parent de8e8a4079
commit 0486bc809f
10 changed files with 18 additions and 573 deletions

View File

@ -38,12 +38,11 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
===================================
**Bugfixes and features included in the next upcoming release [11]:**
**Bugfixes and features included in the next upcoming release [10]:**
* Add stub for PowerCreateRequest
* Fix caps lock state issues with multiple processes ([Wine Bug #35907](https://bugs.winehq.org/show_bug.cgi?id=35907))
* Fix multithreading issues with fullscreen clipping ([Wine Bug #38087](https://bugs.winehq.org/show_bug.cgi?id=38087))
* Fix wrong return values of RtlFindActivationContextSectionString for NULL data
* Fix wrong version of ID3DXEffect interface for d3dx9_24
* Fix wrong version of ID3DXEffect interface for d3dx9_25 ([Wine Bug #25138](https://bugs.winehq.org/show_bug.cgi?id=25138))
* GetMessage should remove already seen messages with higher priority ([Wine Bug #28884](https://bugs.winehq.org/show_bug.cgi?id=28884))

2
debian/changelog vendored
View File

@ -22,6 +22,8 @@ wine-staging (1.7.39) UNRELEASED; urgency=low
* Removed patch to avoid hardcoded values for sizeof(GUID) (accepted upstream).
* Removed patches for SLGetWindowsInformationDWORD (accepted upstream).
* Removed patches for _ismbckata and _mbctohira (fixed upstream).
* Removed patches to fix wrong return values of RtlFindActivationContextSectionString for NULL data (accepted upstream).
* Removed patch for server-PeekMessage tests (accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 09 Mar 2015 16:52:35 +0100
wine-staging (1.7.38) unstable; urgency=low

View File

@ -1,209 +0,0 @@
From bf350677af12ec558208b215f6fcff61c7082bac Mon Sep 17 00:00:00 2001
From: Mark Jansen <learn0more@gmail.com>
Date: Sun, 15 Mar 2015 23:39:09 +0100
Subject: kernel32/tests: Parameter validation tests for FindActCtxSectionString
Highlight some differences between FindActCtxSectionString parameter validation, and its Rtl implementation.
---
dlls/kernel32/tests/actctx.c | 150 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 148 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index 60763b1..887c6b0 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -16,6 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
#include "wine/test.h"
#include <winbase.h>
#include <windef.h>
@@ -39,6 +41,10 @@ static BOOL (WINAPI *pQueryActCtxW)(DWORD,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE
static VOID (WINAPI *pReleaseActCtx)(HANDLE);
static BOOL (WINAPI *pFindActCtxSectionGuid)(DWORD,const GUID*,ULONG,const GUID*,PACTCTX_SECTION_KEYED_DATA);
+static NTSTATUS(NTAPI *pRtlFindActivationContextSectionString)(DWORD,const GUID *,ULONG,PUNICODE_STRING,PACTCTX_SECTION_KEYED_DATA);
+static BOOLEAN (NTAPI *pRtlCreateUnicodeStringFromAsciiz)(PUNICODE_STRING, PCSZ);
+static VOID (NTAPI *pRtlFreeUnicodeString)(PUNICODE_STRING);
+
static const char* strw(LPCWSTR x)
{
static char buffer[1024];
@@ -2048,6 +2054,140 @@ static void test_app_manifest(void)
}
}
+static HANDLE create_manifest(const char *filename, const char *data, int line)
+{
+ HANDLE handle;
+ create_manifest_file(filename, data, -1, NULL, NULL);
+
+ handle = test_create(filename);
+ ok_(__FILE__, line)(handle != INVALID_HANDLE_VALUE,
+ "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError());
+
+ DeleteFileA(filename);
+ return handle;
+}
+
+static void kernel32_find(ULONG section, const char *string_to_find, BOOL should_find, BOOL todo, int line)
+{
+ UNICODE_STRING string_to_findW;
+ ACTCTX_SECTION_KEYED_DATA data;
+ BOOL ret;
+ DWORD err;
+
+ pRtlCreateUnicodeStringFromAsciiz(&string_to_findW, string_to_find);
+
+ memset(&data, 0xfe, sizeof(data));
+ data.cbSize = sizeof(data);
+
+ SetLastError(0);
+ ret = pFindActCtxSectionStringA(0, NULL, section, string_to_find, &data);
+ err = GetLastError();
+ ok_(__FILE__, line)(ret == should_find,
+ "FindActCtxSectionStringA: expected ret = %u, got %u\n", should_find, ret);
+ if (todo)
+ todo_wine
+ ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
+ "FindActCtxSectionStringA: unexpected error %u\n", err);
+ else
+ ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
+ "FindActCtxSectionStringA: unexpected error %u\n", err);
+
+ memset(&data, 0xfe, sizeof(data));
+ data.cbSize = sizeof(data);
+
+ SetLastError(0);
+ ret = pFindActCtxSectionStringW(0, NULL, section, string_to_findW.Buffer, &data);
+ err = GetLastError();
+ ok_(__FILE__, line)(ret == should_find,
+ "FindActCtxSectionStringW: expected ret = %u, got %u\n", should_find, ret);
+ if (todo)
+ todo_wine
+ ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
+ "FindActCtxSectionStringW: unexpected error %u\n", err);
+ else
+ ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
+ "FindActCtxSectionStringW: unexpected error %u\n", err);
+
+ SetLastError(0);
+ ret = pFindActCtxSectionStringA(0, NULL, section, string_to_find, NULL);
+ err = GetLastError();
+ ok_(__FILE__, line)(!ret,
+ "FindActCtxSectionStringA: expected failure, got %u\n", ret);
+ ok_(__FILE__, line)(err == ERROR_INVALID_PARAMETER,
+ "FindActCtxSectionStringA: unexpected error %u\n", err);
+
+ SetLastError(0);
+ ret = pFindActCtxSectionStringW(0, NULL, section, string_to_findW.Buffer, NULL);
+ err = GetLastError();
+ ok_(__FILE__, line)(!ret,
+ "FindActCtxSectionStringW: expected failure, got %u\n", ret);
+ ok_(__FILE__, line)(err == ERROR_INVALID_PARAMETER,
+ "FindActCtxSectionStringW: unexpected error %u\n", err);
+
+ pRtlFreeUnicodeString(&string_to_findW);
+}
+
+static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_find, BOOL todo, int line)
+{
+ UNICODE_STRING string_to_findW;
+ ACTCTX_SECTION_KEYED_DATA data;
+ NTSTATUS ret;
+
+ pRtlCreateUnicodeStringFromAsciiz(&string_to_findW, string_to_find);
+
+ memset(&data, 0xfe, sizeof(data));
+ data.cbSize = sizeof(data);
+
+ ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, &data);
+ if (todo)
+ todo_wine
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
+ else
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
+
+ ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, NULL);
+ todo_wine
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
+
+ pRtlFreeUnicodeString(&string_to_findW);
+}
+
+static void test_findsectionstring(void)
+{
+ HANDLE handle;
+ BOOL ret;
+ ULONG_PTR cookie;
+
+ handle = create_manifest("test.manifest", testdep_manifest3, __LINE__);
+ ret = pActivateActCtx(handle, &cookie);
+ ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
+
+ /* first we show the parameter validation from kernel32 */
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, TRUE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib.dll", TRUE, FALSE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib2.dll", TRUE, FALSE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib3.dll", FALSE, FALSE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass", TRUE, FALSE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass2", TRUE, FALSE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, FALSE, __LINE__);
+
+ /* then we show that ntdll plays by different rules */
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, TRUE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib.dll", TRUE, FALSE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib2.dll", TRUE, FALSE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib3.dll", FALSE, FALSE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass", TRUE, FALSE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass2", TRUE, FALSE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, FALSE, __LINE__);
+
+ ret = pDeactivateActCtx(0, cookie);
+ ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
+ pReleaseActCtx(handle);
+}
+
static void run_child_process(void)
{
char cmdline[MAX_PATH];
@@ -2263,9 +2403,9 @@ todo_wine
static BOOL init_funcs(void)
{
- HMODULE hKernel32 = GetModuleHandleA("kernel32.dll");
+ HMODULE hLibrary = GetModuleHandleA("kernel32.dll");
-#define X(f) if (!(p##f = (void*)GetProcAddress(hKernel32, #f))) return FALSE;
+#define X(f) if (!(p##f = (void*)GetProcAddress(hLibrary, #f))) return FALSE;
X(ActivateActCtx);
X(CreateActCtxA);
X(CreateActCtxW);
@@ -2277,6 +2417,11 @@ static BOOL init_funcs(void)
X(QueryActCtxW);
X(ReleaseActCtx);
X(FindActCtxSectionGuid);
+
+ hLibrary = GetModuleHandleA("ntdll.dll");
+ X(RtlFindActivationContextSectionString);
+ X(RtlCreateUnicodeStringFromAsciiz);
+ X(RtlFreeUnicodeString);
#undef X
return TRUE;
@@ -2303,5 +2448,6 @@ START_TEST(actctx)
test_actctx();
test_CreateActCtx();
+ test_findsectionstring();
run_child_process();
}
--
2.3.2

View File

@ -1,188 +0,0 @@
From ff94fa5c83c5f8c9e74ada24dfa8bc5c4e87f848 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 16 Mar 2015 03:38:58 +0100
Subject: ntdll: RtlFindActivationContextSectionString should accept a NULL
pointer as data.
---
dlls/kernel32/actctx.c | 8 ++++-
dlls/kernel32/tests/actctx.c | 10 ++++--
dlls/ntdll/actctx.c | 81 ++++++++++++++++++++++++--------------------
3 files changed, 59 insertions(+), 40 deletions(-)
diff --git a/dlls/kernel32/actctx.c b/dlls/kernel32/actctx.c
index bcf95ec..2eb1c2a 100644
--- a/dlls/kernel32/actctx.c
+++ b/dlls/kernel32/actctx.c
@@ -227,7 +227,7 @@ BOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags, const GUID* lpExtGuid,
TRACE("%08x %s %u %s %p\n", dwFlags, debugstr_guid(lpExtGuid),
ulId, debugstr_a(lpSearchStr), pInfo);
- if (!lpSearchStr)
+ if (!lpSearchStr || !pInfo)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@@ -255,6 +255,12 @@ BOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags, const GUID* lpExtGuid,
UNICODE_STRING us;
NTSTATUS status;
+ if (!pInfo)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
RtlInitUnicodeString(&us, lpSearchStr);
if ((status = RtlFindActivationContextSectionString(dwFlags, lpExtGuid, ulId, &us, pInfo)))
{
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index 887c6b0..7512aed 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -2148,9 +2148,13 @@ static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_fi
"RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, NULL);
- todo_wine
- ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
- "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
+ if (todo)
+ todo_wine
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
+ else
+ ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
+ "RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
pRtlFreeUnicodeString(&string_to_findW);
}
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index 20a98ec..638daac 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -3134,19 +3134,22 @@ static NTSTATUS find_dll_redirection(ACTIVATION_CONTEXT* actctx, const UNICODE_S
index = find_string_index(actctx->dllredirect_section, name);
if (!index) return STATUS_SXS_KEY_NOT_FOUND;
- dll = get_dllredirect_data(actctx, index);
+ if (data)
+ {
+ dll = get_dllredirect_data(actctx, index);
- data->ulDataFormatVersion = 1;
- data->lpData = dll;
- data->ulLength = dll->size;
- data->lpSectionGlobalData = NULL;
- data->ulSectionGlobalDataLength = 0;
- data->lpSectionBase = actctx->dllredirect_section;
- data->ulSectionTotalLength = RtlSizeHeap( GetProcessHeap(), 0, actctx->dllredirect_section );
- data->hActCtx = NULL;
+ data->ulDataFormatVersion = 1;
+ data->lpData = dll;
+ data->ulLength = dll->size;
+ data->lpSectionGlobalData = NULL;
+ data->ulSectionGlobalDataLength = 0;
+ data->lpSectionBase = actctx->dllredirect_section;
+ data->ulSectionTotalLength = RtlSizeHeap( GetProcessHeap(), 0, actctx->dllredirect_section );
+ data->hActCtx = NULL;
- if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
- data->ulAssemblyRosterIndex = index->rosterindex;
+ if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
+ data->ulAssemblyRosterIndex = index->rosterindex;
+ }
return STATUS_SUCCESS;
}
@@ -3343,20 +3346,23 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
if (!index) return STATUS_SXS_KEY_NOT_FOUND;
- class = get_wndclass_data(actctx, index);
+ if (data)
+ {
+ class = get_wndclass_data(actctx, index);
- data->ulDataFormatVersion = 1;
- data->lpData = class;
- /* full length includes string length with nulls */
- data->ulLength = class->size + class->name_len + class->module_len + 2*sizeof(WCHAR);
- data->lpSectionGlobalData = NULL;
- data->ulSectionGlobalDataLength = 0;
- data->lpSectionBase = actctx->wndclass_section;
- data->ulSectionTotalLength = RtlSizeHeap( GetProcessHeap(), 0, actctx->wndclass_section );
- data->hActCtx = NULL;
+ data->ulDataFormatVersion = 1;
+ data->lpData = class;
+ /* full length includes string length with nulls */
+ data->ulLength = class->size + class->name_len + class->module_len + 2*sizeof(WCHAR);
+ data->lpSectionGlobalData = NULL;
+ data->ulSectionGlobalDataLength = 0;
+ data->lpSectionBase = actctx->wndclass_section;
+ data->ulSectionTotalLength = RtlSizeHeap( GetProcessHeap(), 0, actctx->wndclass_section );
+ data->hActCtx = NULL;
- if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
- data->ulAssemblyRosterIndex = index->rosterindex;
+ if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
+ data->ulAssemblyRosterIndex = index->rosterindex;
+ }
return STATUS_SUCCESS;
}
@@ -4398,19 +4404,22 @@ static NTSTATUS find_progid_redirection(ACTIVATION_CONTEXT* actctx, const UNICOD
index = find_string_index(actctx->progid_section, name);
if (!index) return STATUS_SXS_KEY_NOT_FOUND;
- progid = get_progid_data(actctx, index);
+ if (data)
+ {
+ progid = get_progid_data(actctx, index);
- data->ulDataFormatVersion = 1;
- data->lpData = progid;
- data->ulLength = progid->size;
- data->lpSectionGlobalData = (BYTE*)actctx->progid_section + actctx->progid_section->global_offset;
- data->ulSectionGlobalDataLength = actctx->progid_section->global_len;
- data->lpSectionBase = actctx->progid_section;
- data->ulSectionTotalLength = RtlSizeHeap( GetProcessHeap(), 0, actctx->progid_section );
- data->hActCtx = NULL;
+ data->ulDataFormatVersion = 1;
+ data->lpData = progid;
+ data->ulLength = progid->size;
+ data->lpSectionGlobalData = (BYTE*)actctx->progid_section + actctx->progid_section->global_offset;
+ data->ulSectionGlobalDataLength = actctx->progid_section->global_len;
+ data->lpSectionBase = actctx->progid_section;
+ data->ulSectionTotalLength = RtlSizeHeap( GetProcessHeap(), 0, actctx->progid_section );
+ data->hActCtx = NULL;
- if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
- data->ulAssemblyRosterIndex = index->rosterindex;
+ if (data->cbSize >= FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) + sizeof(ULONG))
+ data->ulAssemblyRosterIndex = index->rosterindex;
+ }
return STATUS_SUCCESS;
}
@@ -4442,7 +4451,7 @@ static NTSTATUS find_string(ACTIVATION_CONTEXT* actctx, ULONG section_kind,
if (status != STATUS_SUCCESS) return status;
- if (flags & FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX)
+ if (data && (flags & FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX))
{
actctx_addref(actctx);
data->hActCtx = actctx;
@@ -5009,7 +5018,7 @@ NTSTATUS WINAPI RtlFindActivationContextSectionString( ULONG flags, const GUID *
FIXME("unknown flags %08x\n", flags);
return STATUS_INVALID_PARAMETER;
}
- if (!data || data->cbSize < offsetof(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) ||
+ if ((data && data->cbSize < offsetof(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex)) ||
!section_name || !section_name->Buffer)
{
WARN("invalid parameter\n");
--
2.3.2

View File

@ -1 +0,0 @@
Fixes: Fix wrong return values of RtlFindActivationContextSectionString for NULL data

View File

@ -2811,15 +2811,11 @@ fi
# Patchset ntdll-Activation_Context
# |
# | Modified files:
# | * dlls/kernel32/actctx.c, dlls/kernel32/tests/actctx.c, dlls/ntdll/actctx.c
# | * dlls/kernel32/tests/actctx.c, dlls/ntdll/actctx.c
# |
if test "$enable_ntdll_Activation_Context" -eq 1; then
patch_apply ntdll-Activation_Context/0001-kernel32-Parameter-validation-tests-for-FindActCtxSe.patch
patch_apply ntdll-Activation_Context/0002-ntdll-RtlFindActivationContextSectionString-should-a.patch
patch_apply ntdll-Activation_Context/0003-ntdll-Fix-return-value-for-missing-ACTIVATION_CONTEX.patch
patch_apply ntdll-Activation_Context/0001-ntdll-Fix-return-value-for-missing-ACTIVATION_CONTEX.patch
(
echo '+ { "Mark Jansen", "kernel32/tests: Parameter validation tests for FindActCtxSectionString.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: RtlFindActivationContextSectionString should accept a NULL pointer as data.", 1 },';
echo '+ { "Sebastian Lackner", "ntdll: Fix return value for missing ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION key.", 1 },';
) >> "$patchlist"
fi
@ -3710,10 +3706,8 @@ fi
# | * dlls/user32/tests/msg.c, server/queue.c
# |
if test "$enable_server_PeekMessage" -eq 1; then
patch_apply server-PeekMessage/0001-user32-tests-Add-tests-for-removing-already-seen-mes.patch
patch_apply server-PeekMessage/0002-server-Fix-handling-of-GetMessage-after-previous-Pee.patch
patch_apply server-PeekMessage/0001-server-Fix-handling-of-GetMessage-after-previous-Pee.patch
(
echo '+ { "Sebastian Lackner", "user32/tests: Add tests for removing already seen messages from the queue.", 1 },';
echo '+ { "Sebastian Lackner", "server: Fix handling of GetMessage after previous PeekMessage call.", 1 },';
) >> "$patchlist"
fi

View File

@ -23,7 +23,7 @@ index c297e40..19ddfde 100644
ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
- todo_wine
ok(ret &&msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -10475,10 +10472,8 @@ static void test_PeekMessage3(void)
@ -45,7 +45,7 @@ index c297e40..19ddfde 100644
ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
- todo_wine
ok(ret &&msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -10521,10 +10514,8 @@ static void test_PeekMessage3(void)
@ -53,7 +53,7 @@ index c297e40..19ddfde 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
- todo_wine
ok(ret &&msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
- todo_wine
ok(ret && msg.message == WM_USER + 1, "msg.message = %u instead of WM_USER + 1\n", msg.message);

View File

@ -1,150 +0,0 @@
From ad090f56d989fe29223aff05cc4fb26066ba4a49 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Tue, 17 Mar 2015 04:26:33 +0100
Subject: user32/tests: Add tests for removing already seen messages from the
queue.
---
dlls/user32/tests/msg.c | 119 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 119 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index f1236cf..c297e40 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -10440,6 +10440,124 @@ done:
flush_events();
}
+static void test_PeekMessage3(void)
+{
+ HWND hwnd;
+ BOOL ret;
+ MSG msg;
+
+ hwnd = CreateWindowA("TestWindowClass", "PeekMessage3", WS_OVERLAPPEDWINDOW,
+ 10, 10, 800, 800, NULL, NULL, NULL, NULL);
+ ok(hwnd != NULL, "expected hwnd != NULL\n");
+ flush_events();
+
+ /* GetMessage() and PeekMessage(..., PM_REMOVE) should prefer messages which
+ * were already seen. */
+
+ SetTimer(hwnd, 1, 0, NULL);
+ while (!PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE));
+ ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ PostMessageA(hwnd, WM_USER, 0, 0);
+ ret = PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE);
+ todo_wine
+ ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ todo_wine
+ ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ todo_wine
+ ok(ret &&msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
+ ret = PeekMessageA(&msg, NULL, 0, 0, 0);
+ ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
+
+ SetTimer(hwnd, 1, 0, NULL);
+ while (!PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE));
+ ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ PostMessageA(hwnd, WM_USER, 0, 0);
+ ret = PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE);
+ todo_wine
+ ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE);
+ todo_wine
+ ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
+ ret = PeekMessageA(&msg, NULL, 0, 0, 0);
+ ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
+
+ /* It doesn't matter if a message range is specified or not. */
+
+ SetTimer(hwnd, 1, 0, NULL);
+ while (!PeekMessageA(&msg, NULL, WM_TIMER, WM_TIMER, PM_NOREMOVE));
+ ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ PostMessageA(hwnd, WM_USER, 0, 0);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ todo_wine
+ ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ todo_wine
+ ok(ret &&msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
+ ret = PeekMessageA(&msg, NULL, 0, 0, 0);
+ ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
+
+ /* But not if the post messages were added before the PeekMessage() call. */
+
+ PostMessageA(hwnd, WM_USER, 0, 0);
+ SetTimer(hwnd, 1, 0, NULL);
+ while (!PeekMessageA(&msg, NULL, WM_TIMER, WM_TIMER, PM_NOREMOVE));
+ ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ ok(ret &&msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = PeekMessageA(&msg, NULL, 0, 0, 0);
+ ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
+
+ /* More complicated test with multiple messages. */
+
+ PostMessageA(hwnd, WM_USER, 0, 0);
+ SetTimer(hwnd, 1, 0, NULL);
+ while (!PeekMessageA(&msg, NULL, WM_TIMER, WM_TIMER, PM_NOREMOVE));
+ ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ PostMessageA(hwnd, WM_USER + 1, 0, 0);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ todo_wine
+ ok(ret &&msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ todo_wine
+ ok(ret && msg.message == WM_USER + 1, "msg.message = %u instead of WM_USER + 1\n", msg.message);
+ ret = PeekMessageA(&msg, NULL, 0, 0, 0);
+ ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
+
+ /* Also works for posted messages, but the situation is a bit different,
+ * because both messages are in the same queue. */
+
+ PostMessageA(hwnd, WM_TIMER, 0, 0);
+ while (!PeekMessageA(&msg, NULL, WM_TIMER, WM_TIMER, PM_NOREMOVE));
+ ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ PostMessageA(hwnd, WM_USER, 0, 0);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ ok(ret &&msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
+ ret = PeekMessageA(&msg, NULL, 0, 0, 0);
+ ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
+
+ PostMessageA(hwnd, WM_USER, 0, 0);
+ PostMessageA(hwnd, WM_TIMER, 0, 0);
+ while (!PeekMessageA(&msg, NULL, WM_TIMER, WM_TIMER, PM_NOREMOVE));
+ ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ ok(ret &&msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = PeekMessageA(&msg, NULL, 0, 0, 0);
+ ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
+
+ DestroyWindow(hwnd);
+ flush_events();
+}
+
static INT_PTR CALLBACK wm_quit_dlg_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
{
struct recvd_message msg;
@@ -14563,6 +14681,7 @@ START_TEST(msg)
test_ShowWindow();
test_PeekMessage();
test_PeekMessage2();
+ test_PeekMessage3();
test_WaitForInputIdle( test_argv[0] );
test_scrollwindowex();
test_messages();
--
2.3.2

View File

@ -1,4 +1,4 @@
From ac8dd1c1c96f8e932a32d80ff854856c3833c20f Mon Sep 17 00:00:00 2001
From 959e6121ddf32e681f48c97845548b72a0d48fda Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 24 Sep 2014 21:13:59 +0200
Subject: winemenubuilder: Create desktop shortcuts with absolute wine path.
@ -10,8 +10,8 @@ behaviour on Linux, because some other distros are a bit special (FreeBSD requir
wine, and so on ...).
---
programs/winemenubuilder/Makefile.in | 1 +
programs/winemenubuilder/winemenubuilder.c | 17 +++++++++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
programs/winemenubuilder/winemenubuilder.c | 15 ++++++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/programs/winemenubuilder/Makefile.in b/programs/winemenubuilder/Makefile.in
index 07e2702..a4e28ad 100644
@ -26,15 +26,13 @@ index 07e2702..a4e28ad 100644
C_SRCS = \
winemenubuilder.c
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index fba3664..72f2a7a 100644
index 4a5639b..6ae7710 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -103,7 +103,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(menubuilder);
(csidl)==CSIDL_COMMON_DESKTOPDIRECTORY)
@@ -104,6 +104,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(menubuilder);
#define in_startmenu(csidl) ((csidl)==CSIDL_STARTMENU || \
(csidl)==CSIDL_COMMON_STARTMENU)
-
+
+/* On linux we create all menu item entries with an absolute path to wine,
+ * in order to allow using multiple wine versions at the same time. */
+#ifdef __linux__
@ -46,7 +44,7 @@ index fba3664..72f2a7a 100644
/* link file formats */
#include "pshpack1.h"
@@ -1455,8 +1463,8 @@ static BOOL write_desktop_entry(const char *unix_link, const char *location, con
@@ -1488,8 +1496,8 @@ static BOOL write_desktop_entry(const char *unix_link, const char *location, con
fprintf(file, "[Desktop Entry]\n");
fprintf(file, "Name=%s\n", linkname);
@ -57,7 +55,7 @@ index fba3664..72f2a7a 100644
fprintf(file, "Type=Application\n");
fprintf(file, "StartupNotify=true\n");
if (descr && lstrlenA(descr))
@@ -2529,7 +2537,8 @@ static BOOL write_freedesktop_association_entry(const char *desktopPath, const c
@@ -2540,7 +2548,8 @@ static BOOL write_freedesktop_association_entry(const char *desktopPath, const c
fprintf(desktop, "Type=Application\n");
fprintf(desktop, "Name=%s\n", friendlyAppName);
fprintf(desktop, "MimeType=%s;\n", mimeType);
@ -68,5 +66,5 @@ index fba3664..72f2a7a 100644
fprintf(desktop, "StartupNotify=true\n");
if (openWithIcon)
--
2.1.0
2.3.2