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 2018
----- 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
2 participants
785 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Fix buffer size checks in swscanf_s.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 24c691956459fcbe5007fc00a99c598718f94d5d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=24c691956459fcbe5007fc00…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Fri Dec 1 12:29:08 2017 +0100 msvcrt: Fix buffer size checks in swscanf_s. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 7aa67f1e5f4e0ecafe9fbeec982326c4d78bf883) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/msvcrt/scanf.h | 6 +++--- dlls/msvcrt/tests/scanf.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/scanf.h b/dlls/msvcrt/scanf.h index 2920b9b..cbbcae4 100644 --- a/dlls/msvcrt/scanf.h +++ b/dlls/msvcrt/scanf.h @@ -540,7 +540,7 @@ _FUNCTION_ { char *str = suppress ? NULL : va_arg(ap, char*); char *pstr = str; #ifdef SECURE - unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned)/sizeof(char); + unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned); #else unsigned size = UINT_MAX; #endif @@ -566,7 +566,7 @@ _FUNCTION_ { MSVCRT_wchar_t *str = suppress ? NULL : va_arg(ap, MSVCRT_wchar_t*); MSVCRT_wchar_t *pstr = str; #ifdef SECURE - unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned)/sizeof(MSVCRT_wchar_t); + unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned); #else unsigned size = UINT_MAX; #endif @@ -615,7 +615,7 @@ _FUNCTION_ { ULONG *Mask; int invert = 0; /* Set if we are NOT to find the chars */ #ifdef SECURE - unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned)/sizeof(_CHAR_); + unsigned size = suppress ? UINT_MAX : va_arg(ap, unsigned); #else unsigned size = UINT_MAX; #endif diff --git a/dlls/msvcrt/tests/scanf.c b/dlls/msvcrt/tests/scanf.c index 1d1f28e..e3e0efd 100644 --- a/dlls/msvcrt/tests/scanf.c +++ b/dlls/msvcrt/tests/scanf.c @@ -324,9 +324,43 @@ static void test_swscanf( void ) ok(c == 'b', "c = %x\n", c); } +static void test_swscanf_s(void) +{ + static const wchar_t fmt1[] = {'%','c',0}; + static const wchar_t fmt2[] = {'%','[','a','-','z',']',0}; + + int (WINAPIV *pswscanf_s)(const wchar_t*,const wchar_t*,...); + HMODULE hmod = GetModuleHandleA("msvcrt.dll"); + wchar_t buf[2], out[2]; + int ret; + + pswscanf_s = (void*)GetProcAddress(hmod, "swscanf_s"); + if(!pswscanf_s) { + win_skip("swscanf_s not available\n"); + return; + } + + buf[0] = 'a'; + buf[1] = '1'; + out[1] = 'b'; + ret = pswscanf_s(buf, fmt1, out, 1); + ok(ret == 1, "swscanf_s returned %d\n", ret); + ok(out[0] == 'a', "out[0] = %x\n", out[0]); + ok(out[1] == 'b', "out[1] = %x\n", out[1]); + + ret = pswscanf_s(buf, fmt2, out, 1); + ok(!ret, "swscanf_s returned %d\n", ret); + + ret = pswscanf_s(buf, fmt2, out, 2); + ok(ret == 1, "swscanf_s returned %d\n", ret); + ok(out[0] == 'a', "out[0] = %x\n", out[0]); + ok(!out[1], "out[1] = %x\n", out[1]); +} + START_TEST(scanf) { test_sscanf(); test_sscanf_s(); test_swscanf(); + test_swscanf_s(); }
1
0
0
0
Huw Davies : comctl32: Don' t create a masked imagelist if CLR_NONE is specified.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 57657d1673e9be1e5f5a9eaecb6658c494c029c2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=57657d1673e9be1e5f5a9eae…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Nov 20 13:26:16 2017 +0000 comctl32: Don't create a masked imagelist if CLR_NONE is specified. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 92e999f34bff4a27112d22a6d48176daa20ad5f1) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/imagelist.c | 3 ++- dlls/comctl32/tests/imagelist.c | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 157344c..70457c7 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -2037,7 +2037,8 @@ ImageList_LoadImageW (HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, nImageCount = dib.dsBm.bmWidth / cx; - himl = ImageList_Create (cx, dib.dsBm.bmHeight, ILC_MASK | color, nImageCount, cGrow); + if (clrMask != CLR_NONE) color |= ILC_MASK; + himl = ImageList_Create (cx, dib.dsBm.bmHeight, color, nImageCount, cGrow); if (!himl) { DeleteObject (handle); return NULL; diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c index 7669fb6..6a62b40 100644 --- a/dlls/comctl32/tests/imagelist.c +++ b/dlls/comctl32/tests/imagelist.c @@ -39,6 +39,7 @@ #include "wine/test.h" #include "v6util.h" +#include "resources.h" #define IMAGELIST_MAGIC (('L' << 8) | 'I') @@ -67,6 +68,7 @@ static HRESULT (WINAPI *pImageList_CoCreateInstance)(REFCLSID,const IUnknown *, REFIID,void **); static HRESULT (WINAPI *pHIMAGELIST_QueryInterface)(HIMAGELIST,REFIID,void **); static int (WINAPI *pImageList_SetColorTable)(HIMAGELIST,int,int,RGBQUAD*); +static DWORD (WINAPI *pImageList_GetFlags)(HIMAGELIST); static HINSTANCE hinst; @@ -2253,6 +2255,26 @@ static void test_copy(void) ImageList_Destroy(src); } +static void test_loadimage(void) +{ + HIMAGELIST list; + DWORD flags; + + list = ImageList_LoadImageW( hinst, MAKEINTRESOURCEW(IDB_BITMAP_128x15), 16, 1, CLR_DEFAULT, + IMAGE_BITMAP, LR_CREATEDIBSECTION ); + ok( list != NULL, "got %p\n", list ); + flags = pImageList_GetFlags( list ); + ok( flags == (ILC_COLOR4 | ILC_MASK), "got %08x\n", flags ); + ImageList_Destroy( list ); + + list = ImageList_LoadImageW( hinst, MAKEINTRESOURCEW(IDB_BITMAP_128x15), 16, 1, CLR_NONE, + IMAGE_BITMAP, LR_CREATEDIBSECTION ); + ok( list != NULL, "got %p\n", list ); + flags = pImageList_GetFlags( list ); + ok( flags == ILC_COLOR4, "got %08x\n", flags ); + ImageList_Destroy( list ); +} + static void test_IImageList_Clone(void) { IImageList *imgl, *imgl2; @@ -2386,6 +2408,7 @@ START_TEST(imagelist) pImageList_DrawIndirect = (void*)GetProcAddress(hComCtl32, "ImageList_DrawIndirect"); pImageList_SetImageCount = (void*)GetProcAddress(hComCtl32, "ImageList_SetImageCount"); pImageList_SetColorTable = (void*)GetProcAddress(hComCtl32, (const char*)390); + pImageList_GetFlags = (void*)GetProcAddress(hComCtl32, "ImageList_GetFlags"); hinst = GetModuleHandleA(NULL); @@ -2404,6 +2427,7 @@ START_TEST(imagelist) test_color_table(ILC_COLOR4); test_color_table(ILC_COLOR8); test_copy(); + test_loadimage(); FreeLibrary(hComCtl32);
1
0
0
0
Michael Stefaniuc : comctl32/tests: Add an ImageList_Copy() test.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: d1db77cc44210fc766addcb6fd2c0f6c0a66711d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d1db77cc44210fc766addcb6…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Apr 5 15:25:44 2017 +0200 comctl32/tests: Add an ImageList_Copy() test. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit a6a9ec4459d1ba912b4ce13671fe8ba0bfe531ee) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/tests/imagelist.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c index b5445c5..7669fb6 100644 --- a/dlls/comctl32/tests/imagelist.c +++ b/dlls/comctl32/tests/imagelist.c @@ -2230,6 +2230,29 @@ static void test_color_table(UINT ilc) ImageList_Destroy(himl); } +static void test_copy(void) +{ + HIMAGELIST dst, src; + BOOL ret; + int count; + + dst = ImageList_Create(5, 11, ILC_COLOR, 1, 1); + count = ImageList_GetImageCount(dst); + ok(!count, "ImageList not empty.\n"); + src = createImageList(7, 13); + count = ImageList_GetImageCount(src); + ok(count > 2, "Tests need an ImageList with more than 2 images\n"); + + /* ImageList_Copy() cannot copy between two ImageLists */ + ret = ImageList_Copy(dst, 0, src, 2, ILCF_MOVE); + ok(!ret, "ImageList_Copy() should have returned FALSE\n"); + count = ImageList_GetImageCount(dst); + ok(count == 0, "Expected no image in dst ImageList, got %d\n", count); + + ImageList_Destroy(dst); + ImageList_Destroy(src); +} + static void test_IImageList_Clone(void) { IImageList *imgl, *imgl2; @@ -2380,6 +2403,7 @@ START_TEST(imagelist) test_iconsize(); test_color_table(ILC_COLOR4); test_color_table(ILC_COLOR8); + test_copy(); FreeLibrary(hComCtl32);
1
0
0
0
Huw Davies : comctl32: Correctly set the colour table for ILC_COLOR4 and ILC_COLOR8 imagelists.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 63be724f84cbb9815543e4462d8a52acbe69d302 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=63be724f84cbb9815543e446…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jan 30 18:54:07 2017 +0000 comctl32: Correctly set the colour table for ILC_COLOR4 and ILC_COLOR8 imagelists. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 2dd0fb880c005cd5660928d1646a117407cec238) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/comctl32/imagelist.c | 42 +++++++-- dlls/comctl32/tests/imagelist.c | 203 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 239 insertions(+), 6 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=63be724f84cbb9815543…
1
0
0
0
Kimmo Myllyvirta : xaudio2: Add support for float formats with more than 2 channels.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 4081b2c2793bcdb207edaa4a85d4f5ce7c482a20 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4081b2c2793bcdb207edaa4a…
Author: Kimmo Myllyvirta <kimmo.myllyvirta(a)gmail.com> Date: Sun Nov 12 12:35:34 2017 +0200 xaudio2: Add support for float formats with more than 2 channels. Signed-off-by: Kimmo Myllyvirta <kimmo.myllyvirta(a)gmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 8b94c5b51c2c706dd8fa42cec4631f386f3a8562) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/xaudio2_7/xaudio_dll.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index b2a5e3b..f3a749c 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -499,6 +499,14 @@ static ALenum get_al_format(const WAVEFORMATEX *fmt) return AL_FORMAT_MONO_FLOAT32; case 2: return AL_FORMAT_STEREO_FLOAT32; + case 4: + return AL_FORMAT_QUAD32; + case 6: + return AL_FORMAT_51CHN32; + case 7: + return AL_FORMAT_61CHN32; + case 8: + return AL_FORMAT_71CHN32; } } }
1
0
0
0
Akihiro Sagawa : winex11: Keep the result string in the IME UI window procedure.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 0354a5f3e2559f5f6e62de4f90b44b702f46f161 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0354a5f3e2559f5f6e62de4f…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Nov 15 00:18:51 2017 +0900 winex11: Keep the result string in the IME UI window procedure. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit b8dc1e7cde64c212882958c0806b50911a360fb9) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/imm32/tests/imm32.c | 1 - dlls/winex11.drv/ime.c | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index bf0f4b2..12e8f99 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -380,7 +380,6 @@ static LRESULT WINAPI test_ime_wnd_proc(HWND hWnd, UINT msg, WPARAM wParam, LPAR imc = ImmGetContext(hWnd); size = ImmGetCompositionStringW(imc, GCS_RESULTSTR, wstring, sizeof(wstring)); - todo_wine ok(size > 0, "ImmGetCompositionString(GCS_RESULTSTR) is %d\n", size); ImmReleaseContext(hwnd, imc); diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index 0f4d2b2..d0746c5 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -906,6 +906,11 @@ BOOL WINAPI ImeSetCompositionString(HIMC hIMC, DWORD dwIndex, LPCVOID lpComp, myPrivate->bInComposition = TRUE; } + /* clear existing result */ + newCompStr = updateResultStr(lpIMC->hCompStr, NULL, 0); + ImmDestroyIMCC(lpIMC->hCompStr); + lpIMC->hCompStr = newCompStr; + flags = GCS_COMPSTR; if (dwCompLen && lpComp) @@ -1256,7 +1261,6 @@ static void DefaultIMEComposition(HIMC hIMC, HWND hwnd, LPARAM lParam) LPCOMPOSITIONSTRING compstr; LPBYTE compdata; LPWSTR ResultStr; - HIMCC newCompStr; LPINPUTCONTEXT lpIMC; lpIMC = LockRealIMC(hIMC); @@ -1269,11 +1273,6 @@ static void DefaultIMEComposition(HIMC hIMC, HWND hwnd, LPARAM lParam) ResultStr = (LPWSTR)(compdata + compstr->dwResultStrOffset); GenerateIMECHARMessages(hIMC, ResultStr, compstr->dwResultStrLen); ImmUnlockIMCC(lpIMC->hCompStr); - - /* clear the buffer */ - newCompStr = updateResultStr(lpIMC->hCompStr, NULL, 0); - ImmDestroyIMCC(lpIMC->hCompStr); - lpIMC->hCompStr = newCompStr; UnlockRealIMC(hIMC); } else
1
0
0
0
Akihiro Sagawa : imm32/tests: Add more composition string tests.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: cc550515d2818ac4597d1c0339b2f7153e0cbadd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cc550515d2818ac4597d1c03…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Nov 15 00:18:49 2017 +0900 imm32/tests: Add more composition string tests. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 3955ce1e0a882cce7237920ad06d176a14da7a27) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/imm32/tests/imm32.c | 141 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 99d95c1..bf0f4b2 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -355,6 +355,63 @@ static void test_ImmNotifyIME(void) { } +static struct { + WNDPROC old_wnd_proc; + BOOL catch_result_str; + BOOL catch_ime_char; + DWORD start; + DWORD timer_id; +} ime_composition_test; + +static LRESULT WINAPI test_ime_wnd_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch (msg) + { + case WM_IME_COMPOSITION: + if ((lParam & GCS_RESULTSTR) && !ime_composition_test.catch_result_str) { + WCHAR wstring[20]; + HIMC imc; + LONG size; + LRESULT ret; + + ret = CallWindowProcA(ime_composition_test.old_wnd_proc, + hWnd, msg, wParam, lParam); + + imc = ImmGetContext(hWnd); + size = ImmGetCompositionStringW(imc, GCS_RESULTSTR, + wstring, sizeof(wstring)); + todo_wine + ok(size > 0, "ImmGetCompositionString(GCS_RESULTSTR) is %d\n", size); + ImmReleaseContext(hwnd, imc); + + ime_composition_test.catch_result_str = TRUE; + return ret; + } + break; + case WM_IME_CHAR: + if (!ime_composition_test.catch_ime_char) + ime_composition_test.catch_ime_char = TRUE; + break; + case WM_TIMER: + if (wParam == ime_composition_test.timer_id) { + HWND parent = GetParent(hWnd); + char title[64]; + int left = 20 - (GetTickCount() - ime_composition_test.start) / 1000; + wsprintfA(title, "%sLeft %d sec. - IME composition test", + ime_composition_test.catch_result_str ? "[*] " : "", left); + SetWindowTextA(parent, title); + if (left <= 0) + DestroyWindow(parent); + else + SetTimer(hWnd, wParam, 100, NULL); + return TRUE; + } + break; + } + return CallWindowProcA(ime_composition_test.old_wnd_proc, + hWnd, msg, wParam, lParam); +} + static void test_ImmGetCompositionString(void) { HIMC imc; @@ -364,6 +421,7 @@ static void test_ImmGetCompositionString(void) LONG len; LONG alen,wlen; BOOL ret; + DWORD prop; imc = ImmGetContext(hwnd); ret = ImmSetCompositionStringW(imc, SCS_SETSTR, string, sizeof(string), NULL,0); @@ -388,6 +446,89 @@ static void test_ImmGetCompositionString(void) win_skip("Composition string isn't available\n"); ImmReleaseContext(hwnd, imc); + + /* Test composition results input by IMM API */ + prop = ImmGetProperty(GetKeyboardLayout(0), IGP_SETCOMPSTR); + if (!(prop & SCS_CAP_COMPSTR)) { + /* Wine's IME doesn't support SCS_SETSTR in ImmSetCompositionString */ + skip("This IME doesn't support SCS_SETSTR\n"); + } + else { + ime_composition_test.old_wnd_proc = + (WNDPROC)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, + (LONG_PTR)test_ime_wnd_proc); + imc = ImmGetContext(hwnd); + msg_spy_flush_msgs(); + + ret = ImmSetCompositionStringW(imc, SCS_SETSTR, + string, sizeof(string), NULL,0); + ok(ret, "ImmSetCompositionStringW failed\n"); + wlen = ImmGetCompositionStringW(imc, GCS_COMPSTR, + wstring, sizeof(wstring)); + if (wlen > 0) { + ret = ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_COMPLETE, 0); + ok(ret, "ImmNotifyIME(CPS_COMPLETE) failed\n"); + msg_spy_flush_msgs(); + ok(ime_composition_test.catch_result_str, + "WM_IME_COMPOSITION(GCS_RESULTSTR) isn't sent\n"); + ok(ime_composition_test.catch_ime_char, + "WM_IME_CHAR isn't sent\n"); + } + else + win_skip("Composition string isn't available\n"); + ImmReleaseContext(hwnd, imc); + SetWindowLongPtrA(hwnd, GWLP_WNDPROC, + (LONG_PTR)ime_composition_test.old_wnd_proc); + msg_spy_flush_msgs(); + } + + /* Test composition results input by hand */ + memset(&ime_composition_test, 0, sizeof(ime_composition_test)); + if (winetest_interactive) { + HWND hwndMain, hwndChild; + MSG msg; + const DWORD MY_TIMER = 0xcaffe; + + hwndMain = CreateWindowExA(WS_EX_CLIENTEDGE, wndcls, + "IME composition test", + WS_OVERLAPPEDWINDOW | WS_VISIBLE, + CW_USEDEFAULT, CW_USEDEFAULT, 320, 160, + NULL, NULL, GetModuleHandleA(NULL), NULL); + hwndChild = CreateWindowExA(0, "static", + "Input a DBCS character here using IME.", + WS_CHILD | WS_VISIBLE | 0 + /* ES_AUTOHSCROLL | ES_MULTILINE */, + 0, 0, 320, 100, hwndMain, NULL, + GetModuleHandleA(NULL), NULL); + + ime_composition_test.old_wnd_proc = + (WNDPROC)SetWindowLongPtrA(hwndChild, GWLP_WNDPROC, + (LONG_PTR)test_ime_wnd_proc); + + SetFocus(hwndChild); + + /* FIXME: In wine, IME UI window is created in ImmSetOpenStatus(). + So, we prepare it here to generate WM_IME_CHAR messages. */ + imc = ImmGetContext(hwndChild); + ImmSetOpenStatus(imc, FALSE); + ImmReleaseContext(hwndChild, imc); + + ime_composition_test.timer_id = MY_TIMER; + ime_composition_test.start = GetTickCount(); + SetTimer(hwndChild, ime_composition_test.timer_id, 100, NULL); + while (GetMessageA(&msg, NULL, 0, 0)) { + TranslateMessage(&msg); + DispatchMessageA(&msg); + if (!IsWindow(hwndMain)) + break; + } + if (!ime_composition_test.catch_result_str) + skip("WM_IME_COMPOSITION(GCS_RESULTSTR) isn't tested\n"); + else + ok(ime_composition_test.catch_ime_char, + "WM_IME_CHAR isn't sent\n"); + msg_spy_flush_msgs(); + } } static void test_ImmSetCompositionString(void)
1
0
0
0
Akihiro Sagawa : imm32/tests: Add a skip message when composition string isn't available.
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 9b0109da6230e93258d94f51a3aa687f8b8b9dc4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b0109da6230e93258d94f51…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Wed Nov 15 00:18:47 2017 +0900 imm32/tests: Add a skip message when composition string isn't available. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit c1dac18c6ae9b19b1549242867e7707807041f2a) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/imm32/tests/imm32.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index b02f85d..99d95c1 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -361,11 +361,19 @@ static void test_ImmGetCompositionString(void) static const WCHAR string[] = {'w','i','n','e',0x65e5,0x672c,0x8a9e}; char cstring[20]; WCHAR wstring[20]; - DWORD len; - DWORD alen,wlen; + LONG len; + LONG alen,wlen; + BOOL ret; imc = ImmGetContext(hwnd); - ImmSetCompositionStringW(imc, SCS_SETSTR, string, sizeof(string), NULL,0); + ret = ImmSetCompositionStringW(imc, SCS_SETSTR, string, sizeof(string), NULL,0); + if (!ret) { + win_skip("Composition isn't supported\n"); + ImmReleaseContext(hwnd, imc); + return; + } + msg_spy_flush_msgs(); + alen = ImmGetCompositionStringA(imc, GCS_COMPSTR, cstring, 20); wlen = ImmGetCompositionStringW(imc, GCS_COMPSTR, wstring, 20); /* windows machines without any IME installed just return 0 above */ @@ -376,6 +384,9 @@ static void test_ImmGetCompositionString(void) len = ImmGetCompositionStringA(imc, GCS_COMPATTR, NULL, 0); ok(len==alen,"GCS_COMPATTR(A) not returning correct count\n"); } + else + win_skip("Composition string isn't available\n"); + ImmReleaseContext(hwnd, imc); }
1
0
0
0
Nikolay Sivov : msvcrt: Implement _memicmp_l().
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: beba04be54874e622136b2c923f70198f213260b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=beba04be54874e622136b2c9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Nov 8 10:26:16 2017 +0100 msvcrt: Implement _memicmp_l(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit d045a5ea29aada4182689cd80f4b57a694322b42) Conflicts: dlls/msvcr100/tests/msvcr100.c dlls/msvcrt/tests/string.c Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- .../api-ms-win-crt-string-l1-1-0.spec | 2 +- dlls/msvcr100/msvcr100.spec | 4 +- dlls/msvcr100/tests/msvcr100.c | 87 +++++++++++++ dlls/msvcr110/msvcr110.spec | 4 +- dlls/msvcr120/msvcr120.spec | 4 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcr70/msvcr70.spec | 2 +- dlls/msvcr71/msvcr71.spec | 2 +- dlls/msvcr80/msvcr80.spec | 4 +- dlls/msvcr90/msvcr90.spec | 4 +- dlls/msvcr90/tests/msvcr90.c | 69 +++++++++++ dlls/msvcrt/msvcrt.spec | 4 +- dlls/msvcrt/string.c | 34 ++++++ dlls/msvcrt/tests/string.c | 84 +++++++++++++ dlls/ucrtbase/tests/string.c | 134 ++++++++++++++++++++- dlls/ucrtbase/ucrtbase.spec | 4 +- 16 files changed, 425 insertions(+), 19 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=beba04be54874e622136…
1
0
0
0
Nikolay Sivov : d3dx9: Implement D3DXFrameFind().
by Alexandre Julliard
18 Mar '18
18 Mar '18
Module: wine Branch: oldstable Commit: 10bf711c021f66c818e66c37731f7ea852b2967c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=10bf711c021f66c818e66c37…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Nov 6 13:31:10 2017 +0300 d3dx9: Implement D3DXFrameFind(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 6bae0a003e893072ab2b636d5b6c982d76b39f36) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3dx9_24/d3dx9_24.spec | 2 +- dlls/d3dx9_25/d3dx9_25.spec | 2 +- dlls/d3dx9_26/d3dx9_26.spec | 2 +- dlls/d3dx9_27/d3dx9_27.spec | 2 +- dlls/d3dx9_28/d3dx9_28.spec | 2 +- dlls/d3dx9_29/d3dx9_29.spec | 2 +- dlls/d3dx9_30/d3dx9_30.spec | 2 +- dlls/d3dx9_31/d3dx9_31.spec | 2 +- dlls/d3dx9_32/d3dx9_32.spec | 2 +- dlls/d3dx9_33/d3dx9_33.spec | 2 +- dlls/d3dx9_34/d3dx9_34.spec | 2 +- dlls/d3dx9_35/d3dx9_35.spec | 2 +- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/mesh.c | 80 +++++++++++++++++++++++++++++++++++++++++++++ dlls/d3dx9_36/tests/mesh.c | 76 ++++++++++++++++++++++++++++++++++++++++++ dlls/d3dx9_37/d3dx9_37.spec | 2 +- dlls/d3dx9_38/d3dx9_38.spec | 2 +- dlls/d3dx9_39/d3dx9_39.spec | 2 +- dlls/d3dx9_40/d3dx9_40.spec | 2 +- dlls/d3dx9_41/d3dx9_41.spec | 2 +- dlls/d3dx9_42/d3dx9_42.spec | 2 +- dlls/d3dx9_43/d3dx9_43.spec | 2 +- 22 files changed, 176 insertions(+), 20 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=10bf711c021f66c818e6…
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
79
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
79
Results per page:
10
25
50
100
200