Rebase against 16e73be10d940c9c04101a47687a6f8a385c2b0f.

This commit is contained in:
Zebediah Figura 2021-09-17 17:45:25 -05:00
parent 3a06c15dd2
commit fdcc8bec48
9 changed files with 105 additions and 105 deletions

View File

@ -1,4 +1,4 @@
From 2c404d618908f4655623611ce720b6b27d0c1de6 Mon Sep 17 00:00:00 2001
From 7d5631535b26bea474584a75254da6d91e623e4f Mon Sep 17 00:00:00 2001
From: Andrew Church <achurch@achurch.org>
Date: Mon, 25 Feb 2019 11:21:03 +1100
Subject: [PATCH] dinput: Allow remapping of joystick buttons
@ -18,10 +18,10 @@ Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
5 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index 2354ff3b822..36086f0035f 100644
index d4f5b819471..e1fc80f41bf 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -1034,6 +1034,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
@@ -883,6 +883,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
int tokens = 0;
int axis = 0;
int pov = 0;
@ -29,7 +29,7 @@ index 2354ff3b822..36086f0035f 100644
get_app_key(&hkey, &appkey);
@@ -1045,6 +1046,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
@@ -894,6 +895,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
TRACE("setting default deadzone to: \"%s\" %d\n", buffer, This->deadzone);
}
@ -65,10 +65,10 @@ index 2354ff3b822..36086f0035f 100644
if (!This->axis_map) return DIERR_OUTOFMEMORY;
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index ec4cb94c034..7dc9deff8c4 100644
index c439cca81c3..d1194197f66 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -856,10 +856,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
@@ -735,10 +735,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
jse.type,jse.number,jse.value);
if (jse.type & JS_EVENT_BUTTON)
{
@ -85,10 +85,10 @@ index ec4cb94c034..7dc9deff8c4 100644
else if (jse.type & JS_EVENT_AXIS)
{
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index ef7b160ba58..7830cce3ced 100644
index 8279ffbf74a..a6a658ac57b 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -908,6 +908,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
@@ -742,6 +742,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
if (btn & 0x80)
{
btn &= 0x7F;
@ -98,10 +98,10 @@ index ef7b160ba58..7830cce3ced 100644
This->generic.js.rgbButtons[btn] = value = ie.value ? 0x80 : 0x00;
}
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
index 174a78b7fd4..60e3967d921 100644
index e8732bd696c..866df41c392 100644
--- a/dlls/dinput/joystick_osx.c
+++ b/dlls/dinput/joystick_osx.c
@@ -844,6 +844,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
@@ -838,6 +838,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal);
if (oldVal != newVal)
{
@ -109,9 +109,9 @@ index 174a78b7fd4..60e3967d921 100644
+
inst_id = DIDFT_MAKEINSTANCE(button_idx) | DIDFT_PSHBUTTON;
queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++);
}
if (device->generic.base.hEvent)
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h
index 0f191787158..606475759ef 100644
index 4fe51d17067..01b35fa40fc 100644
--- a/dlls/dinput/joystick_private.h
+++ b/dlls/dinput/joystick_private.h
@@ -33,6 +33,9 @@
@ -133,5 +133,5 @@ index 0f191787158..606475759ef 100644
joy_polldev_handler *joy_polldev;
--
2.30.2
2.33.0

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "8547aac2dcfcae9060d0a630c9f80af7bcaf19b4"
echo "16e73be10d940c9c04101a47687a6f8a385c2b0f"
}
# Show version information

View File

