From e2c7fb5bb6f4cb79156e0b7bcb3fa3485f1edb00 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 2 Apr 2019 09:49:29 +1100 Subject: [PATCH] Rebase against 56404595d5c42168d4fd4c1ec3a1b802a6aab5c1 --- .../0001-hid-Implement-HidD_FlushQueue.patch | 8 +- patches/patchinstall.sh | 4 +- ...em-font-instead-of-special-bitmap-fo.patch | 24 +-- ...erent-units-depending-on-memory-usag.patch | 20 +-- .../0002-uianimation-Add-stub-dll.patch | 146 ++++++------------ 5 files changed, 76 insertions(+), 126 deletions(-) diff --git a/patches/hid-HidD_FlushQueue/0001-hid-Implement-HidD_FlushQueue.patch b/patches/hid-HidD_FlushQueue/0001-hid-Implement-HidD_FlushQueue.patch index 84ef8cd0..1910c67b 100644 --- a/patches/hid-HidD_FlushQueue/0001-hid-Implement-HidD_FlushQueue.patch +++ b/patches/hid-HidD_FlushQueue/0001-hid-Implement-HidD_FlushQueue.patch @@ -1,4 +1,4 @@ -From cadd504fc3631e7b0ceee0add7100b4182f9173e Mon Sep 17 00:00:00 2001 +From db0ea76926fefd1658fac7373e3bf090b6068ea5 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 16 Oct 2018 15:34:38 +1100 Subject: [PATCH] hid: Implement HidD_FlushQueue @@ -21,12 +21,12 @@ index e4d4202..505c3d2 100644 @ stdcall HidD_GetAttributes(long ptr) @ stub HidD_GetConfiguration diff --git a/dlls/hid/hidd.c b/dlls/hid/hidd.c -index 4b703ca..a4384aa 100644 +index ca14c4f..632035d 100644 --- a/dlls/hid/hidd.c +++ b/dlls/hid/hidd.c -@@ -158,3 +158,11 @@ BOOLEAN WINAPI HidD_SetOutputReport(HANDLE HidDeviceObject, void *ReportBuffer, +@@ -157,3 +157,11 @@ BOOLEAN WINAPI HidD_SetOutputReport(HANDLE HidDeviceObject, void *ReportBuffer, TRACE("(%p %p %u)\n", HidDeviceObject, ReportBuffer, ReportBufferLength); - return sync_ioctl(HidDeviceObject, IOCTL_HID_SET_OUTPUT_REPORT, ReportBuffer, ReportBufferLength, NULL, 0, NULL); + return sync_ioctl(HidDeviceObject, IOCTL_HID_SET_OUTPUT_REPORT, ReportBuffer, ReportBufferLength, NULL, 0); } + +BOOLEAN WINAPI HidD_FlushQueue(HANDLE HidDeviceObject) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index fb0faa31..e28d08e7 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "c6ff0e01224e86c7baa31d019fcb0a7bf03e2f96" + echo "56404595d5c42168d4fd4c1ec3a1b802a6aab5c1" } # Show version information @@ -5982,7 +5982,7 @@ fi # | * [#41369] Add UIAnimation and stubs interfaces # | # | Modified files: -# | * configure, configure.ac, dlls/uianimation/Makefile.in, dlls/uianimation/main.c, dlls/uianimation/uianimation.spec, +# | * dlls/uianimation/Makefile.in, dlls/uianimation/main.c, dlls/uianimation/uianimation.spec, # | dlls/uianimation/uianimation_typelib.idl # | if test "$enable_uianimation_stubs" -eq 1; then diff --git a/patches/taskmgr-Memory_Usage/0003-taskmgr-Use-system-font-instead-of-special-bitmap-fo.patch b/patches/taskmgr-Memory_Usage/0003-taskmgr-Use-system-font-instead-of-special-bitmap-fo.patch index 6888170b..c88d6499 100644 --- a/patches/taskmgr-Memory_Usage/0003-taskmgr-Use-system-font-instead-of-special-bitmap-fo.patch +++ b/patches/taskmgr-Memory_Usage/0003-taskmgr-Use-system-font-instead-of-special-bitmap-fo.patch @@ -1,7 +1,7 @@ -From 54f6838211778a8f2527640d3c5a411f56d5cd98 Mon Sep 17 00:00:00 2001 +From 0659b8d913f16629a537f13b63afba8744d62e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Wed, 27 Jan 2016 04:55:09 +0100 -Subject: taskmgr: Use system font instead of special bitmap font. +Subject: [PATCH] taskmgr: Use system font instead of special bitmap font. --- programs/taskmgr/font.bmp | Bin 646 -> 0 bytes @@ -26,10 +26,10 @@ zIq{C$VS%n9(V2QTr);{O_DntBpT=8p%%lCvw&%ZnE9Lyb=%2T9J{pLZxOXEEt2{0S rj&qR`_imbB3(wY5`TKp;OQ!n~kRUw=3;lV4-TOj~_w9QN#T)VkBip4W diff --git a/programs/taskmgr/graph.c b/programs/taskmgr/graph.c -index 4098675..df4f922 100644 +index e6819cf..7e978e1 100644 --- a/programs/taskmgr/graph.c +++ b/programs/taskmgr/graph.c -@@ -44,6 +44,7 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd) +@@ -43,6 +43,7 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd) RECT rcClient; RECT rcBarLeft; RECT rcBarRight; @@ -37,7 +37,7 @@ index 4098675..df4f922 100644 WCHAR Text[256]; ULONG CpuUsage; ULONG CpuKernelUsage; -@@ -97,7 +98,11 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd) +@@ -96,7 +97,11 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd) * Draw the font text onto the graph * The bottom 20 pixels are reserved for the text */ @@ -50,7 +50,7 @@ index 4098675..df4f922 100644 /* * Now we have to draw the graph -@@ -224,6 +229,7 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) +@@ -223,6 +228,7 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) RECT rcClient; RECT rcBarLeft; RECT rcBarRight; @@ -58,11 +58,11 @@ index 4098675..df4f922 100644 WCHAR Text[256]; ULONGLONG CommitChargeTotal; ULONGLONG CommitChargeLimit; -@@ -258,7 +264,11 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) +@@ -257,7 +263,11 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) * Draw the font text onto the graph * The bottom 20 pixels are reserved for the text */ -- Font_DrawText(hDC, Text, ((rcClient.right - rcClient.left) - (strlenW(Text) * 8)) / 2, rcClient.bottom - 11 - 5); +- Font_DrawText(hDC, Text, ((rcClient.right - rcClient.left) - (lstrlenW(Text) * 8)) / 2, rcClient.bottom - 11 - 5); + CopyRect(&rcText, &rcClient); + rcText.top = rcText.bottom - 19; + @@ -72,7 +72,7 @@ index 4098675..df4f922 100644 /* * Now we have to draw the graph diff --git a/programs/taskmgr/resource.h b/programs/taskmgr/resource.h -index add873d..cbd2448 100644 +index cd43f15..4153f66 100644 --- a/programs/taskmgr/resource.h +++ b/programs/taskmgr/resource.h @@ -35,7 +35,6 @@ @@ -84,10 +84,10 @@ index add873d..cbd2448 100644 #define IDC_DEBUG_CHANNELS_LIST 156 diff --git a/programs/taskmgr/taskmgr.c b/programs/taskmgr/taskmgr.c -index 80dc81c..b0f2e78 100644 +index b99d238..d3337d2 100644 --- a/programs/taskmgr/taskmgr.c +++ b/programs/taskmgr/taskmgr.c -@@ -80,35 +80,6 @@ static void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLef +@@ -76,35 +76,6 @@ static void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLef FillSolidRect2(hDC, x, y + cy, cx, -1, clrBottomRight); } @@ -135,5 +135,5 @@ index e6742a7..ffd0699 100644 -/* @makedep: font.bmp */ -IDB_FONT BITMAP font.bmp -- -2.6.4 +1.9.1 diff --git a/patches/taskmgr-Memory_Usage/0004-taskmgr-Use-different-units-depending-on-memory-usag.patch b/patches/taskmgr-Memory_Usage/0004-taskmgr-Use-different-units-depending-on-memory-usag.patch index 9ab94c5e..82b10cd6 100644 --- a/patches/taskmgr-Memory_Usage/0004-taskmgr-Use-different-units-depending-on-memory-usag.patch +++ b/patches/taskmgr-Memory_Usage/0004-taskmgr-Use-different-units-depending-on-memory-usag.patch @@ -1,17 +1,17 @@ -From 6b3fbb9c89a49f1ae936cc7db666f9ee09069463 Mon Sep 17 00:00:00 2001 +From 7136c5e40b705658e8f30f8d11c185aef1cc8f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Wed, 27 Jan 2016 05:03:26 +0100 -Subject: taskmgr: Use different units depending on memory usage. +Subject: [PATCH] taskmgr: Use different units depending on memory usage. --- programs/taskmgr/graph.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/programs/taskmgr/graph.c b/programs/taskmgr/graph.c -index df4f922..7f1d09c 100644 +index 7e978e1..eb2a4a3 100644 --- a/programs/taskmgr/graph.c +++ b/programs/taskmgr/graph.c -@@ -240,8 +240,10 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) +@@ -239,8 +239,10 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) /* Top bars that are "unused", i.e. are dark green, representing free memory */ int i; @@ -24,22 +24,22 @@ index df4f922..7f1d09c 100644 /* * Get the client area rectangle */ -@@ -258,8 +260,13 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) +@@ -257,8 +259,13 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd) CommitChargeTotal = (ULONGLONG)PerfDataGetCommitChargeTotalK(); CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK(); -- sprintfW(Text, wszFormat, (int)CommitChargeTotal); +- swprintf(Text, wszFormat, (int)CommitChargeTotal); - + if (CommitChargeTotal > 1048576) -+ sprintfW(Text, wszFormatGB, (float)CommitChargeTotal / 1048576); ++ swprintf(Text, wszFormatGB, (float)CommitChargeTotal / 1048576); + else if (CommitChargeTotal > 1024) -+ sprintfW(Text, wszFormatMB, (DWORD)CommitChargeTotal / 1024); ++ swprintf(Text, wszFormatMB, (DWORD)CommitChargeTotal / 1024); + else -+ sprintfW(Text, wszFormatKB, (DWORD)CommitChargeTotal); ++ swprintf(Text, wszFormatKB, (DWORD)CommitChargeTotal); + /* * Draw the font text onto the graph * The bottom 20 pixels are reserved for the text -- -2.6.4 +1.9.1 diff --git a/patches/uianimation-stubs/0002-uianimation-Add-stub-dll.patch b/patches/uianimation-stubs/0002-uianimation-Add-stub-dll.patch index 1eb860bb..75607c7a 100644 --- a/patches/uianimation-stubs/0002-uianimation-Add-stub-dll.patch +++ b/patches/uianimation-stubs/0002-uianimation-Add-stub-dll.patch @@ -1,4 +1,4 @@ -From 22e4de0e6c77f8d5e29ecd125f016a221a3b8e1b Mon Sep 17 00:00:00 2001 +From 11c1254ba19c465a4a8683d3293bafdc1b9c1a39 Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Thu, 7 Jun 2018 11:51:01 +0200 Subject: [PATCH] uianimation: Add stub dll @@ -9,109 +9,53 @@ Split into multiple changes. Signed-off-by: Louis Lenders --- - configure | 2 + - configure.ac | 1 + - dlls/uianimation/Makefile.in | 7 + - dlls/uianimation/main.c | 959 +++++++++++++++++++++++++++++++ - dlls/uianimation/uianimation.spec | 4 + + dlls/uianimation/Makefile.in | 5 + + dlls/uianimation/main.c | 918 +++++++++++++++++++++++++++++++ + dlls/uianimation/uianimation.spec | 9 +- dlls/uianimation/uianimation_typelib.idl | 23 + - 6 files changed, 996 insertions(+) - create mode 100644 dlls/uianimation/Makefile.in - create mode 100644 dlls/uianimation/main.c - create mode 100644 dlls/uianimation/uianimation.spec + 4 files changed, 951 insertions(+), 4 deletions(-) create mode 100644 dlls/uianimation/uianimation_typelib.idl -diff --git a/configure b/configure -index 5cefb64..10f7e05 100755 ---- a/configure -+++ b/configure -@@ -1547,6 +1547,7 @@ enable_traffic - enable_twain_32 - enable_tzres - enable_ucrtbase -+enable_uianimation - enable_uiautomationcore - enable_uiribbon - enable_unicows -@@ -19985,6 +19986,7 @@ wine_fn_config_makefile dlls/typelib.dll16 enable_win16 - wine_fn_config_makefile dlls/tzres enable_tzres - wine_fn_config_makefile dlls/ucrtbase enable_ucrtbase - wine_fn_config_makefile dlls/ucrtbase/tests enable_tests -+wine_fn_config_makefile dlls/uianimation enable_uianimation - wine_fn_config_makefile dlls/uiautomationcore enable_uiautomationcore - wine_fn_config_makefile dlls/uiautomationcore/tests enable_tests - wine_fn_config_makefile dlls/uiribbon enable_uiribbon -diff --git a/configure.ac b/configure.ac -index bac2c09..8191489 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3783,6 +3783,7 @@ WINE_CONFIG_MAKEFILE(dlls/typelib.dll16,enable_win16) - WINE_CONFIG_MAKEFILE(dlls/tzres) - WINE_CONFIG_MAKEFILE(dlls/ucrtbase) - WINE_CONFIG_MAKEFILE(dlls/ucrtbase/tests) -+WINE_CONFIG_MAKEFILE(dlls/uianimation) - WINE_CONFIG_MAKEFILE(dlls/uiautomationcore) - WINE_CONFIG_MAKEFILE(dlls/uiautomationcore/tests) - WINE_CONFIG_MAKEFILE(dlls/uiribbon) diff --git a/dlls/uianimation/Makefile.in b/dlls/uianimation/Makefile.in -new file mode 100644 -index 0000000..bc303b3 ---- /dev/null +index b504181..3663c23 100644 +--- a/dlls/uianimation/Makefile.in +++ b/dlls/uianimation/Makefile.in -@@ -0,0 +1,7 @@ -+MODULE = uianimation.dll +@@ -1,4 +1,9 @@ + MODULE = uianimation.dll +IMPORTS = uuid ole32 + + C_SRCS = \ + main.c + -+C_SRCS = \ -+ main.c +IDL_SRCS = \ + uianimation_typelib.idl ++ diff --git a/dlls/uianimation/main.c b/dlls/uianimation/main.c -new file mode 100644 -index 0000000..6101827 ---- /dev/null +index 0fa9bfb..793a200 100644 +--- a/dlls/uianimation/main.c +++ b/dlls/uianimation/main.c -@@ -0,0 +1,959 @@ -+/* -+ * Uianimation main file. -+ * -+ * Copyright (C) 2018 Louis Lenders -+ * -+ * 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 "config.h" -+#include -+ +@@ -21,15 +21,906 @@ + #include "config.h" + #include + +#define COBJMACROS + -+#include "windef.h" -+#include "winbase.h" + #include "windef.h" + #include "winbase.h" +#include "objbase.h" +#include "rpcproxy.h" +#include "oaidl.h" +#include "ocidl.h" -+ + +#include "initguid.h" -+#include "uianimation.h" -+ + #include "uianimation.h" + +#include "wine/heap.h" -+#include "wine/debug.h" -+ -+WINE_DEFAULT_DEBUG_CHANNEL(uianimation); + + #include "wine/debug.h" + + WINE_DEFAULT_DEBUG_CHANNEL(uianimation); + +static HINSTANCE hinstance; + +struct class_factory @@ -994,17 +938,19 @@ index 0000000..6101827 + return IClassFactory_QueryInterface( cf, iid, obj ); +} + -+BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) -+{ -+ switch (reason) -+ { -+ case DLL_PROCESS_ATTACH: + BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) + { + TRACE("(%p %d %p)\n", dll, reason, reserved); +@@ -39,8 +930,35 @@ BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved ) + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + hinstance = dll; -+ DisableThreadLibraryCalls( dll ); -+ break; -+ } -+ return TRUE; -+} + DisableThreadLibraryCalls( dll ); + break; + } + return TRUE; + } + +/****************************************************************** + * DllCanUnloadNow @@ -1032,15 +978,19 @@ index 0000000..6101827 + return __wine_unregister_resources( hinstance ); +} diff --git a/dlls/uianimation/uianimation.spec b/dlls/uianimation/uianimation.spec -new file mode 100644 -index 0000000..b16365d ---- /dev/null +index a43b12d..37b010b 100644 +--- a/dlls/uianimation/uianimation.spec +++ b/dlls/uianimation/uianimation.spec -@@ -0,0 +1,4 @@ +@@ -1,4 +1,5 @@ +-@ stub DllCanUnloadNow() +-@ stub DllGetClassObject(ptr ptr ptr) +-@ stub DllRegisterServer() +-@ stub DllUnregisterServer() +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() ++ diff --git a/dlls/uianimation/uianimation_typelib.idl b/dlls/uianimation/uianimation_typelib.idl new file mode 100644 index 0000000..9066c09