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
May 2020
----- 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
743 discussions
Start a n
N
ew thread
Zebediah Figura : explorer: Implement IShellWindows::FindWindowSW() for non-desktop windows.
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: 7b56edf9a46c14eb5c6c617826509cc0a4736389 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7b56edf9a46c14eb5c6c6178…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun May 17 23:29:43 2020 -0500 explorer: Implement IShellWindows::FindWindowSW() for non-desktop windows. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shelldispatch.c | 8 +++---- programs/explorer/desktop.c | 45 ++++++++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index 207733afe7..5495787561 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -1064,7 +1064,7 @@ static void test_ShellWindows(void) VariantInit(&v2); hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); ok(!ret, "Got window %#x.\n", ret); ok(!disp, "Got IDispatch %p.\n", &disp); @@ -1075,15 +1075,15 @@ static void test_ShellWindows(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(ret == (LONG)(LONG_PTR)hwnd, "Expected %p, got %#x.\n", hwnd, ret); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(ret == (LONG)(LONG_PTR)hwnd, "Expected %p, got %#x.\n", hwnd, ret); ok(!disp, "Got IDispatch %p.\n", &disp); hr = IShellWindows_Revoke(shellwindows, cookie); ok(hr == S_OK, "got 0x%08x\n", hr); hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); ok(!ret, "Got window %#x.\n", ret); ok(!disp, "Got IDispatch %p.\n", &disp); diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 264a8cb810..8a8e5bc071 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -1284,26 +1284,49 @@ static HRESULT WINAPI shellwindows_OnActivated(IShellWindows *iface, LONG cookie return E_NOTIMPL; } -static HRESULT WINAPI shellwindows_FindWindowSW(IShellWindows *iface, VARIANT *loc, - VARIANT *root, int class, LONG *hwnd, int options, IDispatch **disp) +static HRESULT WINAPI shellwindows_FindWindowSW(IShellWindows *iface, VARIANT *location, + VARIANT *root, int class, LONG *hwnd, int options, IDispatch **disp) { - TRACE("%s %s 0x%x %p 0x%x %p\n", debugstr_variant(loc), debugstr_variant(root), - class, hwnd, options, disp); + struct shellwindows *sw = impl_from_IShellWindows(iface); + unsigned int i; + + TRACE("iface %p, location %p, root %p, class %#x, hwnd %p, options %#x, disp %p.\n", + iface, location, root, class, hwnd, options, disp); - if (class != SWC_DESKTOP) + if (class == SWC_DESKTOP) + { + *hwnd = (LONG)(LONG_PTR)GetDesktopWindow(); + if (options & SWFO_NEEDDISPATCH) + { + *disp = (IDispatch *)&desktopshellbrowserwindow.IWebBrowser2_iface; + IDispatch_AddRef(*disp); + } + return S_OK; + } + + if (options) + FIXME("Ignoring options %#x.\n", options); + + if (V_VT(location) != (VT_ARRAY | VT_UI1)) { - WARN("only SWC_DESKTOP class supported.\n"); + FIXME("Unexpected variant type %s.\n", debugstr_vt(V_VT(location))); return E_NOTIMPL; } - *hwnd = HandleToLong(GetDesktopWindow()); - if (options & SWFO_NEEDDISPATCH) + EnterCriticalSection(&sw->cs); + + for (i = 0; i < sw->count; ++i) { - *disp = (IDispatch*)&desktopshellbrowserwindow.IWebBrowser2_iface; - IDispatch_AddRef(*disp); + if (sw->windows[i].class == class && ILIsEqual(V_ARRAY(location)->pvData, sw->windows[i].pidl)) + { + *hwnd = sw->windows[i].hwnd; + LeaveCriticalSection(&sw->cs); + return S_OK; + } } - return S_OK; + LeaveCriticalSection(&sw->cs); + return S_FALSE; } static HRESULT WINAPI shellwindows_OnCreated(IShellWindows *iface, LONG cookie, IUnknown *punk)
1
0
0
0
Zebediah Figura : explorer: Implement IShellWindows::OnNavigate().
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: 54e1559a253315f4243cbe405c82647dde3ac36d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=54e1559a253315f4243cbe40…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun May 17 23:29:42 2020 -0500 explorer: Implement IShellWindows::OnNavigate(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shelldispatch.c | 5 ++++- programs/explorer/desktop.c | 37 ++++++++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index eea505ff61..207733afe7 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -1068,8 +1068,11 @@ static void test_ShellWindows(void) ok(!ret, "Got window %#x.\n", ret); ok(!disp, "Got IDispatch %p.\n", &disp); + hr = IShellWindows_OnNavigate(shellwindows, 0, &v); + ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + hr = IShellWindows_OnNavigate(shellwindows, cookie, &v); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 53dcd21817..264a8cb810 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -151,6 +151,7 @@ struct window { LONG cookie, hwnd; int class; + ITEMIDLIST *pidl; }; struct shellwindows @@ -1241,10 +1242,40 @@ static HRESULT WINAPI shellwindows_Revoke(IShellWindows *iface, LONG cookie) return S_FALSE; } -static HRESULT WINAPI shellwindows_OnNavigate(IShellWindows *iface, LONG cookie, VARIANT *loc) +static HRESULT WINAPI shellwindows_OnNavigate(IShellWindows *iface, LONG cookie, VARIANT *location) { - FIXME("0x%x %s\n", cookie, debugstr_variant(loc)); - return E_NOTIMPL; + struct shellwindows *sw = impl_from_IShellWindows(iface); + unsigned int i; + + TRACE("iface %p, cookie %u, location %s.\n", iface, cookie, debugstr_variant(location)); + + if (V_VT(location) != (VT_ARRAY | VT_UI1)) + { + FIXME("Unexpected variant type %s.\n", debugstr_vt(V_VT(location))); + return E_NOTIMPL; + } + + EnterCriticalSection(&sw->cs); + + for (i = 0; i < sw->count; ++i) + { + if (sw->windows[i].cookie == cookie) + { + size_t len = V_ARRAY(location)->rgsabound[0].cElements; + if (!(sw->windows[i].pidl = realloc(sw->windows[i].pidl, len))) + { + LeaveCriticalSection(&sw->cs); + return E_OUTOFMEMORY; + } + memcpy(sw->windows[i].pidl, V_ARRAY(location)->pvData, len); + + LeaveCriticalSection(&sw->cs); + return S_OK; + } + } + + LeaveCriticalSection(&sw->cs); + return E_INVALIDARG; } static HRESULT WINAPI shellwindows_OnActivated(IShellWindows *iface, LONG cookie, VARIANT_BOOL active)
1
0
0
0
Zebediah Figura : explorer: Implement IShellWindows::Register() and IShellWindows::Revoke().
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: aeff6f189fd2529788456c61a0b2baedf6ee45d8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aeff6f189fd2529788456c61…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun May 17 23:29:41 2020 -0500 explorer: Implement IShellWindows::Register() and IShellWindows::Revoke(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shelldispatch.c | 15 +----- programs/explorer/desktop.c | 93 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 90 insertions(+), 18 deletions(-) diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index c1e3fbcdaf..eea505ff61 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -1035,15 +1035,12 @@ static void test_ShellWindows(void) ok(hr == HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER), "got 0x%08x\n", hr); hr = IShellWindows_Register(shellwindows, NULL, 0, SWC_EXPLORER, &cookie); -todo_wine ok(hr == E_POINTER, "got 0x%08x\n", hr); hr = IShellWindows_Register(shellwindows, (IDispatch*)shellwindows, 0, SWC_EXPLORER, &cookie); -todo_wine ok(hr == E_POINTER, "got 0x%08x\n", hr); hr = IShellWindows_Register(shellwindows, (IDispatch*)shellwindows, 0, SWC_EXPLORER, &cookie); -todo_wine ok(hr == E_POINTER, "got 0x%08x\n", hr); hwnd = CreateWindowExA(0, "button", "test", BS_CHECKBOX | WS_VISIBLE | WS_POPUP, @@ -1052,16 +1049,13 @@ todo_wine cookie = 0; hr = IShellWindows_Register(shellwindows, NULL, HandleToLong(hwnd), SWC_EXPLORER, &cookie); -todo_wine { ok(hr == S_OK, "got 0x%08x\n", hr); ok(cookie != 0, "got %d\n", cookie); -} + cookie2 = 0; hr = IShellWindows_Register(shellwindows, NULL, HandleToLong(hwnd), SWC_EXPLORER, &cookie2); -todo_wine { ok(hr == S_OK, "got 0x%08x\n", hr); ok(cookie2 != 0 && cookie2 != cookie, "got %d\n", cookie2); -} pidl = ILCreateFromPathA("C:\\"); V_VT(&v) = VT_ARRAY | VT_UI1; @@ -1083,7 +1077,6 @@ todo_wine { ok(!disp, "Got IDispatch %p.\n", &disp); hr = IShellWindows_Revoke(shellwindows, cookie); -todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); @@ -1092,20 +1085,17 @@ todo_wine ok(!disp, "Got IDispatch %p.\n", &disp); hr = IShellWindows_Revoke(shellwindows, cookie2); -todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); hr = IShellWindows_Revoke(shellwindows, 0); -todo_wine ok(hr == S_FALSE, "got 0x%08x\n", hr); /* we can register ourselves as desktop, but FindWindowSW still returns real desktop window */ cookie = 0; hr = IShellWindows_Register(shellwindows, NULL, HandleToLong(hwnd), SWC_DESKTOP, &cookie); -todo_wine { ok(hr == S_OK, "got 0x%08x\n", hr); ok(cookie != 0, "got %d\n", cookie); -} + disp = (void*)0xdeadbeef; ret = 0xdead; VariantInit(&v); @@ -1235,7 +1225,6 @@ todo_wine ok(ret == 0, "got %d\n", ret); hr = IShellWindows_Revoke(shellwindows, cookie); -todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); DestroyWindow(hwnd); IShellWindows_Release(shellwindows); diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index bac17dcc5f..53dcd21817 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -118,9 +118,48 @@ static HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) return S_OK; } +static BOOL array_reserve(void **elements, unsigned int *capacity, unsigned int count, unsigned int size) +{ + unsigned int new_capacity, max_capacity; + void *new_elements; + + if (count <= *capacity) + return TRUE; + + max_capacity = ~(SIZE_T)0 / size; + if (count > max_capacity) + return FALSE; + + new_capacity = max(4, *capacity); + while (new_capacity < count && new_capacity <= max_capacity / 2) + new_capacity *= 2; + if (new_capacity < count) + new_capacity = max_capacity; + + if (!(new_elements = realloc(*elements, new_capacity * size))) + return FALSE; + + *elements = new_elements; + *capacity = new_capacity; + + return TRUE; +} + +static LONG cookie_counter; + +struct window +{ + LONG cookie, hwnd; + int class; +}; + struct shellwindows { IShellWindows IShellWindows_iface; + CRITICAL_SECTION cs; + + unsigned int count, max; + struct window *windows; }; /* This is not limited to desktop itself, every file browser window that @@ -1140,10 +1179,34 @@ static HRESULT WINAPI shellwindows__NewEnum(IShellWindows *iface, IUnknown **ppu } static HRESULT WINAPI shellwindows_Register(IShellWindows *iface, - IDispatch *disp, LONG hWnd, int class, LONG *cookie) + IDispatch *disp, LONG hwnd, int class, LONG *cookie) { - FIXME("%p 0x%x 0x%x %p\n", disp, hWnd, class, cookie); - return E_NOTIMPL; + struct shellwindows *sw = impl_from_IShellWindows(iface); + struct window *window; + + TRACE("iface %p, disp %p, hwnd %#x, class %u, cookie %p.\n", iface, disp, hwnd, class, cookie); + + if (!hwnd) + return E_POINTER; + + if (disp) + FIXME("Ignoring IDispatch %p.\n", disp); + + EnterCriticalSection(&sw->cs); + + if (!array_reserve((void **)&sw->windows, &sw->max, sw->count + 1, sizeof(*sw->windows))) + { + LeaveCriticalSection(&sw->cs); + return E_OUTOFMEMORY; + } + + window = &sw->windows[sw->count++]; + window->hwnd = hwnd; + window->class = class; + *cookie = window->cookie = ++cookie_counter; + + LeaveCriticalSection(&sw->cs); + return S_OK; } static HRESULT WINAPI shellwindows_RegisterPending(IShellWindows *iface, @@ -1156,8 +1219,26 @@ static HRESULT WINAPI shellwindows_RegisterPending(IShellWindows *iface, static HRESULT WINAPI shellwindows_Revoke(IShellWindows *iface, LONG cookie) { - FIXME("0x%x\n", cookie); - return E_NOTIMPL; + struct shellwindows *sw = impl_from_IShellWindows(iface); + unsigned int i; + + TRACE("iface %p, cookie %u.\n", iface, cookie); + + EnterCriticalSection(&sw->cs); + + for (i = 0; i < sw->count; ++i) + { + if (sw->windows[i].cookie == cookie) + { + --sw->count; + memmove(&sw->windows[i], &sw->windows[i + 1], (sw->count - i) * sizeof(*sw->windows)); + LeaveCriticalSection(&sw->cs); + return S_OK; + } + } + + LeaveCriticalSection(&sw->cs); + return S_FALSE; } static HRESULT WINAPI shellwindows_OnNavigate(IShellWindows *iface, LONG cookie, VARIANT *loc) @@ -2157,6 +2238,8 @@ static void shellwindows_init(void) CoInitialize(NULL); shellwindows.IShellWindows_iface.lpVtbl = &shellwindowsvtbl; + InitializeCriticalSection(&shellwindows.cs); + shellwindows.cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": shellwindows.cs"); hr = CoRegisterClassObject(&CLSID_ShellWindows, (IUnknown*)&shellwindows_classfactory.IClassFactory_iface,
1
0
0
0
Zebediah Figura : shell32/tests: Add more tests for IShellWindows.
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: 58e5525adeb901b6f536a1b857f75b977a9d2844 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=58e5525adeb901b6f536a1b8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun May 17 23:29:40 2020 -0500 shell32/tests: Add more tests for IShellWindows. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shelldispatch.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index e9948ae630..c1e3fbcdaf 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -1018,6 +1018,7 @@ static void test_ShellWindows(void) { IShellWindows *shellwindows; LONG cookie, cookie2, ret; + ITEMIDLIST *pidl; IDispatch *disp; VARIANT v, v2; HRESULT hr; @@ -1061,9 +1062,35 @@ todo_wine { ok(hr == S_OK, "got 0x%08x\n", hr); ok(cookie2 != 0 && cookie2 != cookie, "got %d\n", cookie2); } + + pidl = ILCreateFromPathA("C:\\"); + V_VT(&v) = VT_ARRAY | VT_UI1; + V_ARRAY(&v) = SafeArrayCreateVector(VT_UI1, 0, ILGetSize(pidl)); + memcpy(V_ARRAY(&v)->pvData, pidl, ILGetSize(pidl)); + + VariantInit(&v2); + hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); + todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(!ret, "Got window %#x.\n", ret); + ok(!disp, "Got IDispatch %p.\n", &disp); + + hr = IShellWindows_OnNavigate(shellwindows, cookie, &v); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); + todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(ret == (LONG)(LONG_PTR)hwnd, "Expected %p, got %#x.\n", hwnd, ret); + ok(!disp, "Got IDispatch %p.\n", &disp); + hr = IShellWindows_Revoke(shellwindows, cookie); todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IShellWindows_FindWindowSW(shellwindows, &v, &v2, SWC_EXPLORER, &ret, 0, &disp); + todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(!ret, "Got window %#x.\n", ret); + ok(!disp, "Got IDispatch %p.\n", &disp); + hr = IShellWindows_Revoke(shellwindows, cookie2); todo_wine ok(hr == S_OK, "got 0x%08x\n", hr);
1
0
0
0
Zhiyi Zhang : shlwapi/tests: Test NULL UrlCanonicalizeA/W() parameters.
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: c169263b0bb6c2ebea84ac2b3bac122948a81c71 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c169263b0bb6c2ebea84ac2b…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon May 18 09:52:13 2020 +0800 shlwapi/tests: Test NULL UrlCanonicalizeA/W() parameters. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shlwapi/tests/url.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c index d30737f60a..2e1df63201 100644 --- a/dlls/shlwapi/tests/url.c +++ b/dlls/shlwapi/tests/url.c @@ -1052,6 +1052,22 @@ static void test_UrlCanonicalizeA(void) urllen = lstrlenA(winehqA); + /* Parameter checks */ + dwSize = ARRAY_SIZE(szReturnUrl); + hr = pUrlCanonicalizeA(NULL, szReturnUrl, &dwSize, URL_UNESCAPE); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + + dwSize = ARRAY_SIZE(szReturnUrl); + hr = pUrlCanonicalizeA(winehqA, NULL, &dwSize, URL_UNESCAPE); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + + hr = pUrlCanonicalizeA(winehqA, szReturnUrl, NULL, URL_UNESCAPE); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + + dwSize = 0; + hr = pUrlCanonicalizeA(winehqA, szReturnUrl, &dwSize, URL_UNESCAPE); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + /* buffer has no space for the result */ dwSize=urllen-1; memset(szReturnUrl, '#', urllen+4); @@ -1137,6 +1153,22 @@ static void test_UrlCanonicalizeW(void) } urllen = lstrlenW(winehqW); + /* Parameter checks */ + dwSize = ARRAY_SIZE(szReturnUrl); + hr = pUrlCanonicalizeW(NULL, szReturnUrl, &dwSize, URL_UNESCAPE); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + + dwSize = ARRAY_SIZE(szReturnUrl); + hr = pUrlCanonicalizeW(winehqW, NULL, &dwSize, URL_UNESCAPE); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + + hr = pUrlCanonicalizeW(winehqW, szReturnUrl, NULL, URL_UNESCAPE); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + + dwSize = 0; + hr = pUrlCanonicalizeW(winehqW, szReturnUrl, &dwSize, URL_UNESCAPE); + ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); + /* buffer has no space for the result */ dwSize = (urllen-1); memset(szReturnUrl, '#', (urllen+4) * sizeof(WCHAR));
1
0
0
0
Zhiyi Zhang : kernelbase: Check NULL canonicalized_len parameter in UrlCanonicalizeW().
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: 3cbd9cda195be6afc4290202b6676417812e536b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3cbd9cda195be6afc4290202…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon May 18 09:52:03 2020 +0800 kernelbase: Check NULL canonicalized_len parameter in UrlCanonicalizeW(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49175
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c index 29887a2353..d7e2f0a234 100644 --- a/dlls/kernelbase/path.c +++ b/dlls/kernelbase/path.c @@ -3521,7 +3521,7 @@ HRESULT WINAPI UrlCanonicalizeW(const WCHAR *src_url, WCHAR *canonicalized, DWOR TRACE("%s, %p, %p, %#x\n", wine_dbgstr_w(src_url), canonicalized, canonicalized_len, flags); - if (!src_url || !canonicalized || !canonicalized || !*canonicalized_len) + if (!src_url || !canonicalized || !canonicalized_len || !*canonicalized_len) return E_INVALIDARG; if (!*src_url)
1
0
0
0
Vincent Povirk : gdiplus: Improve GdipSetMetafileDownLevelRasterizationLimit.
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: e41058243a7ba416be4898335d41ba13f07be2fc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e41058243a7ba416be489833…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Sun May 17 20:16:25 2020 -0500 gdiplus: Improve GdipSetMetafileDownLevelRasterizationLimit. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/metafile.c | 8 +++++++- dlls/gdiplus/tests/metafile.c | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 3fdbc69fdc..f0dacab498 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -4028,9 +4028,15 @@ GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *metaf { TRACE("(%p,%u)\n", metafile, limitDpi); - if (!metafile) + if (limitDpi == 0) + limitDpi = 96; + + if (!metafile || limitDpi < 10) return InvalidParameter; + if (!metafile->record_dc) + return WrongState; + metafile->limit_dpi = limitDpi; return Ok; diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index b9dc33fce3..3ffdb7b0e9 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -428,6 +428,23 @@ static void test_empty(void) expect(Ok, stat); ok(limit_dpi == 255, "limit_dpi was %d\n", limit_dpi); + stat = GdipSetMetafileDownLevelRasterizationLimit(metafile, 0); + expect(Ok, stat); + + limit_dpi = 0xdeadbeef; + stat = GdipGetMetafileDownLevelRasterizationLimit(metafile, &limit_dpi); + expect(Ok, stat); + ok(limit_dpi == 96, "limit_dpi was %d\n", limit_dpi); + + stat = GdipSetMetafileDownLevelRasterizationLimit(metafile, 1); + expect(InvalidParameter, stat); + + stat = GdipSetMetafileDownLevelRasterizationLimit(metafile, 9); + expect(InvalidParameter, stat); + + stat = GdipSetMetafileDownLevelRasterizationLimit(metafile, 10); + expect(Ok, stat); + stat = GdipGetHemfFromMetafile(metafile, &hemf); expect(InvalidParameter, stat); @@ -445,6 +462,9 @@ static void test_empty(void) expect(WrongState, stat); expect(0xdeadbeef, limit_dpi); + stat = GdipSetMetafileDownLevelRasterizationLimit(metafile, 200); + expect(WrongState, stat); + check_metafile(metafile, empty_records, "empty metafile", dst_points, &frame, UnitPixel); sync_metafile(&metafile, "empty.emf");
1
0
0
0
Vincent Povirk : gdiplus: Implement GdipGetMetafileDownLevelRasterizationLimit.
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: 6c06196497e3eed17c642be40ca716b86bf1e8e5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6c06196497e3eed17c642be4…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Sun May 17 20:16:24 2020 -0500 gdiplus: Implement GdipGetMetafileDownLevelRasterizationLimit. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/gdiplus_private.h | 1 + dlls/gdiplus/metafile.c | 22 ++++++++++++++++++++++ dlls/gdiplus/tests/metafile.c | 25 +++++++++++++++++++++++++ include/gdiplusflat.h | 1 + 5 files changed, 50 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 43dc0a82d2..a722ab7b23 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -298,7 +298,7 @@ 298 stdcall GdipGetLogFontA(ptr ptr ptr) 299 stdcall GdipGetLogFontW(ptr ptr ptr) 300 stdcall GdipGetMatrixElements(ptr ptr) -301 stub GdipGetMetafileDownLevelRasterizationLimit +301 stdcall GdipGetMetafileDownLevelRasterizationLimit(ptr ptr) 302 stdcall GdipGetMetafileHeaderFromEmf(ptr ptr) 303 stdcall GdipGetMetafileHeaderFromFile(wstr ptr) 304 stdcall GdipGetMetafileHeaderFromMetafile(ptr ptr) diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 39caf1a91e..9e90a5d28c 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -407,6 +407,7 @@ struct GpMetafile{ BOOL auto_frame; /* If true, determine the frame automatically */ GpPointF auto_frame_min, auto_frame_max; DWORD next_object_id; + UINT limit_dpi; /* playback */ GpGraphics *playback_graphics; diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 2cb1c5f284..3fdbc69fdc 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -810,6 +810,7 @@ GpStatus WINGDIPAPI GdipRecordMetafile(HDC hdc, EmfType type, GDIPCONST GpRectF (*metafile)->comment_data = NULL; (*metafile)->comment_data_size = 0; (*metafile)->comment_data_length = 0; + (*metafile)->limit_dpi = 96; (*metafile)->hemf = NULL; list_init(&(*metafile)->containers); @@ -4006,11 +4007,32 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream *stream, return Ok; } +GpStatus WINGDIPAPI GdipGetMetafileDownLevelRasterizationLimit(GDIPCONST GpMetafile *metafile, + UINT *limitDpi) +{ + TRACE("(%p,%p)\n", metafile, limitDpi); + + if (!metafile || !limitDpi) + return InvalidParameter; + + if (!metafile->record_dc) + return WrongState; + + *limitDpi = metafile->limit_dpi; + + return Ok; +} + GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *metafile, UINT limitDpi) { TRACE("(%p,%u)\n", metafile, limitDpi); + if (!metafile) + return InvalidParameter; + + metafile->limit_dpi = limitDpi; + return Ok; } diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index 49adbf71e3..b9dc33fce3 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -379,6 +379,7 @@ static void test_empty(void) static const GpRectF frame = {0.0, 0.0, 100.0, 100.0}; static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}}; static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0}; + UINT limit_dpi; hdc = CreateCompatibleDC(0); @@ -408,6 +409,25 @@ static void test_empty(void) if (stat != Ok) return; + stat = GdipGetMetafileDownLevelRasterizationLimit(metafile, NULL); + expect(InvalidParameter, stat); + + stat = GdipGetMetafileDownLevelRasterizationLimit(NULL, &limit_dpi); + expect(InvalidParameter, stat); + + limit_dpi = 0xdeadbeef; + stat = GdipGetMetafileDownLevelRasterizationLimit(metafile, &limit_dpi); + expect(Ok, stat); + ok(limit_dpi == 96, "limit_dpi was %d\n", limit_dpi); + + stat = GdipSetMetafileDownLevelRasterizationLimit(metafile, 255); + expect(Ok, stat); + + limit_dpi = 0xdeadbeef; + stat = GdipGetMetafileDownLevelRasterizationLimit(metafile, &limit_dpi); + expect(Ok, stat); + ok(limit_dpi == 255, "limit_dpi was %d\n", limit_dpi); + stat = GdipGetHemfFromMetafile(metafile, &hemf); expect(InvalidParameter, stat); @@ -420,6 +440,11 @@ static void test_empty(void) stat = GdipDeleteGraphics(graphics); expect(Ok, stat); + limit_dpi = 0xdeadbeef; + stat = GdipGetMetafileDownLevelRasterizationLimit(metafile, &limit_dpi); + expect(WrongState, stat); + expect(0xdeadbeef, limit_dpi); + check_metafile(metafile, empty_records, "empty metafile", dst_points, &frame, UnitPixel); sync_metafile(&metafile, "empty.emf"); diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index ed0f498483..b7da5427d4 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -545,6 +545,7 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmfFile(GDIPCONST WCHAR*, GDIPCONST Wm GpMetafile**); GpStatus WINGDIPAPI GdipCreateMetafileFromFile(GDIPCONST WCHAR*,GpMetafile**); GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream*,GpMetafile**); +GpStatus WINGDIPAPI GdipGetMetafileDownLevelRasterizationLimit(GDIPCONST GpMetafile*,UINT*); GpStatus WINGDIPAPI GdipGetHemfFromMetafile(GpMetafile*,HENHMETAFILE*); GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile*,EmfPlusRecordType,UINT,UINT,GDIPCONST BYTE*); GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile*,UINT);
1
0
0
0
Zebediah Figura : quartz/filtergraph: Get rid of tracing for outer IUnknown methods.
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: 11af7a02bf4cd963ed5bf9f5b639e020a7caba90 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=11af7a02bf4cd963ed5bf9f5…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun May 17 14:44:30 2020 -0500 quartz/filtergraph: Get rid of tracing for outer IUnknown methods. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/filtergraph.c | 207 ++++++++++++++-------------------------------- 1 file changed, 63 insertions(+), 144 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=11af7a02bf4cd963ed5b…
1
0
0
0
Zebediah Figura : quartz/tests: Relax an intermittently failing test.
by Alexandre Julliard
18 May '20
18 May '20
Module: wine Branch: master Commit: 06674113f962c12ed0a52abe8d90b57d295cf972 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=06674113f962c12ed0a52abe…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sun May 17 14:38:15 2020 -0500 quartz/tests: Relax an intermittently failing test. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/systemclock.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dlls/quartz/tests/systemclock.c b/dlls/quartz/tests/systemclock.c index 08faa1ef73..b85a801f0e 100644 --- a/dlls/quartz/tests/systemclock.c +++ b/dlls/quartz/tests/systemclock.c @@ -259,18 +259,15 @@ static void test_advise(void) hr = IReferenceClock_AdvisePeriodic(clock, -500 * 10000, 1000 * 10000, (HSEMAPHORE)semaphore, &cookie); ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); - hr = IReferenceClock_AdvisePeriodic(clock, current, 500 * 10000, (HSEMAPHORE)semaphore, &cookie); + hr = IReferenceClock_AdvisePeriodic(clock, current, 100 * 10000, (HSEMAPHORE)semaphore, &cookie); ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!WaitForSingleObject(semaphore, 20), "Semaphore should be signaled.\n"); + ok(!WaitForSingleObject(semaphore, 50), "Semaphore should be signaled.\n"); for (i = 0; i < 5; ++i) - { - ok(WaitForSingleObject(semaphore, 460) == WAIT_TIMEOUT, "Semaphore should not be signaled.\n"); - ok(!WaitForSingleObject(semaphore, 60), "Semaphore should be signaled.\n"); - } + ok(!WaitForSingleObject(semaphore, 500), "Semaphore should be signaled.\n"); hr = IReferenceClock_Unadvise(clock, cookie); ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(WaitForSingleObject(semaphore, 520) == WAIT_TIMEOUT, "Semaphore should not be signaled.\n"); + ok(WaitForSingleObject(semaphore, 200) == WAIT_TIMEOUT, "Semaphore should not be signaled.\n"); CloseHandle(event); CloseHandle(semaphore);
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
75
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
Results per page:
10
25
50
100
200