@ -1,4 +1,4 @@
From 138645fb816f0b4fc9fe55f12ec20a4a6d5e2893 Mon Sep 17 00:00:00 2001
From 5b1f4126d7eed65f68fb46bec05b226d75ce63e5 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 26 Feb 2021 22:31:19 -0600
Subject: [PATCH] shell32: Implement the "runas" verb.
@ -10,14 +10,14 @@ Based on a patch by Michael Müller.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
dlls/shell32/shlexec.c | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
dlls/shell32/shlexec.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c
index 49f7867ef7e..9a8bf4b5b52 100644
index ba393ad7794..f6e108fd6bf 100644
--- a/dlls/shell32/shlexec.c
+++ b/dlls/shell32/shlexec.c
@@ -305,6 +305,21 @@ static HRESULT SHELL_GetPathFromIDListForExecuteW(LPCITEMIDLIST pidl, LPWSTR psz
@@ -299,6 +299,21 @@ static HRESULT SHELL_GetPathFromIDListForExecuteW(LPCITEMIDLIST pidl, LPWSTR psz
return hr;
}
@ -39,14 +39,7 @@ index 49f7867ef7e..9a8bf4b5b52 100644
/*************************************************************************
* SHELL_ExecuteW [Internal]
*
@@ -312,12 +327,14 @@ static HRESULT SHELL_GetPathFromIDListForExecuteW(LPCITEMIDLIST pidl, LPWSTR psz
static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
const SHELLEXECUTEINFOW *psei, LPSHELLEXECUTEINFOW psei_out)
{
+ static const WCHAR runasW[] = {'r','u','n','a','s',0};
STARTUPINFOW startup;
PROCESS_INFORMATION info;
UINT_PTR retval = SE_ERR_NOASSOC;
@@ -312,6 +327,7 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
UINT gcdret = 0;
WCHAR curdir[MAX_PATH];
DWORD dwCreationFlags;
@ -54,14 +47,14 @@ index 49f7867ef7e..9a8bf4b5b52 100644
TRACE("Execute %s from directory %s\n", debugstr_w(lpCmd), debugstr_w(psei->lpDirectory));
@@ -339,8 +356,12 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
@@ -333,8 +349,12 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
dwCreationFlags = CREATE_UNICODE_ENVIRONMENT;
if (!(psei->fMask & SEE_MASK_NO_CONSOLE))
dwCreationFlags |= CREATE_NEW_CONSOLE;
- if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, dwCreationFlags, env,
- NULL, &startup, &info))
+
+ if (psei->lpVerb && !strcmpiW(psei->lpVerb, runasW))
+ if (psei->lpVerb && !wcsicmp(psei->lpVerb, L"runas"))
+ token = get_admin_token();
+
+ if (CreateProcessAsUserW(token, NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE,
@ -69,7 +62,7 @@ index 49f7867ef7e..9a8bf4b5b52 100644
{
/* Give 30 seconds to the app to come up, if desired. Probably only needed
when starting app immediately before making a DDE connection. */
@@ -360,6 +381,8 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
@@ -354,6 +374,8 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
retval = ERROR_BAD_FORMAT;
}
@ -79,5 +72,5 @@ index 49f7867ef7e..9a8bf4b5b52 100644
psei_out->hInstApp = (HINSTANCE)retval;
--
2.30.2
2.33.0

View File

