winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2024
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
775 discussions
Start a n
N
ew thread
Nikolay Sivov : d3dcompiler: Enable semantic names mapping in compatibility mode.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: 2c9f67938f89ca554481bc3a96222db2b4c8eac4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/2c9f67938f89ca554481bc3a96222d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Feb 24 01:01:07 2024 +0100 d3dcompiler: Enable semantic names mapping in compatibility mode. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d3dcompiler_43/compiler.c | 14 ++++++++++++-- dlls/d3dcompiler_43/tests/hlsl_d3d11.c | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index 67f69b7f9ef..ded52bad965 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -406,7 +406,7 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen struct d3dcompiler_include_from_file include_from_file; struct vkd3d_shader_preprocess_info preprocess_info; struct vkd3d_shader_hlsl_source_info hlsl_info; - struct vkd3d_shader_compile_option options[3]; + struct vkd3d_shader_compile_option options[4]; struct vkd3d_shader_compile_info compile_info; struct vkd3d_shader_compile_option *option; struct vkd3d_shader_code byte_code; @@ -453,8 +453,11 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen include = &include_from_file.ID3DInclude_iface; } - if (flags & ~(D3DCOMPILE_DEBUG | D3DCOMPILE_PACK_MATRIX_ROW_MAJOR | D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR)) + if (flags & ~(D3DCOMPILE_DEBUG | D3DCOMPILE_PACK_MATRIX_ROW_MAJOR | D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR + | D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY)) + { FIXME("Ignoring flags %#x.\n", flags); + } if (effect_flags) FIXME("Ignoring effect flags %#x.\n", effect_flags); if (secondary_flags) @@ -532,6 +535,13 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen option->value = VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_COLUMN_MAJOR; } + if (flags & D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY) + { + option = &options[compile_info.option_count++]; + option->name = VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY; + option->value = VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES; + } + ret = vkd3d_shader_compile(&compile_info, &byte_code, &messages); if (ret) diff --git a/dlls/d3dcompiler_43/tests/hlsl_d3d11.c b/dlls/d3dcompiler_43/tests/hlsl_d3d11.c index d0c3c223353..1814b6e38ea 100644 --- a/dlls/d3dcompiler_43/tests/hlsl_d3d11.c +++ b/dlls/d3dcompiler_43/tests/hlsl_d3d11.c @@ -622,7 +622,7 @@ static void test_sampling(void) draw_quad(&test_context, ps_code); v = get_color_vec4(&test_context, 0, 0); - todo_wine ok(compare_vec4(&v, 0.25f, 0.0f, 0.25f, 0.0f, 0), + ok(compare_vec4(&v, 0.25f, 0.0f, 0.25f, 0.0f, 0), "Got unexpected value {%.8e, %.8e, %.8e, %.8e}.\n", v.x, v.y, v.z, v.w); ID3D10Blob_Release(ps_code);
1
0
0
0
Zebediah Figura : shell32: Implement Paste in the item menu.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: af7f11bb2a5c2018f90fbf465ac4d190f8381a1a URL:
https://gitlab.winehq.org/wine/wine/-/commit/af7f11bb2a5c2018f90fbf465ac4d1…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Mar 3 22:00:51 2024 -0600 shell32: Implement Paste in the item menu. Based on a patch by Michael Müller. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=34319
--- dlls/shell32/shell32.rc | 1 + dlls/shell32/shlview_cmenu.c | 67 +++++++++- dlls/shell32/tests/shlfolder.c | 18 +-- po/ar.po | 275 +++++++++++++++++++++-------------------- po/ast.po | 275 +++++++++++++++++++++-------------------- po/bg.po | 275 +++++++++++++++++++++-------------------- po/ca.po | 275 +++++++++++++++++++++-------------------- po/cs.po | 275 +++++++++++++++++++++-------------------- po/da.po | 275 +++++++++++++++++++++-------------------- po/de.po | 275 +++++++++++++++++++++-------------------- po/el.po | 275 +++++++++++++++++++++-------------------- po/en.po | 275 +++++++++++++++++++++-------------------- po/en_US.po | 275 +++++++++++++++++++++-------------------- po/eo.po | 275 +++++++++++++++++++++-------------------- po/es.po | 275 +++++++++++++++++++++-------------------- po/fa.po | 275 +++++++++++++++++++++-------------------- po/fi.po | 275 +++++++++++++++++++++-------------------- po/fr.po | 275 +++++++++++++++++++++-------------------- po/he.po | 275 +++++++++++++++++++++-------------------- po/hi.po | 275 +++++++++++++++++++++-------------------- po/hr.po | 275 +++++++++++++++++++++-------------------- po/hu.po | 275 +++++++++++++++++++++-------------------- po/it.po | 275 +++++++++++++++++++++-------------------- po/ja.po | 275 +++++++++++++++++++++-------------------- po/ka.po | 275 +++++++++++++++++++++-------------------- po/ko.po | 275 +++++++++++++++++++++-------------------- po/lt.po | 275 +++++++++++++++++++++-------------------- po/ml.po | 275 +++++++++++++++++++++-------------------- po/nb_NO.po | 275 +++++++++++++++++++++-------------------- po/nl.po | 275 +++++++++++++++++++++-------------------- po/or.po | 275 +++++++++++++++++++++-------------------- po/pa.po | 275 +++++++++++++++++++++-------------------- po/pl.po | 275 +++++++++++++++++++++-------------------- po/pt_BR.po | 275 +++++++++++++++++++++-------------------- po/pt_PT.po | 275 +++++++++++++++++++++-------------------- po/rm.po | 275 +++++++++++++++++++++-------------------- po/ro.po | 275 +++++++++++++++++++++-------------------- po/ru.po | 275 +++++++++++++++++++++-------------------- po/si.po | 275 +++++++++++++++++++++-------------------- po/sk.po | 275 +++++++++++++++++++++-------------------- po/sl.po | 275 +++++++++++++++++++++-------------------- po/sr_RS(a)cyrillic.po | 275 +++++++++++++++++++++-------------------- po/sr_RS(a)latin.po | 275 +++++++++++++++++++++-------------------- po/sv.po | 275 +++++++++++++++++++++-------------------- po/ta.po | 275 +++++++++++++++++++++-------------------- po/te.po | 275 +++++++++++++++++++++-------------------- po/th.po | 275 +++++++++++++++++++++-------------------- po/tr.po | 275 +++++++++++++++++++++-------------------- po/uk.po | 275 +++++++++++++++++++++-------------------- po/wa.po | 275 +++++++++++++++++++++-------------------- po/wine.pot | 275 +++++++++++++++++++++-------------------- po/zh_CN.po | 275 +++++++++++++++++++++-------------------- po/zh_TW.po | 275 +++++++++++++++++++++-------------------- 53 files changed, 6975 insertions(+), 6861 deletions(-)
1
0
0
0
Zebediah Figura : shell32: Respect the parent PIDL when pasting from CFSTR_SHELLIDLIST.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: 5744ef64a4a5040814f0c5ebff489e2ba815d703 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5744ef64a4a5040814f0c5ebff489e…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Mar 3 21:02:09 2024 -0600 shell32: Respect the parent PIDL when pasting from CFSTR_SHELLIDLIST. --- dlls/shell32/shlview_cmenu.c | 53 +++++++++++++++++------------------------- dlls/shell32/tests/shlfolder.c | 2 +- 2 files changed, 22 insertions(+), 33 deletions(-) diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c index aa89e14346e..729f543ef51 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c @@ -311,50 +311,39 @@ static void DoCopyOrCut(ContextMenu *This, HWND hwnd, BOOL cut) } } -static HRESULT paste_pidls(ContextMenu *menu, ITEMIDLIST **pidls, unsigned int count) +static HRESULT paste_pidls(ContextMenu *menu, const ITEMIDLIST *src_parent, ITEMIDLIST **pidls, unsigned int count) { - IShellFolder *desktop_folder; + IShellFolder *src_folder; HRESULT hr = S_OK; - if (FAILED(hr = SHGetDesktopFolder(&desktop_folder))) + if (FAILED(hr = SHBindToObject(NULL, src_parent, NULL, &IID_IShellFolder, (void **)&src_folder))) + { + ERR("Failed to get folder from source PIDL, hr %#lx.\n", hr); return hr; + } for (unsigned int i = 0; SUCCEEDED(hr) && i < count; i++) { - IShellFolder *folder = NULL; - ITEMIDLIST *pidl_dir; - ITEMIDLIST *pidl_item; + ISFHelper *psfhlpdst = NULL, *psfhlpsrc = NULL; - pidl_dir = ILClone(pidls[i]); - ILRemoveLastID(pidl_dir); - pidl_item = ILFindLastID(pidls[i]); - hr = IShellFolder_BindToObject(desktop_folder, pidl_dir, NULL, &IID_IShellFolder, (void **)&folder); + hr = IShellFolder_QueryInterface(menu->parent, &IID_ISFHelper, (void **)&psfhlpdst); + if (SUCCEEDED(hr)) + hr = IShellFolder_QueryInterface(src_folder, &IID_ISFHelper, (void **)&psfhlpsrc); - if (folder) + if (psfhlpdst && psfhlpsrc) { - ISFHelper *psfhlpdst = NULL, *psfhlpsrc = NULL; - - hr = IShellFolder_QueryInterface(menu->parent, &IID_ISFHelper, (void **)&psfhlpdst); - if (SUCCEEDED(hr)) - hr = IShellFolder_QueryInterface(folder, &IID_ISFHelper, (void **)&psfhlpsrc); - - if (psfhlpdst && psfhlpsrc) - { - hr = ISFHelper_CopyItems(psfhlpdst, folder, 1, (LPCITEMIDLIST*)&pidl_item); - /* FIXME handle move - ISFHelper_DeleteItems(psfhlpsrc, 1, &pidl_item); - */ - } - if (psfhlpdst) - ISFHelper_Release(psfhlpdst); - if (psfhlpsrc) - ISFHelper_Release(psfhlpsrc); - IShellFolder_Release(folder); + hr = ISFHelper_CopyItems(psfhlpdst, src_folder, 1, (LPCITEMIDLIST *)&pidls[i]); + /* FIXME handle move + ISFHelper_DeleteItems(psfhlpsrc, 1, &pidl_item); + */ } - ILFree(pidl_dir); + if (psfhlpdst) + ISFHelper_Release(psfhlpdst); + if (psfhlpsrc) + ISFHelper_Release(psfhlpsrc); } - IShellFolder_Release(desktop_folder); + IShellFolder_Release(src_folder); return hr; } @@ -386,7 +375,7 @@ static HRESULT do_paste(ContextMenu *menu, HWND hwnd) pidls = _ILCopyCidaToaPidl(&pidl, cida); if (pidls) { - hr = paste_pidls(menu, pidls, cida->cidl); + hr = paste_pidls(menu, pidl, pidls, cida->cidl); _ILFreeaPidl(pidls, cida->cidl); SHFree(pidl); } diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index 9da28f570df..d310cd80cbe 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -5797,7 +5797,7 @@ static void test_copy_paste(void) ok(ret != INVALID_FILE_ATTRIBUTES, "Got %#x.\n", ret); ret = RemoveDirectoryW(L"testcopy_dst/testcopy_src"); - todo_wine ok(ret, "Got error %lu.\n", GetLastError()); + ok(ret, "Got error %lu.\n", GetLastError()); /* Paste into a selection comprising multiple directories. In this case the * first directory is used, and the second is just ignored.
1
0
0
0
Zebediah Figura : shell32: Reimplement pasting from CF_DROP directly.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: c4b38894cdd836d0da7766985e00af5f672276dd URL:
https://gitlab.winehq.org/wine/wine/-/commit/c4b38894cdd836d0da7766985e00af…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Mar 3 20:54:15 2024 -0600 shell32: Reimplement pasting from CF_DROP directly. Don't convert the source to PIDLs just to convert it back to paths. --- dlls/shell32/shlview_cmenu.c | 64 ++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c index 6951bbd4216..aa89e14346e 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c @@ -366,7 +366,7 @@ static HRESULT get_data_format(IDataObject *data, UINT cf, STGMEDIUM *medium) return IDataObject_GetData(data, &format, medium); } -static HRESULT do_paste(ContextMenu *menu) +static HRESULT do_paste(ContextMenu *menu, HWND hwnd) { IDataObject *data; HRESULT hr; @@ -404,31 +404,49 @@ static HRESULT do_paste(ContextMenu *menu) } else if (SUCCEEDED(get_data_format(data, CF_HDROP, &medium))) { - WCHAR path[MAX_PATH]; - ITEMIDLIST **pidls; - UINT count; + const DROPFILES *dropfiles = GlobalLock(medium.hGlobal); + IPersistFolder2 *dst_persist; + SHFILEOPSTRUCTW op = {0}; + WCHAR dst_path[MAX_PATH]; + ITEMIDLIST *dst_pidl; + int ret; + + if (FAILED(hr = IShellFolder_QueryInterface(menu->parent, &IID_IPersistFolder2, (void **)&dst_persist))) + { + WARN("Failed to get IPersistFolder2, hr %#lx.\n", hr); + IDataObject_Release(data); + return hr; + } - count = DragQueryFileW(medium.hGlobal, -1, NULL, 0); - pidls = SHAlloc(count * sizeof(ITEMIDLIST*)); - if (pidls) + hr = IPersistFolder2_GetCurFolder(dst_persist, &dst_pidl); + IPersistFolder2_Release(dst_persist); + if (FAILED(hr)) { - for (unsigned int i = 0; i < count; i++) - { - DragQueryFileW(medium.hGlobal, i, path, ARRAY_SIZE(path)); - if (!(pidls[i] = ILCreateFromPathW(path))) - { - hr = E_FAIL; - break; - } - } - if (SUCCEEDED(hr)) - hr = paste_pidls(menu, pidls, count); - _ILFreeaPidl(pidls, count); + ERR("Failed to get dst folder pidl, hr %#lx.\n", hr); + IDataObject_Release(data); + return hr; } - else + + if (!SHGetPathFromIDListW(dst_pidl, dst_path)) { - hr = HRESULT_FROM_WIN32(GetLastError()); + ERR("Failed to get path, hr %#lx.\n", hr); + ILFree(dst_pidl); + IDataObject_Release(data); + return E_FAIL; } + + op.hwnd = hwnd; + op.wFunc = FO_COPY; + op.pFrom = (const WCHAR *)((const char *)dropfiles + dropfiles->pFiles); + op.pTo = dst_path; + op.fFlags = FOF_ALLOWUNDO; + if ((ret = SHFileOperationW(&op))) + { + WARN("Failed to copy, ret %d.\n", ret); + hr = E_FAIL; + } + + GlobalUnlock(medium.hGlobal); ReleaseStgMedium(&medium); } else @@ -1371,7 +1389,7 @@ static HRESULT WINAPI BackgroundMenu_InvokeCommand( } else if (!strcmp(lpcmi->lpVerb, "paste")) { - do_paste(This); + do_paste(This, lpcmi->hwnd); } else { @@ -1391,7 +1409,7 @@ static HRESULT WINAPI BackgroundMenu_InvokeCommand( break; case FCIDM_SHVIEW_INSERT: - do_paste(This); + do_paste(This, lpcmi->hwnd); break; case FCIDM_SHVIEW_PROPERTIES:
1
0
0
0
Zebediah Figura : shell32: Add a get_data_format() helper.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: 48bcf74678a7e6196c735b92db1701506eb90997 URL:
https://gitlab.winehq.org/wine/wine/-/commit/48bcf74678a7e6196c735b92db1701…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Mar 3 18:55:43 2024 -0600 shell32: Add a get_data_format() helper. Make the logic in do_paste() a bit more idiomatic. --- dlls/shell32/shlview_cmenu.c | 66 +++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c index e00306ee2a9..6951bbd4216 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c @@ -358,20 +358,24 @@ static HRESULT paste_pidls(ContextMenu *menu, ITEMIDLIST **pidls, unsigned int c return hr; } +static HRESULT get_data_format(IDataObject *data, UINT cf, STGMEDIUM *medium) +{ + FORMATETC format; + + InitFormatEtc(format, cf, TYMED_HGLOBAL); + return IDataObject_GetData(data, &format, medium); +} + static HRESULT do_paste(ContextMenu *menu) { IDataObject *data; HRESULT hr; STGMEDIUM medium; - FORMATETC formatetc; - HRESULT format_hr; if (FAILED(hr = OleGetClipboard(&data))) return hr; - InitFormatEtc(formatetc, RegisterClipboardFormatW(CFSTR_SHELLIDLISTW), TYMED_HGLOBAL); - format_hr = IDataObject_GetData(data, &formatetc, &medium); - if (SUCCEEDED(format_hr)) + if (SUCCEEDED(get_data_format(data, RegisterClipboardFormatW(CFSTR_SHELLIDLISTW), &medium))) { CIDA *cida = GlobalLock(medium.hGlobal); ITEMIDLIST **pidls; @@ -398,45 +402,39 @@ static HRESULT do_paste(ContextMenu *menu) } ReleaseStgMedium(&medium); } - else + else if (SUCCEEDED(get_data_format(data, CF_HDROP, &medium))) { - InitFormatEtc(formatetc, CF_HDROP, TYMED_HGLOBAL); - format_hr = IDataObject_GetData(data, &formatetc, &medium); - if (SUCCEEDED(format_hr)) - { - WCHAR path[MAX_PATH]; - ITEMIDLIST **pidls; - UINT count; + WCHAR path[MAX_PATH]; + ITEMIDLIST **pidls; + UINT count; - count = DragQueryFileW(medium.hGlobal, -1, NULL, 0); - pidls = SHAlloc(count * sizeof(ITEMIDLIST*)); - if (pidls) + count = DragQueryFileW(medium.hGlobal, -1, NULL, 0); + pidls = SHAlloc(count * sizeof(ITEMIDLIST*)); + if (pidls) + { + for (unsigned int i = 0; i < count; i++) { - for (unsigned int i = 0; i < count; i++) + DragQueryFileW(medium.hGlobal, i, path, ARRAY_SIZE(path)); + if (!(pidls[i] = ILCreateFromPathW(path))) { - DragQueryFileW(medium.hGlobal, i, path, ARRAY_SIZE(path)); - if (!(pidls[i] = ILCreateFromPathW(path))) - { - hr = E_FAIL; - break; - } + hr = E_FAIL; + break; } - if (SUCCEEDED(hr)) - hr = paste_pidls(menu, pidls, count); - _ILFreeaPidl(pidls, count); } - else - { - hr = HRESULT_FROM_WIN32(GetLastError()); - } - ReleaseStgMedium(&medium); + if (SUCCEEDED(hr)) + hr = paste_pidls(menu, pidls, count); + _ILFreeaPidl(pidls, count); + } + else + { + hr = HRESULT_FROM_WIN32(GetLastError()); } + ReleaseStgMedium(&medium); } - - if (FAILED(format_hr)) + else { ERR("Cannot paste any clipboard formats.\n"); - hr = format_hr; + hr = E_FAIL; } IDataObject_Release(data);
1
0
0
0
Zebediah Figura : shell32: Move DoPaste() up.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: 35f5997075a57414c3a5ee2f1e2ab8810904748f URL:
https://gitlab.winehq.org/wine/wine/-/commit/35f5997075a57414c3a5ee2f1e2ab8…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Mar 3 18:11:40 2024 -0600 shell32: Move DoPaste() up. And simplify the control flow a bit while we're at it. --- dlls/shell32/shlview_cmenu.c | 275 +++++++++++++++++++++---------------------- 1 file changed, 134 insertions(+), 141 deletions(-) diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c index eef089f4812..e00306ee2a9 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c @@ -311,6 +311,138 @@ static void DoCopyOrCut(ContextMenu *This, HWND hwnd, BOOL cut) } } +static HRESULT paste_pidls(ContextMenu *menu, ITEMIDLIST **pidls, unsigned int count) +{ + IShellFolder *desktop_folder; + HRESULT hr = S_OK; + + if (FAILED(hr = SHGetDesktopFolder(&desktop_folder))) + return hr; + + for (unsigned int i = 0; SUCCEEDED(hr) && i < count; i++) + { + IShellFolder *folder = NULL; + ITEMIDLIST *pidl_dir; + ITEMIDLIST *pidl_item; + + pidl_dir = ILClone(pidls[i]); + ILRemoveLastID(pidl_dir); + pidl_item = ILFindLastID(pidls[i]); + hr = IShellFolder_BindToObject(desktop_folder, pidl_dir, NULL, &IID_IShellFolder, (void **)&folder); + + if (folder) + { + ISFHelper *psfhlpdst = NULL, *psfhlpsrc = NULL; + + hr = IShellFolder_QueryInterface(menu->parent, &IID_ISFHelper, (void **)&psfhlpdst); + if (SUCCEEDED(hr)) + hr = IShellFolder_QueryInterface(folder, &IID_ISFHelper, (void **)&psfhlpsrc); + + if (psfhlpdst && psfhlpsrc) + { + hr = ISFHelper_CopyItems(psfhlpdst, folder, 1, (LPCITEMIDLIST*)&pidl_item); + /* FIXME handle move + ISFHelper_DeleteItems(psfhlpsrc, 1, &pidl_item); + */ + } + if (psfhlpdst) + ISFHelper_Release(psfhlpdst); + if (psfhlpsrc) + ISFHelper_Release(psfhlpsrc); + IShellFolder_Release(folder); + } + ILFree(pidl_dir); + } + + IShellFolder_Release(desktop_folder); + return hr; +} + +static HRESULT do_paste(ContextMenu *menu) +{ + IDataObject *data; + HRESULT hr; + STGMEDIUM medium; + FORMATETC formatetc; + HRESULT format_hr; + + if (FAILED(hr = OleGetClipboard(&data))) + return hr; + + InitFormatEtc(formatetc, RegisterClipboardFormatW(CFSTR_SHELLIDLISTW), TYMED_HGLOBAL); + format_hr = IDataObject_GetData(data, &formatetc, &medium); + if (SUCCEEDED(format_hr)) + { + CIDA *cida = GlobalLock(medium.hGlobal); + ITEMIDLIST **pidls; + ITEMIDLIST *pidl; + + if (cida) + { + pidls = _ILCopyCidaToaPidl(&pidl, cida); + if (pidls) + { + hr = paste_pidls(menu, pidls, cida->cidl); + _ILFreeaPidl(pidls, cida->cidl); + SHFree(pidl); + } + else + { + hr = HRESULT_FROM_WIN32(GetLastError()); + } + GlobalUnlock(medium.hGlobal); + } + else + { + hr = HRESULT_FROM_WIN32(GetLastError()); + } + ReleaseStgMedium(&medium); + } + else + { + InitFormatEtc(formatetc, CF_HDROP, TYMED_HGLOBAL); + format_hr = IDataObject_GetData(data, &formatetc, &medium); + if (SUCCEEDED(format_hr)) + { + WCHAR path[MAX_PATH]; + ITEMIDLIST **pidls; + UINT count; + + count = DragQueryFileW(medium.hGlobal, -1, NULL, 0); + pidls = SHAlloc(count * sizeof(ITEMIDLIST*)); + if (pidls) + { + for (unsigned int i = 0; i < count; i++) + { + DragQueryFileW(medium.hGlobal, i, path, ARRAY_SIZE(path)); + if (!(pidls[i] = ILCreateFromPathW(path))) + { + hr = E_FAIL; + break; + } + } + if (SUCCEEDED(hr)) + hr = paste_pidls(menu, pidls, count); + _ILFreeaPidl(pidls, count); + } + else + { + hr = HRESULT_FROM_WIN32(GetLastError()); + } + ReleaseStgMedium(&medium); + } + } + + if (FAILED(format_hr)) + { + ERR("Cannot paste any clipboard formats.\n"); + hr = format_hr; + } + + IDataObject_Release(data); + return hr; +} + /************************************************************************** * Properties_AddPropSheetCallback * @@ -1205,145 +1337,6 @@ static void DoNewFolder(ContextMenu *This, IShellView *view) } } -static HRESULT paste_pidls(ContextMenu *This, ITEMIDLIST **pidls, UINT count) -{ - IShellFolder *psfDesktop; - UINT i; - HRESULT hr = S_OK; - - /* bind to the source shellfolder */ - hr = SHGetDesktopFolder(&psfDesktop); - if (FAILED(hr)) - return hr; - - for (i = 0; SUCCEEDED(hr) && i < count; i++) { - ITEMIDLIST *pidl_dir = NULL; - ITEMIDLIST *pidl_item; - IShellFolder *psfFrom = NULL; - - pidl_dir = ILClone(pidls[i]); - ILRemoveLastID(pidl_dir); - pidl_item = ILFindLastID(pidls[i]); - hr = IShellFolder_BindToObject(psfDesktop, pidl_dir, NULL, &IID_IShellFolder, (LPVOID*)&psfFrom); - - if (psfFrom) - { - /* get source and destination shellfolder */ - ISFHelper *psfhlpdst = NULL, *psfhlpsrc = NULL; - hr = IShellFolder_QueryInterface(This->parent, &IID_ISFHelper, (void**)&psfhlpdst); - if (SUCCEEDED(hr)) - hr = IShellFolder_QueryInterface(psfFrom, &IID_ISFHelper, (void**)&psfhlpsrc); - - /* do the copy/move */ - if (psfhlpdst && psfhlpsrc) - { - hr = ISFHelper_CopyItems(psfhlpdst, psfFrom, 1, (LPCITEMIDLIST*)&pidl_item); - /* FIXME handle move - ISFHelper_DeleteItems(psfhlpsrc, 1, &pidl_item); - */ - } - if(psfhlpdst) ISFHelper_Release(psfhlpdst); - if(psfhlpsrc) ISFHelper_Release(psfhlpsrc); - IShellFolder_Release(psfFrom); - } - ILFree(pidl_dir); - } - - IShellFolder_Release(psfDesktop); - return hr; -} - -static HRESULT DoPaste(ContextMenu *This) -{ - IDataObject * pda; - HRESULT hr; - - TRACE("\n"); - - hr = OleGetClipboard(&pda); - if(SUCCEEDED(hr)) - { - STGMEDIUM medium; - FORMATETC formatetc; - HRESULT format_hr; - - TRACE("pda=%p\n", pda); - - /* Set the FORMATETC structure*/ - InitFormatEtc(formatetc, RegisterClipboardFormatW(CFSTR_SHELLIDLISTW), TYMED_HGLOBAL); - - /* Get the pidls from IDataObject */ - format_hr = IDataObject_GetData(pda,&formatetc,&medium); - if(SUCCEEDED(format_hr)) - { - LPITEMIDLIST * apidl; - LPITEMIDLIST pidl; - - LPIDA lpcida = GlobalLock(medium.hGlobal); - TRACE("cida=%p\n", lpcida); - if(lpcida) - { - apidl = _ILCopyCidaToaPidl(&pidl, lpcida); - if (apidl) - { - hr = paste_pidls(This, apidl, lpcida->cidl); - _ILFreeaPidl(apidl, lpcida->cidl); - SHFree(pidl); - } - else - hr = HRESULT_FROM_WIN32(GetLastError()); - GlobalUnlock(medium.hGlobal); - } - else - hr = HRESULT_FROM_WIN32(GetLastError()); - ReleaseStgMedium(&medium); - } - - if(FAILED(format_hr)) - { - InitFormatEtc(formatetc, CF_HDROP, TYMED_HGLOBAL); - format_hr = IDataObject_GetData(pda,&formatetc,&medium); - if(SUCCEEDED(format_hr)) - { - WCHAR path[MAX_PATH]; - UINT i, count; - ITEMIDLIST **pidls; - - TRACE("CF_HDROP=%p\n", medium.hGlobal); - count = DragQueryFileW(medium.hGlobal, -1, NULL, 0); - pidls = SHAlloc(count*sizeof(ITEMIDLIST*)); - if (pidls) - { - for (i = 0; i < count; i++) - { - DragQueryFileW(medium.hGlobal, i, path, ARRAY_SIZE(path)); - if ((pidls[i] = ILCreateFromPathW(path)) == NULL) - { - hr = E_FAIL; - break; - } - } - if (SUCCEEDED(hr)) - hr = paste_pidls(This, pidls, count); - _ILFreeaPidl(pidls, count); - } - else - hr = HRESULT_FROM_WIN32(GetLastError()); - ReleaseStgMedium(&medium); - } - } - - if (FAILED(format_hr)) - { - ERR("there are no supported and retrievable clipboard formats\n"); - hr = format_hr; - } - - IDataObject_Release(pda); - } - return hr; -} - static HRESULT WINAPI BackgroundMenu_InvokeCommand( IContextMenu3 *iface, LPCMINVOKECOMMANDINFO lpcmi) @@ -1380,7 +1373,7 @@ static HRESULT WINAPI BackgroundMenu_InvokeCommand( } else if (!strcmp(lpcmi->lpVerb, "paste")) { - DoPaste(This); + do_paste(This); } else { @@ -1400,7 +1393,7 @@ static HRESULT WINAPI BackgroundMenu_InvokeCommand( break; case FCIDM_SHVIEW_INSERT: - DoPaste(This); + do_paste(This); break; case FCIDM_SHVIEW_PROPERTIES:
1
0
0
0
Zebediah Figura : shell32: Remove useless and commented out code.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: 0bc47920d360550b6d27068af5080947ab686ddc URL:
https://gitlab.winehq.org/wine/wine/-/commit/0bc47920d360550b6d27068af50809…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Mar 3 17:18:03 2024 -0600 shell32: Remove useless and commented out code. --- dlls/shell32/shlview_cmenu.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c index 4df296ec042..eef089f4812 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c @@ -1341,30 +1341,6 @@ static HRESULT DoPaste(ContextMenu *This) IDataObject_Release(pda); } -#if 0 - HGLOBAL hMem; - - OpenClipboard(NULL); - hMem = GetClipboardData(CF_HDROP); - - if(hMem) - { - char * pDropFiles = GlobalLock(hMem); - if(pDropFiles) - { - int len, offset = sizeof(DROPFILESTRUCT); - - while( pDropFiles[offset] != 0) - { - len = strlen(pDropFiles + offset); - TRACE("%s\n", pDropFiles + offset); - offset += len+1; - } - } - GlobalUnlock(hMem); - } - CloseClipboard(); -#endif return hr; }
1
0
0
0
Zebediah Figura : shell32/tests: Add tests for context menu copy/paste.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: 08219c02b339f277163a1cd619447c0491d0ab53 URL:
https://gitlab.winehq.org/wine/wine/-/commit/08219c02b339f277163a1cd619447c…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Mar 3 17:03:59 2024 -0600 shell32/tests: Add tests for context menu copy/paste. --- dlls/shell32/tests/shlfolder.c | 299 +++++++++++++++++++++++++++++++++++++++++ include/shlobj.h | 1 + 2 files changed, 300 insertions(+)
1
0
0
0
Zebediah Figura : msi: Create the custom action server as an elevated process.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: 366398cc53c76028c8dfe8d8a16c78a6a10ce962 URL:
https://gitlab.winehq.org/wine/wine/-/commit/366398cc53c76028c8dfe8d8a16c78…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun May 16 20:49:05 2021 -0500 msi: Create the custom action server as an elevated process. Dragon Naturally Speaking 12.5 manually validates that the custom action server is elevated. One might imagine that the right approach here is to add a manifest to msiexec; however, msiexec does not always trigger a UAC prompt on Windows. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51143
--- dlls/msi/custom.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index d1e064f5b65..12a7c3c3676 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -573,12 +573,28 @@ UINT CDECL __wine_msi_call_dll_function(DWORD client_pid, const GUID *guid) return r; } +static HANDLE get_admin_token(void) +{ + TOKEN_ELEVATION_TYPE type; + TOKEN_LINKED_TOKEN linked; + DWORD size; + + if (!GetTokenInformation(GetCurrentThreadEffectiveToken(), TokenElevationType, &type, sizeof(type), &size) + || type == TokenElevationTypeFull) + return NULL; + + if (!GetTokenInformation(GetCurrentThreadEffectiveToken(), TokenLinkedToken, &linked, sizeof(linked), &size)) + return NULL; + return linked.LinkedToken; +} + static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch) { WCHAR path[MAX_PATH], cmdline[MAX_PATH + 23]; PROCESS_INFORMATION pi = {0}; STARTUPINFOW si = {0}; WCHAR buffer[24]; + HANDLE token; void *cookie; HANDLE pipe; @@ -600,14 +616,18 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch) lstrcatW(path, L"\\msiexec.exe"); swprintf(cmdline, ARRAY_SIZE(cmdline), L"%s -Embedding %d", path, GetCurrentProcessId()); + token = get_admin_token(); + if (is_wow64 && arch == SCS_64BIT_BINARY) { Wow64DisableWow64FsRedirection(&cookie); - CreateProcessW(path, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + CreateProcessAsUserW(token, path, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); Wow64RevertWow64FsRedirection(cookie); } else - CreateProcessW(path, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + CreateProcessAsUserW(token, path, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + + if (token) CloseHandle(token); CloseHandle(pi.hThread);
1
0
0
0
Zebediah Figura : wine.inf: Set the EnableLUA value to 1.
by Alexandre Julliard
04 Mar '24
04 Mar '24
Module: wine Branch: master Commit: b381f9d095b2a2377c8b61f734b576ac6083a742 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b381f9d095b2a2377c8b61f734b576…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Feb 26 22:41:35 2021 -0600 wine.inf: Set the EnableLUA value to 1. This signifies that UAC is active. Foobar2000 checks this value, and won't even try to elevate itself otherwise. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50727
--- loader/wine.inf.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader/wine.inf.in b/loader/wine.inf.in index b1c0aad6821..4aed3e73e06 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -378,7 +378,7 @@ HKLM,%CurrentVersion%\Explorer\DriveIcons,,16 HKLM,%CurrentVersion%\Explorer\KindMap,,16 HKLM,%CurrentVersion%\Group Policy,,16 HKLM,%CurrentVersion%\Installer,"InstallerLocation",,"%11%" -HKLM,%CurrentVersion%\Policies\System,"EnableLUA",0x10003,0 +HKLM,%CurrentVersion%\Policies\System,"EnableLUA",0x10001,1 HKLM,%CurrentVersion%\PreviewHandlers,,16 HKLM,%CurrentVersion%\Run,,16 HKLM,%CurrentVersion%\Setup,"BootDir",,"%30%"
1
0
0
0
← Newer
1
...
69
70
71
72
73
74
75
...
78
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Results per page:
10
25
50
100
200