You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against f4a8ad89d43646a8d109da5747dfb1a92a6d8cd1.
This commit is contained in:
@@ -1,29 +1,20 @@
|
||||
From 9540fdc5b1668e4b575ce00539454b8ac66457a0 Mon Sep 17 00:00:00 2001
|
||||
From c7ab99f5961daaf0c81a710d332dca5fc79528c0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 2 Apr 2016 04:15:02 +0200
|
||||
Subject: shell32: Add support for setting/getting PREFERREDDROPEFFECT in
|
||||
IDataObject.
|
||||
Subject: [PATCH] shell32: Add support for setting/getting PREFERREDDROPEFFECT
|
||||
in IDataObject.
|
||||
|
||||
---
|
||||
dlls/shell32/clipboard.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/shell32/dataobject.c | 24 +++++++++++++++++++++---
|
||||
dlls/shell32/clipboard.c | 40 +++++++++++++++++++++++++++++++++++++
|
||||
dlls/shell32/dataobject.c | 24 +++++++++++++++++++---
|
||||
dlls/shell32/shell32_main.h | 2 ++
|
||||
3 files changed, 63 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/clipboard.c b/dlls/shell32/clipboard.c
|
||||
index 82df534..9c6f284 100644
|
||||
index 2f5c63bed9d..27c3421cf28 100644
|
||||
--- a/dlls/shell32/clipboard.c
|
||||
+++ b/dlls/shell32/clipboard.c
|
||||
@@ -38,6 +38,8 @@
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
+#define NONAMELESSUNION
|
||||
+
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
@@ -214,3 +216,41 @@ HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
|
||||
@@ -212,3 +214,41 @@ HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl)
|
||||
|
||||
return hGlobal;
|
||||
}
|
||||
@@ -55,21 +46,21 @@ index 82df534..9c6f284 100644
|
||||
+
|
||||
+ TRACE("(%p, %p)\n", pmedium, value);
|
||||
+
|
||||
+ pEffect = GlobalLock(pmedium->u.hGlobal);
|
||||
+ pEffect = GlobalLock(pmedium->hGlobal);
|
||||
+ if (pEffect)
|
||||
+ {
|
||||
+ *value = *pEffect;
|
||||
+ result = S_OK;
|
||||
+ GlobalUnlock(pmedium->u.hGlobal);
|
||||
+ GlobalUnlock(pmedium->hGlobal);
|
||||
+ }
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
diff --git a/dlls/shell32/dataobject.c b/dlls/shell32/dataobject.c
|
||||
index cc7b63e..5a18a1a 100644
|
||||
index 3cd86845c42..cc7ab601bac 100644
|
||||
--- a/dlls/shell32/dataobject.c
|
||||
+++ b/dlls/shell32/dataobject.c
|
||||
@@ -197,7 +197,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[])
|
||||
@@ -193,7 +193,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[])
|
||||
*/
|
||||
|
||||
/* number of supported formats */
|
||||
@@ -78,7 +69,7 @@ index cc7b63e..5a18a1a 100644
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -209,12 +209,13 @@ typedef struct
|
||||
@@ -205,12 +205,13 @@ typedef struct
|
||||
LPITEMIDLIST pidl;
|
||||
LPITEMIDLIST * apidl;
|
||||
UINT cidl;
|
||||
@@ -93,18 +84,18 @@ index cc7b63e..5a18a1a 100644
|
||||
} IDataObjectImpl;
|
||||
|
||||
static inline IDataObjectImpl *impl_from_IDataObject(IDataObject *iface)
|
||||
@@ -314,6 +315,10 @@ static HRESULT WINAPI IDataObject_fnGetData(IDataObject *iface, LPFORMATETC pfor
|
||||
@@ -310,6 +311,10 @@ static HRESULT WINAPI IDataObject_fnGetData(IDataObject *iface, LPFORMATETC pfor
|
||||
if (This->cidl < 1) return(E_UNEXPECTED);
|
||||
pmedium->u.hGlobal = RenderFILENAMEW(This->pidl, This->apidl, This->cidl);
|
||||
pmedium->hGlobal = RenderFILENAMEW(This->pidl, This->apidl, This->cidl);
|
||||
}
|
||||
+ else if (pformatetcIn->cfFormat == This->cfDropEffect)
|
||||
+ {
|
||||
+ pmedium->u.hGlobal = RenderPREFERREDDROPEFFECT(This->dropEffect);
|
||||
+ pmedium->hGlobal = RenderPREFERREDDROPEFFECT(This->dropEffect);
|
||||
+ }
|
||||
else
|
||||
{
|
||||
FIXME("-- expected clipformat not implemented\n");
|
||||
@@ -368,7 +373,17 @@ static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(IDataObject *iface, LP
|
||||
@@ -364,7 +369,17 @@ static HRESULT WINAPI IDataObject_fnGetCanonicalFormatEtc(IDataObject *iface, LP
|
||||
static HRESULT WINAPI IDataObject_fnSetData(IDataObject *iface, LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease)
|
||||
{
|
||||
IDataObjectImpl *This = impl_from_IDataObject(iface);
|
||||
@@ -123,7 +114,7 @@ index cc7b63e..5a18a1a 100644
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -441,14 +456,17 @@ IDataObject* IDataObject_Constructor(HWND hwndOwner,
|
||||
@@ -437,14 +452,17 @@ IDataObject* IDataObject_Constructor(HWND hwndOwner,
|
||||
dto->pidl = ILClone(pMyPidl);
|
||||
dto->apidl = _ILCopyaPidl(apidl, cidl);
|
||||
dto->cidl = cidl;
|
||||
@@ -142,10 +133,10 @@ index cc7b63e..5a18a1a 100644
|
||||
|
||||
TRACE("(%p)->(apidl=%p cidl=%u)\n",dto, apidl, cidl);
|
||||
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
|
||||
index 492f79f..29822b7 100644
|
||||
index f9607585184..56f0a631d08 100644
|
||||
--- a/dlls/shell32/shell32_main.h
|
||||
+++ b/dlls/shell32/shell32_main.h
|
||||
@@ -130,6 +130,8 @@ HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) DECL
|
||||
@@ -141,6 +141,8 @@ HGLOBAL RenderHDROP(LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) DECL
|
||||
HGLOBAL RenderSHELLIDLIST (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) DECLSPEC_HIDDEN;
|
||||
HGLOBAL RenderFILENAMEA (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) DECLSPEC_HIDDEN;
|
||||
HGLOBAL RenderFILENAMEW (LPITEMIDLIST pidlRoot, LPITEMIDLIST * apidl, UINT cidl) DECLSPEC_HIDDEN;
|
||||
@@ -155,5 +146,5 @@ index 492f79f..29822b7 100644
|
||||
/* Change Notification */
|
||||
void InitChangeNotifications(void) DECLSPEC_HIDDEN;
|
||||
--
|
||||
2.7.1
|
||||
2.40.1
|
||||
|
||||
|
@@ -31,10 +31,10 @@ index abee4c93a35..6a16aab2f25 100644
|
||||
+
|
||||
+ medium.tymed = TYMED_HGLOBAL;
|
||||
+ medium.pUnkForRelease = NULL;
|
||||
+ medium.u.hGlobal = GlobalAlloc(GHND|GMEM_SHARE, sizeof(DWORD));
|
||||
+ if (!medium.u.hGlobal) return;
|
||||
+ medium.hGlobal = GlobalAlloc(GHND|GMEM_SHARE, sizeof(DWORD));
|
||||
+ if (!medium.hGlobal) return;
|
||||
+
|
||||
+ effect = GlobalLock(medium.u.hGlobal);
|
||||
+ effect = GlobalLock(medium.hGlobal);
|
||||
+ if (!effect)
|
||||
+ {
|
||||
+ ReleaseStgMedium(&medium);
|
||||
@@ -64,7 +64,7 @@ index abee4c93a35..6a16aab2f25 100644
|
||||
+
|
||||
+ if (SUCCEEDED(IDataObject_GetData(dataobject, &formatetc, &medium)))
|
||||
+ {
|
||||
+ effect = GlobalLock(medium.u.hGlobal);
|
||||
+ effect = GlobalLock(medium.hGlobal);
|
||||
+ if (effect)
|
||||
+ {
|
||||
+ *value = *effect;
|
||||
|
Reference in New Issue
Block a user