@ -1,4 +1,4 @@
From 407cf938ab003880cc74273e172fbce2b1eec539 Mon Sep 17 00:00:00 2001
From 1c2286d2ad8a3298ed1f056715b9d236243b879e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 8 May 2017 23:33:45 +0200
Subject: [PATCH] shell32: Add security property tab.
@ -11,7 +11,7 @@ Subject: [PATCH] shell32: Add security property tab.
4 files changed, 438 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in
index fe49bf09f98..f6fcf2e18eb 100644
index 04dd196cfe8..70dbe2b06bb 100644
--- a/dlls/shell32/Makefile.in
+++ b/dlls/shell32/Makefile.in
@@ -1,7 +1,7 @@
@ -24,10 +24,10 @@ index fe49bf09f98..f6fcf2e18eb 100644
# AUTHORS file is in the top-level directory
EXTRAINCL = -I$(top_srcdir)
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
index 1324a5449a3..3fc9d205c25 100644
index eb03982f6a9..c6280edac6b 100644
--- a/dlls/shell32/shell32.rc
+++ b/dlls/shell32/shell32.rc
@@ -204,6 +204,33 @@ the folder?"
@@ -202,6 +202,33 @@ the folder?"
IDS_RUNDLG_BROWSE_FILTER_EXE "Executable files (*.exe)"
IDS_RUNDLG_BROWSE_FILTER_ALL "All files (*.*)"
@ -62,7 +62,7 @@ index 1324a5449a3..3fc9d205c25 100644
/* FIXME: Some will be unused until desktop.ini support is implemented */
IDS_PROGRAMS "Programs"
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
index e7c1cf16e10..b3bcd37fa56 100644
index 6290cd0f9c8..0c62b6271c3 100644
--- a/dlls/shell32/shlview_cmenu.c
+++ b/dlls/shell32/shlview_cmenu.c
@@ -39,14 +39,133 @@
@ -401,7 +401,7 @@ index e7c1cf16e10..b3bcd37fa56 100644
+ security->ref = 1;
+ security->directory = directory;
+
+ len = (strlenW(path) + 1) * sizeof(WCHAR);
+ len = (wcslen(path) + 1) * sizeof(WCHAR);
+ security->path = HeapAlloc(GetProcessHeap(), 0, len);
+ if (!security->path) goto error;
+
@ -478,10 +478,10 @@ index e7c1cf16e10..b3bcd37fa56 100644
hpsxa = SHCreatePropSheetExtArrayEx(HKEY_CLASSES_ROOT, wszFiletype, MAX_PROP_PAGES - psh.nPages, lpDo);
if (hpsxa != NULL)
diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h
index 33edb584c1b..e2211024cc3 100644
index 210046e729d..0f3a64f16d2 100644
--- a/dlls/shell32/shresdef.h
+++ b/dlls/shell32/shresdef.h
@@ -157,6 +157,33 @@
@@ -155,6 +155,33 @@
#define IDS_FILEOP_FROM 337
#define IDS_FILEOP_PREFLIGHT 338
@ -516,5 +516,5 @@ index 33edb584c1b..e2211024cc3 100644
#define IDS_RECYCLEBIN_FOLDER_NAME 8964
--
2.30.2
2.33.0

View File

