mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against 92f38bc8790cbfb31badf97a211ed890ac00c1db.
This commit is contained in:
parent
c45c01449e
commit
bfff924f04
@ -1,4 +1,4 @@
|
||||
From a259cb0c3a69913d6656ef3043a263ec5ad3ea05 Mon Sep 17 00:00:00 2001
|
||||
From f02dd0110ae95771a6e44a608c724d964fab7f68 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 28 Mar 2015 08:18:10 +0100
|
||||
Subject: dsound: Apply filters before sound is multiplied to speakers.
|
||||
@ -7,24 +7,24 @@ Based on a patch by Mark Harmstone.
|
||||
---
|
||||
dlls/dsound/dsound.c | 2 +
|
||||
dlls/dsound/dsound_private.h | 4 +-
|
||||
dlls/dsound/mixer.c | 110 ++++++++++++++++++++++++++++++-------------
|
||||
dlls/dsound/mixer.c | 110 ++++++++++++++++++++++++-----------
|
||||
3 files changed, 81 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
|
||||
index 68902d723af..449830ae83f 100644
|
||||
index 71ede7d8..cc8b4444 100644
|
||||
--- a/dlls/dsound/dsound.c
|
||||
+++ b/dlls/dsound/dsound.c
|
||||
@@ -234,6 +234,8 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
|
||||
IAudioStreamVolume_Release(device->volume);
|
||||
@@ -233,6 +233,8 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
|
||||
if(device->mmdevice)
|
||||
IMMDevice_Release(device->mmdevice);
|
||||
CloseHandle(device->sleepev);
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, device->dsp_buffer);
|
||||
HeapFree(GetProcessHeap(), 0, device->tmp_buffer);
|
||||
HeapFree(GetProcessHeap(), 0, device->cp_buffer);
|
||||
HeapFree(GetProcessHeap(), 0, device->buffer);
|
||||
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
|
||||
index 985a7a2526b..45232cbd729 100644
|
||||
index c9ae7fd7..371cc5fb 100644
|
||||
--- a/dlls/dsound/dsound_private.h
|
||||
+++ b/dlls/dsound/dsound_private.h
|
||||
@@ -90,8 +90,8 @@ struct DirectSoundDevice
|
||||
@ -39,7 +39,7 @@ index 985a7a2526b..45232cbd729 100644
|
||||
DSVOLUMEPAN volpan;
|
||||
|
||||
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
|
||||
index 23e5bbcf7c7..e5211deaeeb 100644
|
||||
index 1643e7d4..d4dbdc15 100644
|
||||
--- a/dlls/dsound/mixer.c
|
||||
+++ b/dlls/dsound/mixer.c
|
||||
@@ -278,23 +278,22 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
|
||||
@ -231,5 +231,5 @@ index 23e5bbcf7c7..e5211deaeeb 100644
|
||||
|
||||
static void DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, INT frames)
|
||||
--
|
||||
2.13.1
|
||||
2.19.1
|
||||
|
||||
|
@ -1,95 +0,0 @@
|
||||
From d728af2b7217357b79716b0f25d457071c7e52ae Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 16 Aug 2017 02:45:23 +0200
|
||||
Subject: [PATCH] kernelbase: Add semi-stub for PathCchCombineEx.
|
||||
|
||||
---
|
||||
.../api-ms-win-core-path-l1-1-0.spec | 2 +-
|
||||
dlls/kernelbase/Makefile.in | 4 +++-
|
||||
dlls/kernelbase/kernelbase.spec | 2 +-
|
||||
dlls/kernelbase/path.c | 27 ++++++++++++++++++++++
|
||||
4 files changed, 32 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
|
||||
index 6896e4a8d4..5299b42c91 100644
|
||||
--- a/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec
|
||||
@@ -8,7 +8,7 @@
|
||||
@ stdcall PathCchCanonicalize(ptr long wstr) kernelbase.PathCchCanonicalize
|
||||
@ stdcall PathCchCanonicalizeEx(ptr long wstr long) kernelbase.PathCchCanonicalizeEx
|
||||
@ stub PathCchCombine
|
||||
-@ stub PathCchCombineEx
|
||||
+@ stdcall PathCchCombineEx(ptr long ptr ptr long) kernelbase.PathCchCombineEx
|
||||
@ stdcall PathCchFindExtension(wstr long ptr) kernelbase.PathCchFindExtension
|
||||
@ stdcall PathCchIsRoot(wstr) kernelbase.PathCchIsRoot
|
||||
@ stdcall PathCchRemoveBackslash(wstr long) kernelbase.PathCchRemoveBackslash
|
||||
diff --git a/dlls/kernelbase/Makefile.in b/dlls/kernelbase/Makefile.in
|
||||
index a7db45e4c1..78c19bd2a1 100644
|
||||
--- a/dlls/kernelbase/Makefile.in
|
||||
+++ b/dlls/kernelbase/Makefile.in
|
||||
@@ -1,4 +1,6 @@
|
||||
-MODULE = kernelbase.dll
|
||||
+MODULE = kernelbase.dll
|
||||
+IMPORTLIB = kernelbase
|
||||
+IMPORTS = shlwapi
|
||||
|
||||
C_SRCS = \
|
||||
main.c \
|
||||
diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec
|
||||
index 752d489fba..0f6637cdf2 100644
|
||||
--- a/dlls/kernelbase/kernelbase.spec
|
||||
+++ b/dlls/kernelbase/kernelbase.spec
|
||||
@@ -1037,7 +1037,7 @@
|
||||
@ stdcall PathCchCanonicalize(ptr long wstr)
|
||||
@ stdcall PathCchCanonicalizeEx(ptr long wstr long)
|
||||
# @ stub PathCchCombine
|
||||
-# @ stub PathCchCombineEx
|
||||
+@ stdcall PathCchCombineEx(ptr long ptr ptr long)
|
||||
@ stdcall PathCchFindExtension(wstr long ptr)
|
||||
@ stdcall PathCchIsRoot(wstr)
|
||||
@ stdcall PathCchRemoveBackslash(wstr long)
|
||||
diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c
|
||||
index cc15d1c097..ed1ca37280 100644
|
||||
--- a/dlls/kernelbase/path.c
|
||||
+++ b/dlls/kernelbase/path.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "pathcch.h"
|
||||
+#include "shlwapi.h"
|
||||
#include "strsafe.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
@@ -737,3 +738,29 @@ BOOL WINAPI PathIsUNCEx(const WCHAR *path, const WCHAR **server)
|
||||
if (server) *server = result;
|
||||
return result ? TRUE : FALSE;
|
||||
}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * PathCchCombineEx (KERNELBASE.@)
|
||||
+ */
|
||||
+HRESULT WINAPI PathCchCombineEx(WCHAR *out, SIZE_T size, const WCHAR *path1, const WCHAR *path2, DWORD flags)
|
||||
+{
|
||||
+ WCHAR result[MAX_PATH];
|
||||
+
|
||||
+ FIXME("(%p, %lu, %s, %s, %x): semi-stub\n", out, size, wine_dbgstr_w(path1), wine_dbgstr_w(path2), flags);
|
||||
+
|
||||
+ if (!out || !size) return E_INVALIDARG;
|
||||
+ if (flags) FIXME("Flags %x not supported\n", flags);
|
||||
+
|
||||
+ if (!PathCombineW(result, path1, path2))
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ if (strlenW(result) + 1 > size)
|
||||
+ {
|
||||
+ out[0] = 0;
|
||||
+ return STRSAFE_E_INSUFFICIENT_BUFFER;
|
||||
+ }
|
||||
+
|
||||
+ strcpyW(out, result);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
--
|
||||
2.14.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [42474] Implement kernelbase.PathCchCombineEx
|
@ -1,229 +0,0 @@
|
||||
From 48adc4c6f5342cc5b0299b4890a92684d5762756 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 19 Aug 2018 17:10:47 -0500
|
||||
Subject: [PATCH 01/17] ntoskrnl.exe: Implement KeWaitForMultipleObjects().
|
||||
|
||||
We have plenty of space in which to store a kernel handle inside a
|
||||
DISPATCHER_HEADER. However, the storage is volatile, and there is no way to
|
||||
know when to close it. Therefore, we create the handle when
|
||||
KeWaitForMultipleObjects() is called, and keep it open as long as at least
|
||||
one thread is waiting on the object.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/ntoskrnl.exe/Makefile.in | 3 +-
|
||||
dlls/ntoskrnl.exe/ntoskrnl.c | 13 -----
|
||||
dlls/ntoskrnl.exe/sync.c | 114 ++++++++++++++++++++++++++++++++++++++++++
|
||||
include/ddk/ntddk.h | 9 ----
|
||||
include/ddk/wdm.h | 10 ++++
|
||||
5 files changed, 126 insertions(+), 23 deletions(-)
|
||||
create mode 100644 dlls/ntoskrnl.exe/sync.c
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/Makefile.in b/dlls/ntoskrnl.exe/Makefile.in
|
||||
index 5b03c59..b8128fc 100644
|
||||
--- a/dlls/ntoskrnl.exe/Makefile.in
|
||||
+++ b/dlls/ntoskrnl.exe/Makefile.in
|
||||
@@ -5,6 +5,7 @@ DELAYIMPORTS = user32
|
||||
|
||||
C_SRCS = \
|
||||
instr.c \
|
||||
- ntoskrnl.c
|
||||
+ ntoskrnl.c \
|
||||
+ sync.c
|
||||
|
||||
RC_SRCS = ntoskrnl.rc
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
index 9fbf22d..28671c8 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
@@ -2297,19 +2297,6 @@ NTSTATUS WINAPI KeWaitForSingleObject(PVOID Object,
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
- * KeWaitForMultipleObjects (NTOSKRNL.EXE.@)
|
||||
- */
|
||||
-NTSTATUS WINAPI KeWaitForMultipleObjects(ULONG Count, PVOID Object[], WAIT_TYPE WaitType,
|
||||
- KWAIT_REASON WaitReason, KPROCESSOR_MODE WaitMode,
|
||||
- BOOLEAN Alertable, PLARGE_INTEGER Timeout,
|
||||
- PKWAIT_BLOCK WaitBlockArray)
|
||||
-{
|
||||
- FIXME( "stub: %u, %p, %d, %d, %d, %d, %p, %p\n", Count, Object, WaitType, WaitReason, WaitMode,
|
||||
- Alertable, Timeout, WaitBlockArray );
|
||||
- return STATUS_NOT_IMPLEMENTED;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
* IoRegisterFileSystem (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
VOID WINAPI IoRegisterFileSystem(PDEVICE_OBJECT DeviceObject)
|
||||
diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c
|
||||
new file mode 100644
|
||||
index 0000000..19af4f6
|
||||
--- /dev/null
|
||||
+++ b/dlls/ntoskrnl.exe/sync.c
|
||||
@@ -0,0 +1,114 @@
|
||||
+/*
|
||||
+ * Kernel synchronization
|
||||
+ *
|
||||
+ * Copyright (C) 2018 Zebediah Figura
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
+#include "ntstatus.h"
|
||||
+#define WIN32_NO_STATUS
|
||||
+#include "windef.h"
|
||||
+#include "winbase.h"
|
||||
+#include "winternl.h"
|
||||
+#include "ddk/ntddk.h"
|
||||
+#include "ddk/wdm.h"
|
||||
+
|
||||
+#include "wine/debug.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl);
|
||||
+
|
||||
+enum object_type
|
||||
+{
|
||||
+ TYPE_MANUAL_EVENT = 0,
|
||||
+ TYPE_AUTO_EVENT = 1,
|
||||
+};
|
||||
+
|
||||
+static CRITICAL_SECTION sync_cs;
|
||||
+static CRITICAL_SECTION_DEBUG sync_cs_debug =
|
||||
+{
|
||||
+ 0, 0, &sync_cs,
|
||||
+ { &sync_cs_debug.ProcessLocksList, &sync_cs_debug.ProcessLocksList },
|
||||
+ 0, 0, { (DWORD_PTR)(__FILE__ ": sync_cs") }
|
||||
+};
|
||||
+static CRITICAL_SECTION sync_cs = { &sync_cs_debug, -1, 0, 0, 0, 0 };
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * KeWaitForMultipleObjects (NTOSKRNL.EXE.@)
|
||||
+ */
|
||||
+NTSTATUS WINAPI KeWaitForMultipleObjects(ULONG count, void *pobjs[],
|
||||
+ WAIT_TYPE wait_type, KWAIT_REASON reason, KPROCESSOR_MODE mode,
|
||||
+ BOOLEAN alertable, LARGE_INTEGER *timeout, KWAIT_BLOCK *wait_blocks)
|
||||
+{
|
||||
+ DISPATCHER_HEADER **objs = (DISPATCHER_HEADER **)pobjs;
|
||||
+ HANDLE handles[MAXIMUM_WAIT_OBJECTS];
|
||||
+ NTSTATUS ret;
|
||||
+ ULONG i;
|
||||
+
|
||||
+ TRACE("count %u, objs %p, wait_type %u, reason %u, mode %d, alertable %u, timeout %p, wait_blocks %p.\n",
|
||||
+ count, objs, wait_type, reason, mode, alertable, timeout, wait_blocks);
|
||||
+
|
||||
+ /* We co-opt DISPATCHER_HEADER.WaitListHead:
|
||||
+ * Blink stores a handle to the synchronization object,
|
||||
+ * Flink stores the number of threads currently waiting on this object. */
|
||||
+
|
||||
+ EnterCriticalSection( &sync_cs );
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ {
|
||||
+ ++*((ULONG_PTR *)&objs[i]->WaitListHead.Flink);
|
||||
+ if (!objs[i]->WaitListHead.Blink)
|
||||
+ {
|
||||
+ switch (objs[i]->Type)
|
||||
+ {
|
||||
+ case TYPE_MANUAL_EVENT:
|
||||
+ objs[i]->WaitListHead.Blink = CreateEventW( NULL, TRUE, objs[i]->SignalState, NULL );
|
||||
+ break;
|
||||
+ case TYPE_AUTO_EVENT:
|
||||
+ objs[i]->WaitListHead.Blink = CreateEventW( NULL, FALSE, objs[i]->SignalState, NULL );
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ handles[i] = objs[i]->WaitListHead.Blink;
|
||||
+ }
|
||||
+ LeaveCriticalSection( &sync_cs );
|
||||
+
|
||||
+ ret = NtWaitForMultipleObjects( count, handles, (wait_type == WaitAny), alertable, timeout );
|
||||
+
|
||||
+ EnterCriticalSection( &sync_cs );
|
||||
+ for (i = 0; i < count; i++)
|
||||
+ {
|
||||
+ if (ret == i || (!ret && wait_type == WaitAll))
|
||||
+ {
|
||||
+ switch (objs[i]->Type)
|
||||
+ {
|
||||
+ case TYPE_AUTO_EVENT:
|
||||
+ objs[i]->SignalState = FALSE;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!--*((ULONG_PTR *)&objs[i]->WaitListHead.Flink))
|
||||
+ {
|
||||
+ CloseHandle(objs[i]->WaitListHead.Blink);
|
||||
+ objs[i]->WaitListHead.Blink = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ LeaveCriticalSection( &sync_cs );
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/include/ddk/ntddk.h b/include/ddk/ntddk.h
|
||||
index e76ccc9..6b3a30e 100644
|
||||
--- a/include/ddk/ntddk.h
|
||||
+++ b/include/ddk/ntddk.h
|
||||
@@ -140,15 +140,6 @@ typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION
|
||||
LARGE_INTEGER ValidDataLength;
|
||||
} FILE_VALID_DATA_LENGTH_INFORMATION, *PFILE_VALID_DATA_LENGTH_INFORMATION;
|
||||
|
||||
-typedef struct _KWAIT_BLOCK {
|
||||
- LIST_ENTRY WaitListEntry;
|
||||
- struct _KTHREAD *RESTRICTED_POINTER Thread;
|
||||
- PVOID Object;
|
||||
- struct _KWAIT_BLOCK *RESTRICTED_POINTER NextWaitBlock;
|
||||
- USHORT WaitKey;
|
||||
- USHORT WaitType;
|
||||
-} KWAIT_BLOCK, *PKWAIT_BLOCK, *RESTRICTED_POINTER PRKWAIT_BLOCK;
|
||||
-
|
||||
typedef struct _RTL_BALANCED_LINKS {
|
||||
struct _RTL_BALANCED_LINKS *Parent;
|
||||
struct _RTL_BALANCED_LINKS *LeftChild;
|
||||
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
|
||||
index 0cd1673..32e8f8b 100644
|
||||
--- a/include/ddk/wdm.h
|
||||
+++ b/include/ddk/wdm.h
|
||||
@@ -144,6 +144,15 @@ typedef enum _KWAIT_REASON
|
||||
MaximumWaitReason,
|
||||
} KWAIT_REASON;
|
||||
|
||||
+typedef struct _KWAIT_BLOCK {
|
||||
+ LIST_ENTRY WaitListEntry;
|
||||
+ struct _KTHREAD *RESTRICTED_POINTER Thread;
|
||||
+ PVOID Object;
|
||||
+ struct _KWAIT_BLOCK *RESTRICTED_POINTER NextWaitBlock;
|
||||
+ USHORT WaitKey;
|
||||
+ USHORT WaitType;
|
||||
+} KWAIT_BLOCK, *PKWAIT_BLOCK, *RESTRICTED_POINTER PRKWAIT_BLOCK;
|
||||
+
|
||||
typedef struct _ALLOCATE_FUNCTION *PALLOCATE_FUNCTION;
|
||||
typedef struct _IO_TIMER *PIO_TIMER;
|
||||
typedef struct _IO_TIMER_ROUTINE *PIO_TIMER_ROUTINE;
|
||||
@@ -1421,6 +1430,7 @@ LONG WINAPI KeResetEvent(PRKEVENT);
|
||||
LONG WINAPI KeSetEvent(PRKEVENT,KPRIORITY,BOOLEAN);
|
||||
KPRIORITY WINAPI KeSetPriorityThread(PKTHREAD,KPRIORITY);
|
||||
void WINAPI KeSetSystemAffinityThread(KAFFINITY);
|
||||
+NTSTATUS WINAPI KeWaitForMultipleObjects(ULONG,void*[],WAIT_TYPE,KWAIT_REASON,KPROCESSOR_MODE,BOOLEAN,LARGE_INTEGER*,KWAIT_BLOCK*);
|
||||
|
||||
PVOID WINAPI MmAllocateContiguousMemory(SIZE_T,PHYSICAL_ADDRESS);
|
||||
PVOID WINAPI MmAllocateNonCachedMemory(SIZE_T);
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,68 +0,0 @@
|
||||
From 6b6a079747a9d92f5cd2b3b11a3b350c24f2ceb1 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 19 Aug 2018 17:34:35 -0500
|
||||
Subject: [PATCH 02/17] ntoskrnl.exe: Implement KeInitializeEvent().
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/ntoskrnl.exe/ntoskrnl.c | 9 ---------
|
||||
dlls/ntoskrnl.exe/sync.c | 13 +++++++++++++
|
||||
include/ddk/wdm.h | 1 +
|
||||
3 files changed, 14 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
index 28671c8..e61b18d 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
@@ -2085,15 +2085,6 @@ PRKTHREAD WINAPI KeGetCurrentThread(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-/***********************************************************************
|
||||
- * KeInitializeEvent (NTOSKRNL.EXE.@)
|
||||
- */
|
||||
-void WINAPI KeInitializeEvent( PRKEVENT Event, EVENT_TYPE Type, BOOLEAN State )
|
||||
-{
|
||||
- FIXME( "stub: %p %d %d\n", Event, Type, State );
|
||||
-}
|
||||
-
|
||||
-
|
||||
/***********************************************************************
|
||||
* KeInitializeMutex (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c
|
||||
index 19af4f6..e7ff7ec 100644
|
||||
--- a/dlls/ntoskrnl.exe/sync.c
|
||||
+++ b/dlls/ntoskrnl.exe/sync.c
|
||||
@@ -112,3 +112,16 @@ NTSTATUS WINAPI KeWaitForMultipleObjects(ULONG count, void *pobjs[],
|
||||
|
||||
return ret;
|
||||
}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * KeInitializeEvent (NTOSKRNL.EXE.@)
|
||||
+ */
|
||||
+void WINAPI KeInitializeEvent( PRKEVENT event, EVENT_TYPE type, BOOLEAN state )
|
||||
+{
|
||||
+ TRACE("event %p, type %u, state %u.\n", event, type, state);
|
||||
+
|
||||
+ event->Header.Type = type;
|
||||
+ event->Header.SignalState = state;
|
||||
+ event->Header.WaitListHead.Blink = NULL;
|
||||
+ event->Header.WaitListHead.Flink = NULL;
|
||||
+}
|
||||
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
|
||||
index 32e8f8b..350a08e 100644
|
||||
--- a/include/ddk/wdm.h
|
||||
+++ b/include/ddk/wdm.h
|
||||
@@ -1419,6 +1419,7 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState(UNICODE_STRING*,BOOLEAN);
|
||||
NTSTATUS WINAPI IoWMIRegistrationControl(PDEVICE_OBJECT,ULONG);
|
||||
|
||||
PKTHREAD WINAPI KeGetCurrentThread(void);
|
||||
+void WINAPI KeInitializeEvent(PRKEVENT,EVENT_TYPE,BOOLEAN);
|
||||
void WINAPI KeInitializeSemaphore(PRKSEMAPHORE,LONG,LONG);
|
||||
void WINAPI KeInitializeTimerEx(PKTIMER,TIMER_TYPE);
|
||||
void WINAPI KeQuerySystemTime(LARGE_INTEGER*);
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,71 +0,0 @@
|
||||
From e79d53d2194bc662be4853e2adf9e98be03751ce Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 19 Aug 2018 17:39:23 -0500
|
||||
Subject: [PATCH 03/17] ntoskrnl.exe: Implement KeSetEvent().
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/ntoskrnl.exe/ntoskrnl.c | 10 ----------
|
||||
dlls/ntoskrnl.exe/sync.c | 21 +++++++++++++++++++++
|
||||
2 files changed, 21 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
index e61b18d..97bb30b 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
@@ -2248,16 +2248,6 @@ LONG WINAPI KeResetEvent( PRKEVENT Event )
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
- * KeSetEvent (NTOSKRNL.EXE.@)
|
||||
- */
|
||||
-LONG WINAPI KeSetEvent( PRKEVENT Event, KPRIORITY Increment, BOOLEAN Wait )
|
||||
-{
|
||||
- FIXME("(%p, %d, %d): stub\n", Event, Increment, Wait);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/***********************************************************************
|
||||
* KeSetPriorityThread (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
KPRIORITY WINAPI KeSetPriorityThread( PKTHREAD Thread, KPRIORITY Priority )
|
||||
diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c
|
||||
index e7ff7ec..05d50ef 100644
|
||||
--- a/dlls/ntoskrnl.exe/sync.c
|
||||
+++ b/dlls/ntoskrnl.exe/sync.c
|
||||
@@ -18,6 +18,8 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
+#include "config.h"
|
||||
+#include "wine/port.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "ntstatus.h"
|
||||
@@ -125,3 +127,22 @@ void WINAPI KeInitializeEvent( PRKEVENT event, EVENT_TYPE type, BOOLEAN state )
|
||||
event->Header.WaitListHead.Blink = NULL;
|
||||
event->Header.WaitListHead.Flink = NULL;
|
||||
}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * KeSetEvent (NTOSKRNL.EXE.@)
|
||||
+ */
|
||||
+LONG WINAPI KeSetEvent( PRKEVENT event, KPRIORITY increment, BOOLEAN wait )
|
||||
+{
|
||||
+ HANDLE handle = event->Header.WaitListHead.Blink;
|
||||
+ LONG ret;
|
||||
+
|
||||
+ TRACE("event %p, increment %d, wait %u.\n", event, increment, wait);
|
||||
+
|
||||
+ EnterCriticalSection( &sync_cs );
|
||||
+ ret = interlocked_xchg( &event->Header.SignalState, TRUE );
|
||||
+ if (handle)
|
||||
+ SetEvent( handle );
|
||||
+ LeaveCriticalSection( &sync_cs );
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,62 +0,0 @@
|
||||
From 87d1900d05c4944b1d1d2cc046e6adf89ae53b78 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 19 Aug 2018 17:41:17 -0500
|
||||
Subject: [PATCH 04/17] ntoskrnl.exe: Implement KeResetEvent().
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/ntoskrnl.exe/ntoskrnl.c | 10 ----------
|
||||
dlls/ntoskrnl.exe/sync.c | 19 +++++++++++++++++++
|
||||
2 files changed, 19 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
index 97bb30b..99fa910 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
@@ -2238,16 +2238,6 @@ ULONG WINAPI KeQueryTimeIncrement(void)
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
- * KeResetEvent (NTOSKRNL.EXE.@)
|
||||
- */
|
||||
-LONG WINAPI KeResetEvent( PRKEVENT Event )
|
||||
-{
|
||||
- FIXME("(%p): stub\n", Event);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/***********************************************************************
|
||||
* KeSetPriorityThread (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
KPRIORITY WINAPI KeSetPriorityThread( PKTHREAD Thread, KPRIORITY Priority )
|
||||
diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c
|
||||
index 05d50ef..f011a60 100644
|
||||
--- a/dlls/ntoskrnl.exe/sync.c
|
||||
+++ b/dlls/ntoskrnl.exe/sync.c
|
||||
@@ -146,3 +146,22 @@ LONG WINAPI KeSetEvent( PRKEVENT event, KPRIORITY increment, BOOLEAN wait )
|
||||
|
||||
return ret;
|
||||
}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * KeResetEvent (NTOSKRNL.EXE.@)
|
||||
+ */
|
||||
+LONG WINAPI KeResetEvent( PRKEVENT event )
|
||||
+{
|
||||
+ HANDLE handle = event->Header.WaitListHead.Blink;
|
||||
+ LONG ret;
|
||||
+
|
||||
+ TRACE("event %p.\n", event);
|
||||
+
|
||||
+ EnterCriticalSection( &sync_cs );
|
||||
+ ret = interlocked_xchg( &event->Header.SignalState, FALSE );
|
||||
+ if (handle)
|
||||
+ ResetEvent( handle );
|
||||
+ LeaveCriticalSection( &sync_cs );
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,71 +0,0 @@
|
||||
From cd87de5d368ccc030a11ddbcd409e8e1866f123a Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 19 Aug 2018 17:44:30 -0500
|
||||
Subject: [PATCH 06/17] ntoskrnl.exe: Implement KeWaitForSingleObject().
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/ntoskrnl.exe/ntoskrnl.c | 13 -------------
|
||||
dlls/ntoskrnl.exe/sync.c | 9 +++++++++
|
||||
include/ddk/wdm.h | 1 +
|
||||
3 files changed, 10 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
index 646c528..3002d4e 100644
|
||||
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
|
||||
@@ -2255,19 +2255,6 @@ VOID WINAPI KeSetSystemAffinityThread(KAFFINITY Affinity)
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
- * KeWaitForSingleObject (NTOSKRNL.EXE.@)
|
||||
- */
|
||||
-NTSTATUS WINAPI KeWaitForSingleObject(PVOID Object,
|
||||
- KWAIT_REASON WaitReason,
|
||||
- KPROCESSOR_MODE WaitMode,
|
||||
- BOOLEAN Alertable,
|
||||
- PLARGE_INTEGER Timeout)
|
||||
-{
|
||||
- FIXME( "stub: %p, %d, %d, %d, %p\n", Object, WaitReason, WaitMode, Alertable, Timeout );
|
||||
- return STATUS_NOT_IMPLEMENTED;
|
||||
-}
|
||||
-
|
||||
-/***********************************************************************
|
||||
* IoRegisterFileSystem (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
VOID WINAPI IoRegisterFileSystem(PDEVICE_OBJECT DeviceObject)
|
||||
diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c
|
||||
index a905fb3..423fdcf 100644
|
||||
--- a/dlls/ntoskrnl.exe/sync.c
|
||||
+++ b/dlls/ntoskrnl.exe/sync.c
|
||||
@@ -116,6 +116,15 @@ NTSTATUS WINAPI KeWaitForMultipleObjects(ULONG count, void *pobjs[],
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
+ * KeWaitForSingleObject (NTOSKRNL.EXE.@)
|
||||
+ */
|
||||
+NTSTATUS WINAPI KeWaitForSingleObject( void *obj, KWAIT_REASON reason,
|
||||
+ KPROCESSOR_MODE mode, BOOLEAN alertable, LARGE_INTEGER *timeout )
|
||||
+{
|
||||
+ return KeWaitForMultipleObjects( 1, &obj, WaitAny, reason, mode, alertable, timeout, NULL );
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
* KeInitializeEvent (NTOSKRNL.EXE.@)
|
||||
*/
|
||||
void WINAPI KeInitializeEvent( PRKEVENT event, EVENT_TYPE type, BOOLEAN state )
|
||||
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
|
||||
index 0fe73f2..6b6ac19 100644
|
||||
--- a/include/ddk/wdm.h
|
||||
+++ b/include/ddk/wdm.h
|
||||
@@ -1433,6 +1433,7 @@ LONG WINAPI KeSetEvent(PRKEVENT,KPRIORITY,BOOLEAN);
|
||||
KPRIORITY WINAPI KeSetPriorityThread(PKTHREAD,KPRIORITY);
|
||||
void WINAPI KeSetSystemAffinityThread(KAFFINITY);
|
||||
NTSTATUS WINAPI KeWaitForMultipleObjects(ULONG,void*[],WAIT_TYPE,KWAIT_REASON,KPROCESSOR_MODE,BOOLEAN,LARGE_INTEGER*,KWAIT_BLOCK*);
|
||||
+NTSTATUS WINAPI KeWaitForSingleObject(void*,KWAIT_REASON,KPROCESSOR_MODE,BOOLEAN,LARGE_INTEGER*);
|
||||
|
||||
PVOID WINAPI MmAllocateContiguousMemory(SIZE_T,PHYSICAL_ADDRESS);
|
||||
PVOID WINAPI MmAllocateNonCachedMemory(SIZE_T);
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,148 +0,0 @@
|
||||
From 87f7e2ba60c625a3d409f49842c2311f8396b873 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Sun, 19 Aug 2018 18:31:40 -0500
|
||||
Subject: [PATCH 07/17] ntoskrnl.exe/tests: Add some tests for synchronization
|
||||
functions.
|
||||
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/ntoskrnl.exe/tests/driver.c | 116 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 116 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
|
||||
index 68b6730..07a0adb 100644
|
||||
--- a/dlls/ntoskrnl.exe/tests/driver.c
|
||||
+++ b/dlls/ntoskrnl.exe/tests/driver.c
|
||||
@@ -210,6 +210,121 @@ static void test_load_driver(void)
|
||||
ok(!ret, "got %#x\n", ret);
|
||||
}
|
||||
|
||||
+static NTSTATUS wait_single(void *obj, ULONGLONG timeout)
|
||||
+{
|
||||
+ LARGE_INTEGER integer;
|
||||
+
|
||||
+ integer.QuadPart = timeout;
|
||||
+ return KeWaitForSingleObject(obj, Executive, KernelMode, FALSE, &integer);
|
||||
+}
|
||||
+
|
||||
+static NTSTATUS wait_multiple(ULONG count, void *objs[], WAIT_TYPE wait_type, ULONGLONG timeout)
|
||||
+{
|
||||
+ LARGE_INTEGER integer;
|
||||
+
|
||||
+ integer.QuadPart = timeout;
|
||||
+ return KeWaitForMultipleObjects(count, objs, wait_type, Executive, KernelMode, FALSE, &integer, NULL);
|
||||
+}
|
||||
+
|
||||
+static void test_sync(void)
|
||||
+{
|
||||
+ KEVENT manual_event, auto_event;
|
||||
+ void *objs[2];
|
||||
+ NTSTATUS ret;
|
||||
+
|
||||
+ KeInitializeEvent(&manual_event, NotificationEvent, FALSE);
|
||||
+
|
||||
+ ret = wait_single(&manual_event, 0);
|
||||
+ ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
|
||||
+
|
||||
+ KeSetEvent(&manual_event, 0, FALSE);
|
||||
+
|
||||
+ ret = wait_single(&manual_event, 0);
|
||||
+ ok(ret == 0, "got %#x\n", ret);
|
||||
+
|
||||
+ ret = wait_single(&manual_event, 0);
|
||||
+ ok(ret == 0, "got %#x\n", ret);
|
||||
+
|
||||
+ KeResetEvent(&manual_event);
|
||||
+
|
||||
+ ret = wait_single(&manual_event, 0);
|
||||
+ ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
|
||||
+
|
||||
+ KeInitializeEvent(&auto_event, SynchronizationEvent, FALSE);
|
||||
+
|
||||
+ ret = wait_single(&auto_event, 0);
|
||||
+ ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
|
||||
+
|
||||
+ KeSetEvent(&auto_event, 0, FALSE);
|
||||
+
|
||||
+ ret = wait_single(&auto_event, 0);
|
||||
+ ok(ret == 0, "got %#x\n", ret);
|
||||
+
|
||||
+ ret = wait_single(&auto_event, 0);
|
||||
+ ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
|
||||
+
|
||||
+ KeInitializeEvent(&auto_event, SynchronizationEvent, TRUE);
|
||||
+
|
||||
+ ret = wait_single(&auto_event, 0);
|
||||
+ ok(ret == 0, "got %#x\n", ret);
|
||||
+
|
||||
+ objs[0] = &manual_event;
|
||||
+ objs[1] = &auto_event;
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAny, 0);
|
||||
+ ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
|
||||
+
|
||||
+ KeSetEvent(&manual_event, 0, FALSE);
|
||||
+ KeSetEvent(&auto_event, 0, FALSE);
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAny, 0);
|
||||
+ ok(ret == 0, "got %#x\n", ret);
|
||||
+
|
||||
+ ret = wait_single(&auto_event, 0);
|
||||
+ ok(ret == 0, "got %#x\n", ret);
|
||||
+
|
||||
+ KeResetEvent(&manual_event);
|
||||
+ KeSetEvent(&auto_event, 0, FALSE);
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAny, 0);
|
||||
+ ok(ret == 1, "got %#x\n", ret);
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAny, 0);
|
||||
+ ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
|
||||
+
|
||||
+ KeSetEvent(&manual_event, 0, FALSE);
|
||||
+ KeSetEvent(&auto_event, 0, FALSE);
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAll, 0);
|
||||
+ ok(ret == 0, "got %#x\n", ret);
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAll, 0);
|
||||
+ ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
|
||||
+
|
||||
+ KeSetEvent(&auto_event, 0, FALSE);
|
||||
+ KeResetEvent(&manual_event);
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAll, 0);
|
||||
+ ok(ret == STATUS_TIMEOUT, "got %#x\n", ret);
|
||||
+
|
||||
+ ret = wait_single(&auto_event, 0);
|
||||
+ ok(ret == 0, "got %#x\n", ret);
|
||||
+
|
||||
+ objs[0] = &auto_event;
|
||||
+ objs[1] = &manual_event;
|
||||
+ KeSetEvent(&manual_event, 0, FALSE);
|
||||
+ KeSetEvent(&auto_event, 0, FALSE);
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAny, 0);
|
||||
+ ok(ret == 0, "got %#x\n", ret);
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAny, 0);
|
||||
+ ok(ret == 1, "got %#x\n", ret);
|
||||
+
|
||||
+ ret = wait_multiple(2, objs, WaitAny, 0);
|
||||
+ ok(ret == 1, "got %#x\n", ret);
|
||||
+}
|
||||
+
|
||||
static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info)
|
||||
{
|
||||
ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength;
|
||||
@@ -237,6 +352,7 @@ static NTSTATUS main_test(IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info)
|
||||
test_mdl_map();
|
||||
test_init_funcs();
|
||||
test_load_driver();
|
||||
+ test_sync();
|
||||
|
||||
/* print process report */
|
||||
if (test_input->winetest_debug)
|
||||
--
|
||||
2.7.4
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "ea9253d6d3c9bb60d98b0d917292fc0b4babb3dd"
|
||||
echo "92f38bc8790cbfb31badf97a211ed890ac00c1db"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -168,7 +168,6 @@ patch_enable_all ()
|
||||
enable_kernel32_Processor_Group="$1"
|
||||
enable_kernel32_Profile="$1"
|
||||
enable_kernel32_SCSI_Sysfs="$1"
|
||||
enable_kernelbase_PathCchCombineEx="$1"
|
||||
enable_krnl386_exe16_GDT_LDT_Emulation="$1"
|
||||
enable_krnl386_exe16_Invalid_Console_Handles="$1"
|
||||
enable_krnl386_exe16__lclose16="$1"
|
||||
@ -306,7 +305,6 @@ patch_enable_all ()
|
||||
enable_taskmgr_Memory_Usage="$1"
|
||||
enable_uianimation_stubs="$1"
|
||||
enable_user32_Auto_Radio_Button="$1"
|
||||
enable_user32_Combobox_WM_SIZE="$1"
|
||||
enable_user32_DM_SETDEFID="$1"
|
||||
enable_user32_Dialog_Focus="$1"
|
||||
enable_user32_Dialog_Paint_Event="$1"
|
||||
@ -381,7 +379,6 @@ patch_enable_all ()
|
||||
enable_winex11__NET_ACTIVE_WINDOW="$1"
|
||||
enable_winex11_mouse_movements="$1"
|
||||
enable_winex11_wglShareLists="$1"
|
||||
enable_winhttp_Accept_Headers="$1"
|
||||
enable_winhttp_System_Proxy_Autoconfig="$1"
|
||||
enable_wininet_Cleanup="$1"
|
||||
enable_wininet_Http_Decoding="$1"
|
||||
@ -668,9 +665,6 @@ patch_enable ()
|
||||
kernel32-SCSI_Sysfs)
|
||||
enable_kernel32_SCSI_Sysfs="$2"
|
||||
;;
|
||||
kernelbase-PathCchCombineEx)
|
||||
enable_kernelbase_PathCchCombineEx="$2"
|
||||
;;
|
||||
krnl386.exe16-GDT_LDT_Emulation)
|
||||
enable_krnl386_exe16_GDT_LDT_Emulation="$2"
|
||||
;;
|
||||
@ -1082,9 +1076,6 @@ patch_enable ()
|
||||
user32-Auto_Radio_Button)
|
||||
enable_user32_Auto_Radio_Button="$2"
|
||||
;;
|
||||
user32-Combobox_WM_SIZE)
|
||||
enable_user32_Combobox_WM_SIZE="$2"
|
||||
;;
|
||||
user32-DM_SETDEFID)
|
||||
enable_user32_DM_SETDEFID="$2"
|
||||
;;
|
||||
@ -1307,9 +1298,6 @@ patch_enable ()
|
||||
winex11-wglShareLists)
|
||||
enable_winex11_wglShareLists="$2"
|
||||
;;
|
||||
winhttp-Accept_Headers)
|
||||
enable_winhttp_Accept_Headers="$2"
|
||||
;;
|
||||
winhttp-System_Proxy_Autoconfig)
|
||||
enable_winhttp_System_Proxy_Autoconfig="$2"
|
||||
;;
|
||||
@ -4041,22 +4029,6 @@ if test "$enable_kernel32_SCSI_Sysfs" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset kernelbase-PathCchCombineEx
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#42474] Implement kernelbase.PathCchCombineEx
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/api-ms-win-core-path-l1-1-0/api-ms-win-core-path-l1-1-0.spec, dlls/kernelbase/Makefile.in,
|
||||
# | dlls/kernelbase/kernelbase.spec, dlls/kernelbase/path.c
|
||||
# |
|
||||
if test "$enable_kernelbase_PathCchCombineEx" -eq 1; then
|
||||
patch_apply kernelbase-PathCchCombineEx/0001-kernelbase-Add-semi-stub-for-PathCchCombineEx.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "kernelbase: Add semi-stub for PathCchCombineEx.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset krnl386.exe16-GDT_LDT_Emulation
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -5255,17 +5227,11 @@ fi
|
||||
# | 'bizvserialnt.sys')
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntoskrnl.exe/Makefile.in, dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec,
|
||||
# | dlls/ntoskrnl.exe/sync.c, dlls/ntoskrnl.exe/tests/driver.c, include/ddk/ntddk.h, include/ddk/wdm.h
|
||||
# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, dlls/ntoskrnl.exe/sync.c,
|
||||
# | dlls/ntoskrnl.exe/tests/driver.c, include/ddk/wdm.h
|
||||
# |
|
||||
if test "$enable_ntoskrnl_Synchronization" -eq 1; then
|
||||
patch_apply ntoskrnl-Synchronization/0001-ntoskrnl.exe-Implement-KeWaitForMultipleObjects.patch
|
||||
patch_apply ntoskrnl-Synchronization/0002-ntoskrnl.exe-Implement-KeInitializeEvent.patch
|
||||
patch_apply ntoskrnl-Synchronization/0003-ntoskrnl.exe-Implement-KeSetEvent.patch
|
||||
patch_apply ntoskrnl-Synchronization/0004-ntoskrnl.exe-Implement-KeResetEvent.patch
|
||||
patch_apply ntoskrnl-Synchronization/0005-ntoskrnl.exe-Implement-KeClearEvent.patch
|
||||
patch_apply ntoskrnl-Synchronization/0006-ntoskrnl.exe-Implement-KeWaitForSingleObject.patch
|
||||
patch_apply ntoskrnl-Synchronization/0007-ntoskrnl.exe-tests-Add-some-tests-for-synchronizatio.patch
|
||||
patch_apply ntoskrnl-Synchronization/0008-ntoskrnl.exe-Implement-KeInitializeSemaphore.patch
|
||||
patch_apply ntoskrnl-Synchronization/0009-ntoskrnl.exe-Implement-KeReleaseSemaphore-and-waitin.patch
|
||||
patch_apply ntoskrnl-Synchronization/0010-ntoskrnl.exe-Implement-KeInitializeMutex.patch
|
||||
@ -5277,13 +5243,7 @@ if test "$enable_ntoskrnl_Synchronization" -eq 1; then
|
||||
patch_apply ntoskrnl-Synchronization/0016-ntoskrnl.exe-tests-Add-tests-for-waiting-on-timers.patch
|
||||
patch_apply ntoskrnl-Synchronization/0017-ntoskrnl.exe-Implement-KeDelayExecutionThread.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: Implement KeWaitForMultipleObjects().", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: Implement KeInitializeEvent().", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: Implement KeSetEvent().", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: Implement KeResetEvent().", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: Implement KeClearEvent().", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: Implement KeWaitForSingleObject().", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe/tests: Add some tests for synchronization functions.", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: Implement KeInitializeSemaphore().", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: Implement KeReleaseSemaphore() and waiting on semaphores.", 1 },';
|
||||
printf '%s\n' '+ { "Zebediah Figura", "ntoskrnl.exe: Implement KeInitializeMutex().", 1 },';
|
||||
@ -6418,38 +6378,19 @@ fi
|
||||
# | * [#16845] Add support for navigating a group of radio buttons using a keyboard.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/user32/button.c, dlls/user32/dialog.c, dlls/user32/tests/msg.c, dlls/user32/tests/resource.rc
|
||||
# | * dlls/user32/dialog.c, dlls/user32/tests/msg.c, dlls/user32/tests/resource.rc
|
||||
# |
|
||||
if test "$enable_user32_Auto_Radio_Button" -eq 1; then
|
||||
patch_apply user32-Auto_Radio_Button/0001-user32-Move-the-auto-radio-button-group-logic-from-B.patch
|
||||
patch_apply user32-Auto_Radio_Button/0002-user32-tests-Add-a-message-test-for-group-of-radio-b.patch
|
||||
patch_apply user32-Auto_Radio_Button/0003-user32-tests-Simplify-the-test-for-BM_CLICK-on-autor.patch
|
||||
patch_apply user32-Auto_Radio_Button/0004-user32-tests-Add-a-test-for-navigating-a-group-of-bu.patch
|
||||
patch_apply user32-Auto_Radio_Button/0005-user32-Add-support-for-navigating-a-group-of-radio-b.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "user32: Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler.", 1 },';
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "user32/tests: Add a message test for group of radio buttons.", 1 },';
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "user32/tests: Simplify the test for BM_CLICK on autoradio button by using a dialog.", 1 },';
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "user32/tests: Add a test for navigating a group of buttons using keyboard events.", 1 },';
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "user32: Add support for navigating a group of radio buttons using a keyboard.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-Combobox_WM_SIZE
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#41404] Don't force a combobox repaint on WM_SIZE
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/user32/combo.c
|
||||
# |
|
||||
if test "$enable_user32_Combobox_WM_SIZE" -eq 1; then
|
||||
patch_apply user32-Combobox_WM_SIZE/0001-user32-Don-t-force-a-combobox-repaint-on-WM_SIZE.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "user32: Don'\''t force a combobox repaint on WM_SIZE.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-DM_SETDEFID
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -7731,18 +7672,6 @@ if test "$enable_winex11_wglShareLists" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winhttp-Accept_Headers
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/winhttp/request.c, dlls/winhttp/session.c, dlls/winhttp/winhttp_private.h
|
||||
# |
|
||||
if test "$enable_winhttp_Accept_Headers" -eq 1; then
|
||||
patch_apply winhttp-Accept_Headers/0001-winhttp-Fix-handling-of-Accept-headers.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "winhttp: Fix handling of Accept headers.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winhttp-System_Proxy_Autoconfig
|
||||
# |
|
||||
# | Modified files:
|
||||
|
@ -1,16 +1,16 @@
|
||||
From c182c26c828a589dce773bd365040ce7b1a8a943 Mon Sep 17 00:00:00 2001
|
||||
From b84172fad2693e3dc75adab1820a95457eba80aa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 11 Feb 2016 03:17:09 +0100
|
||||
Subject: setupapi: Create registry keys for display devices and display
|
||||
drivers.
|
||||
|
||||
---
|
||||
dlls/setupapi/devinst.c | 111 ++++++++++++++++++++++++++++++++++++++++++------
|
||||
dlls/setupapi/devinst.c | 111 +++++++++++++++++++++++++++++++++++-----
|
||||
loader/wine.inf.in | 2 +
|
||||
2 files changed, 101 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
|
||||
index 771fc70..d9517bd 100644
|
||||
index 1f020b9b..0452d7a5 100644
|
||||
--- a/dlls/setupapi/devinst.c
|
||||
+++ b/dlls/setupapi/devinst.c
|
||||
@@ -94,6 +94,15 @@ static const WCHAR SymbolicLink[] = {'S','y','m','b','o','l','i','c','L','i','n'
|
||||
@ -29,9 +29,9 @@ index 771fc70..d9517bd 100644
|
||||
/* is used to identify if a DeviceInfoSet pointer is
|
||||
valid or not */
|
||||
#define SETUP_DEVICE_INFO_SET_MAGIC 0xd00ff056
|
||||
@@ -129,6 +138,90 @@ struct device_iface
|
||||
struct list entry;
|
||||
};
|
||||
@@ -181,6 +190,90 @@ static struct device_iface *get_device_iface(HDEVINFO devinfo, const SP_DEVICE_I
|
||||
return (struct device_iface *)data->Reserved;
|
||||
}
|
||||
|
||||
+static void create_display_keys(HKEY enumKey, int index, DISPLAY_DEVICEW *disp)
|
||||
+{
|
||||
@ -120,7 +120,7 @@ index 771fc70..d9517bd 100644
|
||||
static inline void copy_device_data(SP_DEVINFO_DATA *data, const struct device *device)
|
||||
{
|
||||
data->ClassGuid = device->class;
|
||||
@@ -418,8 +511,7 @@ static HKEY SETUPDI_CreateDevKey(struct device *device)
|
||||
@@ -470,8 +563,7 @@ static HKEY SETUPDI_CreateDevKey(struct device *device)
|
||||
HKEY enumKey, key = INVALID_HANDLE_VALUE;
|
||||
LONG l;
|
||||
|
||||
@ -130,7 +130,7 @@ index 771fc70..d9517bd 100644
|
||||
if (!l)
|
||||
{
|
||||
RegCreateKeyExW(enumKey, device->instanceId, 0, NULL, 0,
|
||||
@@ -511,8 +603,7 @@ static void SETUPDI_RemoveDevice(struct device *device)
|
||||
@@ -563,8 +655,7 @@ static void SETUPDI_RemoveDevice(struct device *device)
|
||||
HKEY enumKey;
|
||||
LONG l;
|
||||
|
||||
@ -140,7 +140,7 @@ index 771fc70..d9517bd 100644
|
||||
if (!l)
|
||||
{
|
||||
RegDeleteTreeW(enumKey, device->instanceId);
|
||||
@@ -2042,8 +2133,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
|
||||
@@ -2004,8 +2095,7 @@ static void SETUPDI_EnumerateMatchingInterfaces(HDEVINFO DeviceInfoSet,
|
||||
|
||||
TRACE("%s\n", debugstr_w(enumstr));
|
||||
|
||||
@ -150,7 +150,7 @@ index 771fc70..d9517bd 100644
|
||||
for (i = 0; !l; i++)
|
||||
{
|
||||
len = ARRAY_SIZE(subKeyName);
|
||||
@@ -2269,8 +2359,7 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class,
|
||||
@@ -2231,8 +2321,7 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class,
|
||||
TRACE("%p, %s, %s, %08x\n", DeviceInfoSet, debugstr_guid(class),
|
||||
debugstr_w(enumstr), flags);
|
||||
|
||||
@ -160,7 +160,7 @@ index 771fc70..d9517bd 100644
|
||||
if (enumKey != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
if (enumstr)
|
||||
@@ -3606,8 +3695,7 @@ static HKEY SETUPDI_OpenDevKey(struct device *device, REGSAM samDesired)
|
||||
@@ -3378,8 +3467,7 @@ static HKEY SETUPDI_OpenDevKey(struct device *device, REGSAM samDesired)
|
||||
HKEY enumKey, key = INVALID_HANDLE_VALUE;
|
||||
LONG l;
|
||||
|
||||
@ -170,7 +170,7 @@ index 771fc70..d9517bd 100644
|
||||
if (!l)
|
||||
{
|
||||
RegOpenKeyExW(enumKey, device->instanceId, 0, samDesired, &key);
|
||||
@@ -3723,8 +3811,7 @@ static BOOL SETUPDI_DeleteDevKey(struct device *device)
|
||||
@@ -3471,8 +3559,7 @@ static BOOL SETUPDI_DeleteDevKey(struct device *device)
|
||||
BOOL ret = FALSE;
|
||||
LONG l;
|
||||
|
||||
@ -181,7 +181,7 @@ index 771fc70..d9517bd 100644
|
||||
{
|
||||
ret = RegDeleteTreeW(enumKey, device->instanceId);
|
||||
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
|
||||
index 5767b29..07d4c5f 100644
|
||||
index 5a3f8c46..51e17453 100644
|
||||
--- a/loader/wine.inf.in
|
||||
+++ b/loader/wine.inf.in
|
||||
@@ -465,6 +465,8 @@ HKLM,System\CurrentControlSet\Control\ContentIndex\Language\Neutral,"Locale",0x1
|
||||
@ -194,5 +194,5 @@ index 5767b29..07d4c5f 100644
|
||||
HKLM,System\CurrentControlSet\Control\Class\{4d36e978-e325-11ce-bfc1-08002be10318},"Class",,"Ports"
|
||||
HKLM,System\CurrentControlSet\Control\Class\{6bdd1fc6-810f-11d0-bec7-08002be2092f},,,"Imaging devices"
|
||||
--
|
||||
2.7.4
|
||||
2.19.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b1218833ac88f9706094427eefa09ee91aa97667 Mon Sep 17 00:00:00 2001
|
||||
From 8dd3d1b76f5b90d0adaf7905f91fdc11e7389f86 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 11 Feb 2016 03:20:33 +0100
|
||||
Subject: [PATCH] setupapi: Handle the case that a full driver path is passed
|
||||
@ -10,10 +10,10 @@ Subject: [PATCH] setupapi: Handle the case that a full driver path is passed
|
||||
2 files changed, 47 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
|
||||
index d9517bdcab..fa04816242 100644
|
||||
index 0452d7a5..8b9aae85 100644
|
||||
--- a/dlls/setupapi/devinst.c
|
||||
+++ b/dlls/setupapi/devinst.c
|
||||
@@ -2370,8 +2370,30 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class,
|
||||
@@ -2332,8 +2332,30 @@ static void SETUPDI_EnumerateDevices(HDEVINFO DeviceInfoSet, const GUID *class,
|
||||
&enumStrKey);
|
||||
if (!l)
|
||||
{
|
||||
@ -47,10 +47,10 @@ index d9517bdcab..fa04816242 100644
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
|
||||
index c58e35f482..c9f0583825 100644
|
||||
index 0e6a1c0a..fce81ea0 100644
|
||||
--- a/dlls/setupapi/tests/devinst.c
|
||||
+++ b/dlls/setupapi/tests/devinst.c
|
||||
@@ -1407,6 +1407,28 @@ static void test_device_interface_key(void)
|
||||
@@ -1331,6 +1331,28 @@ static void test_device_interface_key(void)
|
||||
SetupDiDestroyDeviceInfoList(set);
|
||||
}
|
||||
|
||||
@ -79,14 +79,14 @@ index c58e35f482..c9f0583825 100644
|
||||
START_TEST(devinst)
|
||||
{
|
||||
HKEY hkey;
|
||||
@@ -1441,6 +1463,7 @@ START_TEST(devinst)
|
||||
@@ -1355,6 +1377,7 @@ START_TEST(devinst)
|
||||
test_registry_property_a();
|
||||
test_registry_property_w();
|
||||
testSetupDiGetINFClassA();
|
||||
test_get_inf_class();
|
||||
+ testSetupDiGetClassDevsA();
|
||||
test_devnode();
|
||||
test_device_interface_key();
|
||||
}
|
||||
--
|
||||
2.14.1
|
||||
2.19.1
|
||||
|
||||
|
@ -1,54 +0,0 @@
|
||||
From f2f3dfcd09e64bd0a3af1db277884e6dd59a5368 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Mon, 19 Dec 2016 22:25:46 +0800
|
||||
Subject: user32: Move the auto radio button group logic from BM_SETCHECK to
|
||||
WM_LBUTTONUP handler.
|
||||
|
||||
This patch also changes the logic to get the control style with WM_GETDLGCODE
|
||||
instead of GetWindowLong to make the message test pass.
|
||||
---
|
||||
dlls/user32/button.c | 11 ++++-------
|
||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/button.c b/dlls/user32/button.c
|
||||
index e85e30d..98d8289 100644
|
||||
--- a/dlls/user32/button.c
|
||||
+++ b/dlls/user32/button.c
|
||||
@@ -334,7 +334,7 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
||||
SendMessageW( hWnd, BM_SETCHECK, !(state & BST_CHECKED), 0 );
|
||||
break;
|
||||
case BS_AUTORADIOBUTTON:
|
||||
- SendMessageW( hWnd, BM_SETCHECK, TRUE, 0 );
|
||||
+ BUTTON_CheckAutoRadioButton( hWnd );
|
||||
break;
|
||||
case BS_AUTO3STATE:
|
||||
SendMessageW( hWnd, BM_SETCHECK,
|
||||
@@ -497,8 +497,6 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
|
||||
set_button_state( hWnd, (state & ~3) | wParam );
|
||||
paint_button( hWnd, btn_type, ODA_SELECT );
|
||||
}
|
||||
- if ((btn_type == BS_AUTORADIOBUTTON) && (wParam == BST_CHECKED) && (style & WS_CHILD))
|
||||
- BUTTON_CheckAutoRadioButton( hWnd );
|
||||
break;
|
||||
|
||||
case BM_GETSTATE:
|
||||
@@ -976,13 +974,12 @@ static void BUTTON_CheckAutoRadioButton( HWND hwnd )
|
||||
|
||||
parent = GetParent(hwnd);
|
||||
/* make sure that starting control is not disabled or invisible */
|
||||
- start = sibling = GetNextDlgGroupItem( parent, hwnd, TRUE );
|
||||
+ start = sibling = hwnd;
|
||||
do
|
||||
{
|
||||
if (!sibling) break;
|
||||
- if ((hwnd != sibling) &&
|
||||
- ((GetWindowLongW( sibling, GWL_STYLE) & BS_TYPEMASK) == BS_AUTORADIOBUTTON))
|
||||
- SendMessageW( sibling, BM_SETCHECK, BST_UNCHECKED, 0 );
|
||||
+ if (SendMessageW( sibling, WM_GETDLGCODE, 0, 0 ) == (DLGC_BUTTON | DLGC_RADIOBUTTON))
|
||||
+ SendMessageW( sibling, BM_SETCHECK, sibling == hwnd ? BST_CHECKED : BST_UNCHECKED, 0 );
|
||||
sibling = GetNextDlgGroupItem( parent, sibling, FALSE );
|
||||
} while (sibling != start);
|
||||
}
|
||||
--
|
||||
2.9.0
|
||||
|
@ -1,155 +0,0 @@
|
||||
From 6ff0043587cd9885e0682787c34a65c1f7c783fd Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Mon, 19 Dec 2016 22:29:35 +0800
|
||||
Subject: user32/tests: Add a message test for group of radio buttons.
|
||||
|
||||
---
|
||||
dlls/user32/tests/msg.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 125 insertions(+)
|
||||
|
||||
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
|
||||
index 69841d3..643a6bf 100644
|
||||
--- a/dlls/user32/tests/msg.c
|
||||
+++ b/dlls/user32/tests/msg.c
|
||||
@@ -6617,6 +6617,130 @@ static void test_button_bm_get_set_image(void)
|
||||
ReleaseDC(0, hdc);
|
||||
}
|
||||
|
||||
+#define ID_RADIO1 0x00e1
|
||||
+#define ID_RADIO2 0x00e2
|
||||
+
|
||||
+static const struct message auto_radio_button_WM_CLICK[] =
|
||||
+{
|
||||
+ { BM_CLICK, sent|wparam|lparam, 0, 0 },
|
||||
+ { WM_LBUTTONDOWN, sent|wparam|lparam|defwinproc, 0, 0 },
|
||||
+ { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 },
|
||||
+ { BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_CHECKED, 0 },
|
||||
+ { WM_CTLCOLORSTATIC, sent|parent },
|
||||
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
|
||||
+ { WM_LBUTTONUP, sent|wparam|lparam|defwinproc, 0, 0 },
|
||||
+ { BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_UNCHECKED, 0 },
|
||||
+ { WM_CTLCOLORSTATIC, sent|parent },
|
||||
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
|
||||
+ { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, 0, 0 },
|
||||
+ { BM_SETCHECK, sent|wparam|lparam|defwinproc, BST_CHECKED, 0 },
|
||||
+ { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, 0, 0 },
|
||||
+ { BM_SETCHECK, sent|wparam|lparam|defwinproc, 0, 0 },
|
||||
+ { WM_CTLCOLORSTATIC, sent|parent },
|
||||
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
|
||||
+ { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, 0, 0 },
|
||||
+ { BM_SETCHECK, sent|wparam|lparam|defwinproc, 0, 0 },
|
||||
+ { WM_CTLCOLORSTATIC, sent|parent },
|
||||
+ { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 },
|
||||
+ { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, 0, 0 },
|
||||
+ { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 },
|
||||
+ { WM_CAPTURECHANGED, sent|wparam|lparam|defwinproc, 0, 0 },
|
||||
+ { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO2, BN_CLICKED) },
|
||||
+ { WM_NCHITTEST, sent|optional, 0, 0 }, /* FIXME: Wine doesn't send it */
|
||||
+ { WM_SETCURSOR, sent|optional, 0, 0 }, /* FIXME: Wine doesn't send it */
|
||||
+ { WM_MOUSEMOVE, sent|optional, 0, 0 }, /* FIXME: Wine doesn't send it */
|
||||
+ { 0 }
|
||||
+};
|
||||
+
|
||||
+static void test_autoradio_messages(void)
|
||||
+{
|
||||
+ HWND parent, radio1, radio2, radio3, child;
|
||||
+ RECT rc;
|
||||
+ MSG msg;
|
||||
+ DWORD ret;
|
||||
+
|
||||
+ subclass_button();
|
||||
+
|
||||
+ parent = CreateWindowExA(0, "TestParentClass", "Test parent", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
|
||||
+ 100, 100, 200, 200, 0, 0, 0, NULL);
|
||||
+ ok(parent != 0, "failed to create parent window\n");
|
||||
+ radio1 = CreateWindowExA(0, "my_button_class", "radio1", WS_VISIBLE | WS_CHILD | WS_GROUP | BS_AUTORADIOBUTTON | BS_NOTIFY,
|
||||
+ 0, 0, 70, 18, parent, (HMENU)ID_RADIO1, 0, NULL);
|
||||
+ ok(radio1 != 0, "failed to create child window\n");
|
||||
+ radio3 = CreateWindowExA(0, "my_button_class", "radio3", WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON | BS_NOTIFY,
|
||||
+ 0, 25, 70, 18, parent, (HMENU)-1, 0, NULL);
|
||||
+ ok(radio3 != 0, "failed to create child window\n");
|
||||
+ child = CreateWindowExA(0, "my_button_class", "text", WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_NOTIFY,
|
||||
+ 0, 50, 70, 18, parent, (HMENU)-1, 0, NULL);
|
||||
+ ok(child != 0, "failed to create child window\n");
|
||||
+ radio2 = CreateWindowExA(0, "my_button_class", "radio2", WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY,
|
||||
+ 0, 75, 70, 18, parent, (HMENU)ID_RADIO2, 0, NULL);
|
||||
+ ok(radio2 != 0, "failed to create child window\n");
|
||||
+
|
||||
+ /* this avoids focus messages in the generated sequence */
|
||||
+ SetFocus(radio2);
|
||||
+
|
||||
+ flush_events();
|
||||
+ flush_sequence();
|
||||
+
|
||||
+ ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_UNCHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_UNCHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_UNCHECKED, "got %08x\n", ret);
|
||||
+
|
||||
+ SendMessageA(radio1, BM_SETCHECK, BST_CHECKED, 0);
|
||||
+
|
||||
+ ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_CHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_UNCHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_UNCHECKED, "got %08x\n", ret);
|
||||
+
|
||||
+ SendMessageA(radio2, BM_SETCHECK, BST_CHECKED, 0);
|
||||
+
|
||||
+ ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_CHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_CHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_UNCHECKED, "got %08x\n", ret);
|
||||
+
|
||||
+ SendMessageA(radio3, BM_SETCHECK, BST_CHECKED, 0);
|
||||
+
|
||||
+ ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_CHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_CHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_CHECKED, "got %08x\n", ret);
|
||||
+
|
||||
+ GetWindowRect(radio2, &rc);
|
||||
+ SetCursorPos(rc.left+1, rc.top+1);
|
||||
+
|
||||
+ flush_events();
|
||||
+ flush_sequence();
|
||||
+
|
||||
+ log_all_parent_messages++;
|
||||
+
|
||||
+ SendMessageA(radio2, BM_CLICK, 0, 0);
|
||||
+ while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
|
||||
+ ok_sequence(auto_radio_button_WM_CLICK, "BM_CLICK on auto-radio button", FALSE);
|
||||
+
|
||||
+ log_all_parent_messages--;
|
||||
+
|
||||
+ ret = SendMessageA(radio1, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_UNCHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio2, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_CHECKED, "got %08x\n", ret);
|
||||
+ ret = SendMessageA(radio3, BM_GETCHECK, 0, 0);
|
||||
+ ok(ret == BST_UNCHECKED, "got %08x\n", ret);
|
||||
+
|
||||
+ DestroyWindow(parent);
|
||||
+}
|
||||
+
|
||||
/****************** static message test *************************/
|
||||
static const struct message WmSetFontStaticSeq2[] =
|
||||
{
|
||||
@@ -16837,6 +16961,7 @@ START_TEST(msg)
|
||||
test_mdi_messages();
|
||||
test_button_messages();
|
||||
test_button_bm_get_set_image();
|
||||
+ test_autoradio_messages();
|
||||
test_static_messages();
|
||||
test_listbox_messages();
|
||||
test_combobox_messages();
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,28 +0,0 @@
|
||||
From e680be170761fdbfb3c9bc5ee51a5f6002e586ca Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Wed, 7 Dec 2016 16:10:31 +0800
|
||||
Subject: user32: Don't force a combobox repaint on WM_SIZE.
|
||||
|
||||
This breaks z-order based painting and causes side effects for
|
||||
applications that during the WM_PAINT processing reference internal
|
||||
data associated with a not fully initialized window.
|
||||
---
|
||||
dlls/user32/combo.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
|
||||
index a2e8b3c..501bfe8 100644
|
||||
--- a/dlls/user32/combo.c
|
||||
+++ b/dlls/user32/combo.c
|
||||
@@ -1558,7 +1558,7 @@ static void COMBO_Size( LPHEADCOMBO lphc )
|
||||
&lphc->buttonRect,
|
||||
&lphc->droppedRect);
|
||||
|
||||
- CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, TRUE );
|
||||
+ CBResetPos( lphc, &lphc->textRect, &lphc->droppedRect, FALSE );
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.9.0
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [41404] Don't force a combobox repaint on WM_SIZE
|
@ -1,116 +0,0 @@
|
||||
From ef3957d5000837c27a9623768b2f90df8b80b465 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 21 Dec 2016 00:54:37 +0100
|
||||
Subject: [PATCH] winhttp: Fix handling of Accept headers.
|
||||
|
||||
---
|
||||
dlls/winhttp/request.c | 9 ++-------
|
||||
dlls/winhttp/session.c | 26 +++-----------------------
|
||||
dlls/winhttp/winhttp_private.h | 4 ++--
|
||||
3 files changed, 7 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
|
||||
index 27628c3..54f7214 100644
|
||||
--- a/dlls/winhttp/request.c
|
||||
+++ b/dlls/winhttp/request.c
|
||||
@@ -398,7 +398,7 @@ static BOOL delete_header( struct request *request, DWORD index )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
-static BOOL process_header( struct request *request, const WCHAR *field, const WCHAR *value, DWORD flags,
|
||||
+BOOL process_header( struct request *request, const WCHAR *field, const WCHAR *value, DWORD flags,
|
||||
BOOL request_only )
|
||||
{
|
||||
int index;
|
||||
@@ -2181,16 +2181,11 @@ static BOOL send_request( struct request *request, const WCHAR *headers, DWORD h
|
||||
struct session *session = connect->session;
|
||||
char *wire_req;
|
||||
int bytes_sent;
|
||||
- DWORD len, i, flags;
|
||||
+ DWORD len;
|
||||
|
||||
clear_response_headers( request );
|
||||
drain_content( request );
|
||||
|
||||
- flags = WINHTTP_ADDREQ_FLAG_ADD|WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA;
|
||||
- for (i = 0; i < request->num_accept_types; i++)
|
||||
- {
|
||||
- process_header( request, attr_accept, request->accept_types[i], flags, TRUE );
|
||||
- }
|
||||
if (session->agent)
|
||||
process_header( request, attr_user_agent, session->agent, WINHTTP_ADDREQ_FLAG_ADD_IF_NEW, TRUE );
|
||||
|
||||
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
|
||||
index 2051d42..d528659 100644
|
||||
--- a/dlls/winhttp/session.c
|
||||
+++ b/dlls/winhttp/session.c
|
||||
@@ -629,8 +629,6 @@ static void request_destroy( struct object_header *hdr )
|
||||
heap_free( request->headers[i].value );
|
||||
}
|
||||
heap_free( request->headers );
|
||||
- for (i = 0; i < request->num_accept_types; i++) heap_free( request->accept_types[i] );
|
||||
- heap_free( request->accept_types );
|
||||
for (i = 0; i < TARGET_MAX; i++)
|
||||
{
|
||||
for (j = 0; j < SCHEME_MAX; j++)
|
||||
@@ -1047,32 +1045,14 @@ static const struct object_vtbl request_vtbl =
|
||||
|
||||
static BOOL store_accept_types( struct request *request, const WCHAR **accept_types )
|
||||
{
|
||||
+ static const WCHAR attr_accept[] = {'A','c','c','e','p','t',0};
|
||||
+ static const DWORD flags = WINHTTP_ADDREQ_FLAG_ADD | WINHTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA;
|
||||
const WCHAR **types = accept_types;
|
||||
- DWORD i;
|
||||
|
||||
if (!types) return TRUE;
|
||||
while (*types)
|
||||
{
|
||||
- request->num_accept_types++;
|
||||
- types++;
|
||||
- }
|
||||
- if (!request->num_accept_types) return TRUE;
|
||||
- if (!(request->accept_types = heap_alloc( request->num_accept_types * sizeof(WCHAR *))))
|
||||
- {
|
||||
- request->num_accept_types = 0;
|
||||
- return FALSE;
|
||||
- }
|
||||
- types = accept_types;
|
||||
- for (i = 0; i < request->num_accept_types; i++)
|
||||
- {
|
||||
- if (!(request->accept_types[i] = strdupW( *types )))
|
||||
- {
|
||||
- for ( ; i > 0; --i) heap_free( request->accept_types[i - 1] );
|
||||
- heap_free( request->accept_types );
|
||||
- request->accept_types = NULL;
|
||||
- request->num_accept_types = 0;
|
||||
- return FALSE;
|
||||
- }
|
||||
+ process_header( request, attr_accept, *types, flags, TRUE );
|
||||
types++;
|
||||
}
|
||||
return TRUE;
|
||||
diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h
|
||||
index 2ee868c..3ac7f4a 100644
|
||||
--- a/dlls/winhttp/winhttp_private.h
|
||||
+++ b/dlls/winhttp/winhttp_private.h
|
||||
@@ -198,8 +198,6 @@ struct request
|
||||
char read_buf[8192]; /* buffer for already read but not returned data */
|
||||
struct header *headers;
|
||||
DWORD num_headers;
|
||||
- WCHAR **accept_types;
|
||||
- DWORD num_accept_types;
|
||||
struct authinfo *authinfo;
|
||||
struct authinfo *proxy_authinfo;
|
||||
HANDLE task_wait;
|
||||
@@ -290,6 +288,8 @@ void destroy_authinfo( struct authinfo * ) DECLSPEC_HIDDEN;
|
||||
|
||||
void release_host( struct hostdata *host ) DECLSPEC_HIDDEN;
|
||||
|
||||
+BOOL process_header( struct request *request, LPCWSTR field, LPCWSTR value, DWORD flags, BOOL request_only ) DECLSPEC_HIDDEN;
|
||||
+
|
||||
extern HRESULT WinHttpRequest_create( void ** ) DECLSPEC_HIDDEN;
|
||||
void release_typelib( void ) DECLSPEC_HIDDEN;
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Fix handling of Accept headers in winhttp
|
Loading…
Reference in New Issue
Block a user