@ -1,4 +1,4 @@
From e42e76b1a48a1a523f8405c85a2baf9df9e4dabb Mon Sep 17 00:00:00 2001
From 6b66550b43ca3a870b6d8a8eb2aaef7001d8abc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
Date: Fri, 30 Nov 2018 12:20:40 +0200
Subject: [PATCH] shell32/iconcache: Generate icons from available icons if
@ -19,14 +19,22 @@ smaller icons are only picked if no other available icon is larger).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45696
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
---
dlls/shell32/iconcache.c | 67 +++++++++++++++++++++++++++++++++-------
1 file changed, 56 insertions(+), 11 deletions(-)
dlls/shell32/iconcache.c | 68 +++++++++++++++++++++++++++++++++-------
1 file changed, 57 insertions(+), 11 deletions(-)
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
index 44422ab..5ffb293 100644
index f1d95e851eb..9d5f8b1c04a 100644
--- a/dlls/shell32/iconcache.c
+++ b/dlls/shell32/iconcache.c
@@ -345,13 +345,6 @@ static INT SIC_IconAppend (const WCHAR *sourcefile, INT src_index, HICON *hicons
@@ -21,6 +21,7 @@
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
+#include <math.h>
#define COBJMACROS
@@ -339,13 +340,6 @@ static INT SIC_IconAppend (const WCHAR *sourcefile, INT src_index, HICON *hicons
return ret;
}
@ -40,7 +48,7 @@ index 44422ab..5ffb293 100644
/****************************************************************************
* SIC_LoadIcon [internal]
*
@@ -362,15 +355,67 @@ static INT SIC_LoadIcon (const WCHAR *sourcefile, INT index, DWORD flags)
@@ -356,15 +350,67 @@ static INT SIC_LoadIcon (const WCHAR *sourcefile, INT index, DWORD flags)
{
HICON hicons[ARRAY_SIZE(shell_imagelists)] = { 0 };
HICON hshortcuts[ARRAY_SIZE(hicons)] = { 0 };
@ -50,8 +58,11 @@ index 44422ab..5ffb293 100644
INT ret = -1;
+ /* Keep track of the sizes in case any icon fails to get extracted */
+ for (i = 0; i < ARRAY_SIZE(hicons); i++)
+ {
for (i = 0; i < ARRAY_SIZE(hicons); i++)
{
- get_imagelist_icon_size( i, &size );
- if (!PrivateExtractIconsW( sourcefile, index, size.cx, size.cy, &hicons[i], 0, 1, 0 ))
- WARN("Failed to load icon %d from %s.\n", index, debugstr_w(sourcefile));
+ ImageList_GetIconSize(shell_imagelists[i], &size[i].cx, &size[i].cy);
+ PrivateExtractIconsW(sourcefile, index, size[i].cx, size[i].cy, &hicons[i], 0, 1, 0);
+ }
@ -59,11 +70,8 @@ index 44422ab..5ffb293 100644
+ /* Fill any icon handles that failed to get extracted, by resizing
+ another icon handle that succeeded and creating the icon from it.
+ Use a dumb O(n^2) algorithm since ARRAY_SIZE(hicons) is small */
for (i = 0; i < ARRAY_SIZE(hicons); i++)
{
- get_imagelist_icon_size( i, &size );
- if (!PrivateExtractIconsW( sourcefile, index, size.cx, size.cy, &hicons[i], 0, 1, 0 ))
- WARN("Failed to load icon %d from %s.\n", index, debugstr_w(sourcefile));
+ for (i = 0; i < ARRAY_SIZE(hicons); i++)
+ {
+ unsigned int k, ix, iy;
+ BOOL failed = TRUE;
+ if (hicons[i]) continue;
@ -113,5 +121,5 @@ index 44422ab..5ffb293 100644
}
--
2.19.1
2.33.0

View File

@ -1,4 +1,4 @@
From 74edb4f4f73468f132872cc96841894220e2b7a0 Mon Sep 17 00:00:00 2001
From 9601c7ebe3adaef521073e4b5ab7728d9da3c8f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 16 Aug 2015 17:34:22 +0200
Subject: [PATCH] shell32: Implement NewMenu with new folder item.
@ -14,17 +14,17 @@ Correct header issue when compiling i386 (var_arg)
dlls/shell32/Makefile.in | 1 +
dlls/shell32/shell32_classes.idl | 5 +
dlls/shell32/shell32_main.h | 1 +
dlls/shell32/shellnew.c | 498 +++++++++++++++++++++++++++++++
dlls/shell32/shellnew.c | 497 +++++++++++++++++++++++++++++++
dlls/shell32/shellole.c | 1 +
dlls/shell32/tests/shlview.c | 9 +-
6 files changed, 514 insertions(+), 1 deletion(-)
6 files changed, 513 insertions(+), 1 deletion(-)
create mode 100644 dlls/shell32/shellnew.c
diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in
index fe49bf09f98..41b2ec2d607 100644
index 04dd196cfe8..072d98b5fba 100644
--- a/dlls/shell32/Makefile.in
+++ b/dlls/shell32/Makefile.in
@@ -31,6 +31,7 @@ C_SRCS = \
@@ -33,6 +33,7 @@ C_SRCS = \
shelldispatch.c \
shellitem.c \
shelllink.c \
@ -33,10 +33,10 @@ index fe49bf09f98..41b2ec2d607 100644
shellord.c \
shellpath.c \
diff --git a/dlls/shell32/shell32_classes.idl b/dlls/shell32/shell32_classes.idl
index f2c5ed4a766..c9ecb9aa2a2 100644
index 22ef49ae5c7..699ad1a2f03 100644
--- a/dlls/shell32/shell32_classes.idl
+++ b/dlls/shell32/shell32_classes.idl
@@ -80,6 +80,11 @@ coclass KnownFolderManager { interface IKnownFolderManager; }
@@ -86,6 +86,11 @@ coclass KnownFolderManager { interface IKnownFolderManager; }
uuid(4657278a-411b-11d2-839a-00c04fd918d0)
] coclass DragDropHelper { interface IDropTargetHelper; }
@ -49,10 +49,10 @@ index f2c5ed4a766..c9ecb9aa2a2 100644
threading(apartment),
uuid(00bb2763-6a77-11d0-a535-00c04fd7d062)
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
index da50e19de46..23cf30acfa9 100644
index b98629298aa..d684d8759a7 100644
--- a/dlls/shell32/shell32_main.h
+++ b/dlls/shell32/shell32_main.h
@@ -103,6 +103,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID
@@ -102,6 +102,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID
HRESULT WINAPI QueryAssociations_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput) DECLSPEC_HIDDEN;
HRESULT WINAPI ExplorerBrowser_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
HRESULT WINAPI KnownFolderManager_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN;
@ -62,10 +62,10 @@ index da50e19de46..23cf30acfa9 100644
HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) DECLSPEC_HIDDEN;
diff --git a/dlls/shell32/shellnew.c b/dlls/shell32/shellnew.c
new file mode 100644
index 00000000000..89be091e031
index 00000000000..04d718f0f0d
--- /dev/null
+++ b/dlls/shell32/shellnew.c
@@ -0,0 +1,498 @@
@@ -0,0 +1,497 @@
+/*
+ * Copyright 2015 Michael Müller
+ *
@ -83,7 +83,6 @@ index 00000000000..89be091e031
+ * 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"
+
+#define COBJMACROS
+#define NONAMELESSUNION
@ -419,7 +418,7 @@ index 00000000000..89be091e031
+
+ item.fMask = MIIM_ID | MIIM_BITMAP | MIIM_STRING;
+ item.dwTypeData = buffer;
+ item.cch = strlenW(buffer);
+ item.cch = wcslen(buffer);
+ item.wID = cmd_first;
+ item.hbmpItem = HBMMENU_CALLBACK;
+ if (InsertMenuItemW(menu, pos, TRUE, &item))
@ -458,7 +457,7 @@ index 00000000000..89be091e031
+ item.fType = MFT_STRING;
+ item.wID = -1;
+ item.dwTypeData = newW; /* FIXME: load from resource file */
+ item.cch = strlenW(newW);
+ item.cch = wcslen(newW);
+ item.fState = MFS_ENABLED;
+ item.hSubMenu = submenu;
+
@ -565,10 +564,10 @@ index 00000000000..89be091e031
+ return hr;
+}
diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c
index 3c88642512e..d062cc8476b 100644
index d1f1afc3780..e521b7e8f70 100644
--- a/dlls/shell32/shellole.c
+++ b/dlls/shell32/shellole.c
@@ -75,6 +75,7 @@ static const struct {
@@ -73,6 +73,7 @@ static const struct {
{&CLSID_MyComputer, ISF_MyComputer_Constructor},
{&CLSID_MyDocuments, MyDocuments_Constructor},
{&CLSID_NetworkPlaces, ISF_NetworkPlaces_Constructor},
@ -604,5 +603,5 @@ index f5d96c8d441..dbb24d93564 100644
ok(hr == S_OK, "Failed to get IContextMenu3, hr %#x.\n", hr);
IUnknown_Release(unk2);
--
2.20.1
2.33.0

View File

@ -1,4 +1,4 @@
From 0cc42072f1b4585c2c0b11faf5a33282ce603853 Mon Sep 17 00:00:00 2001
From 10a17211f70192614d6e799ed76fe811b120dcc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 27 Feb 2015 01:04:33 +0100
Subject: [PATCH] shell32: Implement file operation progress dialog.
@ -11,10 +11,10 @@ Based on a patch by Huw Campbell.
3 files changed, 285 insertions(+), 7 deletions(-)
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
index f19b09f8c21..f9b75df1f05 100644
index f7f8eea2da5..eb03982f6a9 100644
--- a/dlls/shell32/shell32.rc
+++ b/dlls/shell32/shell32.rc
@@ -184,6 +184,13 @@ If the files in the destination folder have the same names as files in the\n\
@@ -182,6 +182,13 @@ If the files in the destination folder have the same names as files in the\n\
selected folder they will be replaced. Do you still want to move or copy\n\
the folder?"
@ -29,10 +29,10 @@ index f19b09f8c21..f9b75df1f05 100644
IDS_RESTART_TITLE "Restart"
IDS_RESTART_PROMPT "Do you want to simulate a Windows reboot?"
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index 91354d4c2ad..2263b20de8a 100644
index 50ee0486a23..4c8dcb00ac6 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -67,6 +67,10 @@ typedef struct
@@ -65,6 +65,10 @@ typedef struct
DWORD dwYesToAllMask;
BOOL bManyItems;
BOOL bCancelled;
@ -43,7 +43,7 @@ index 91354d4c2ad..2263b20de8a 100644
} FILE_OPERATION;
typedef struct
@@ -105,6 +109,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
@@ -103,6 +107,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFrom, FILE_LIST *flTo);
static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFrom, const FILE_LIST *flTo);
@ -56,7 +56,7 @@ index 91354d4c2ad..2263b20de8a 100644
/* Confirm dialogs with an optional "Yes To All" as used in file operations confirmations
*/
static const WCHAR CONFIRM_MSG_PROP[] = {'W','I','N','E','_','C','O','N','F','I','R','M',0};
@@ -393,6 +403,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh
@@ -391,6 +401,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh
ret = SHELL_DeleteDirectoryW(op, szTemp, FALSE);
else
ret = SHNotifyDeleteFileW(op, szTemp);
@ -70,7 +70,7 @@ index 91354d4c2ad..2263b20de8a 100644
} while (!ret && FindNextFileW(hFind, &wfd));
}
FindClose(hFind);
@@ -546,10 +563,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
@@ -544,10 +561,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
{
BOOL ret;
@ -94,7 +94,7 @@ index 91354d4c2ad..2263b20de8a 100644
ret = DeleteFileW(path);
if (!ret)
@@ -562,6 +591,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
@@ -560,6 +589,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
}
if (ret)
{
@ -109,7 +109,7 @@ index 91354d4c2ad..2263b20de8a 100644
SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL);
return ERROR_SUCCESS;
}
@@ -596,9 +633,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest)
@@ -594,9 +631,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest)
TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest));
@ -122,7 +122,7 @@ index 91354d4c2ad..2263b20de8a 100644
/* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
if (!ret)
@@ -648,14 +686,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
@@ -646,14 +684,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bFailIfExists ? "failIfExists" : "");
@ -140,7 +140,7 @@ index 91354d4c2ad..2263b20de8a 100644
if (ret)
{
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL);
@@ -1297,6 +1336,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
@@ -1295,6 +1334,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
}
/* Vista return code. XP would return e.g. ERROR_FILE_NOT_FOUND, ERROR_ALREADY_EXISTS */
@ -149,7 +149,7 @@ index 91354d4c2ad..2263b20de8a 100644
if (op->bCancelled)
return ERROR_CANCELLED;
}
@@ -1379,13 +1420,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
@@ -1376,13 +1417,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
/* delete the file or directory */
if (IsAttribFile(fileEntry->attributes))
@ -169,7 +169,7 @@ index 91354d4c2ad..2263b20de8a 100644
}
return ERROR_SUCCESS;
@@ -1460,6 +1505,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
@@ -1457,6 +1502,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
move_to_dir(op, entryToMove, fileDest);
else
SHNotifyMoveFileW(op, entryToMove->szFullPath, fileDest->szFullPath);
@ -181,7 +181,7 @@ index 91354d4c2ad..2263b20de8a 100644
}
if (mismatched > 0)
@@ -1519,6 +1569,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1516,6 +1566,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
{
FILE_OPERATION op;
FILE_LIST flFrom, flTo;
@ -189,7 +189,7 @@ index 91354d4c2ad..2263b20de8a 100644
int ret = 0;
if (!lpFileOp)
@@ -1537,9 +1588,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1534,9 +1585,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
ZeroMemory(&op, sizeof(op));
op.req = lpFileOp;
@ -221,7 +221,7 @@ index 91354d4c2ad..2263b20de8a 100644
switch (lpFileOp->wFunc)
{
case FO_COPY:
@@ -1559,6 +1632,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1556,6 +1629,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
break;
}
@ -234,7 +234,7 @@ index 91354d4c2ad..2263b20de8a 100644
destroy_file_list(&flFrom);
if (lpFileOp->wFunc != FO_DELETE)
@@ -1567,6 +1646,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1564,6 +1643,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
if (ret == ERROR_CANCELLED)
lpFileOp->fAnyOperationsAborted = TRUE;
@ -244,7 +244,7 @@ index 91354d4c2ad..2263b20de8a 100644
SetLastError(ERROR_SUCCESS);
return ret;
}
@@ -2055,3 +2137,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o
@@ -2052,3 +2134,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o
return hr;
}
@ -253,7 +253,7 @@ index 91354d4c2ad..2263b20de8a 100644
+{
+ WIN32_FIND_DATAW wfd;
+ HANDLE find;
+ UINT i = strlenW(buf);
+ UINT i = wcslen(buf);
+ WCHAR *file = buf + i;
+ size_t size = MAX_PATH - i;
+
@ -430,10 +430,10 @@ index 91354d4c2ad..2263b20de8a 100644
+ return op->bCancelled ? PROGRESS_CANCEL : PROGRESS_CONTINUE;
+}
diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h
index 92185d637e7..33edb584c1b 100644
index af8eb46a09f..210046e729d 100644
--- a/dlls/shell32/shresdef.h
+++ b/dlls/shell32/shresdef.h
@@ -149,6 +149,14 @@
@@ -147,6 +147,14 @@
#define IDM_RECYCLEBIN_RESTORE 301
#define IDM_RECYCLEBIN_ERASE 302
@ -449,5 +449,5 @@ index 92185d637e7..33edb584c1b 100644
#define IDS_RECYCLEBIN_FOLDER_NAME 8964
--
2.20.1
2.33.0

View File

@ -1,4 +1,4 @@
From f8f70e240299a518c8ce6dec56b7f0c318a14e7f Mon Sep 17 00:00:00 2001
From c36fdad49464375eaf3696df6915c12e3e3e894c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
Date: Mon, 22 Jul 2019 15:29:26 +0300
Subject: [PATCH] user32/tests: Test a recursive activation loop on WM_ACTIVATE
@ -15,10 +15,10 @@ Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
1 file changed, 81 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 37a31eefa89..ec85a07b28a 100644
index 64054147a62..7a85e556f34 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -5083,6 +5083,39 @@ static void test_showwindow(void)
@@ -5106,6 +5106,39 @@ static void test_showwindow(void)
flush_sequence();
}
@ -58,7 +58,7 @@ index 37a31eefa89..ec85a07b28a 100644
static void test_sys_menu(void)
{
HWND hwnd;
@@ -10078,6 +10111,48 @@ static LRESULT WINAPI ShowWindowProcA(HWND hwnd, UINT message, WPARAM wParam, LP
@@ -10101,6 +10134,48 @@ static LRESULT WINAPI ShowWindowProcA(HWND hwnd, UINT message, WPARAM wParam, LP
return ret;
}
@ -107,7 +107,7 @@ index 37a31eefa89..ec85a07b28a 100644
static LRESULT WINAPI PaintLoopProcA(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
@@ -10175,6 +10250,10 @@ static BOOL RegisterWindowClasses(void)
@@ -10198,6 +10273,10 @@ static BOOL RegisterWindowClasses(void)
cls.lpszClassName = "ShowWindowClass";
if(!RegisterClassA(&cls)) return FALSE;
@ -118,7 +118,7 @@ index 37a31eefa89..ec85a07b28a 100644
cls.lpfnWndProc = PopupMsgCheckProcA;
cls.lpszClassName = "TestPopupClass";
if(!RegisterClassA(&cls)) return FALSE;
@@ -10230,6 +10309,7 @@ static BOOL is_our_logged_class(HWND hwnd)
@@ -10253,6 +10332,7 @@ static BOOL is_our_logged_class(HWND hwnd)
{
if (!lstrcmpiA(buf, "TestWindowClass") ||
!lstrcmpiA(buf, "ShowWindowClass") ||
@ -127,13 +127,13 @@ index 37a31eefa89..ec85a07b28a 100644
!lstrcmpiA(buf, "TestPopupClass") ||
!lstrcmpiA(buf, "SimpleWindowClass") ||
@@ -18476,6 +18556,7 @@ START_TEST(msg)
hEvent_hook = 0;
test_messages();
test_setwindowpos();
test_showwindow();
+ test_recursive_activation();
invisible_parent_tests();
test_mdi_messages();
test_button_messages();
/* Fix message sequences before removing 4 lines below */
--
2.33.0

View File

@ -1 +1 @@
8547aac2dcfcae9060d0a630c9f80af7bcaf19b4
16e73be10d940c9c04101a47687a6f8a385c2b0f