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
June 2016
----- 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
592 discussions
Start a n
N
ew thread
Huw Davies : gdi32: Rename the struct representing an embedded WMF in an EMF.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: 078f192c669212e58b3b211712b0f88d61a4b225 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=078f192c669212e58b3b21171…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Jun 8 11:00:47 2016 +0100 gdi32: Rename the struct representing an embedded WMF in an EMF. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmetafile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/enhmetafile.c b/dlls/gdi32/enhmetafile.c index c251b4e..cab30e9 100644 --- a/dlls/gdi32/enhmetafile.c +++ b/dlls/gdi32/enhmetafile.c @@ -2739,7 +2739,7 @@ done: return emf; } -typedef struct gdi_mf_comment +typedef struct wmf_in_emf_comment { DWORD ident; DWORD iComment; @@ -2747,7 +2747,7 @@ typedef struct gdi_mf_comment DWORD nChecksum; DWORD fFlags; DWORD cbWinMetaFile; -} gdi_mf_comment; +} wmf_in_emf_comment; /****************************************************************** * SetWinMetaFileBits (GDI32.@) @@ -2830,10 +2830,10 @@ HENHMETAFILE WINAPI SetWinMetaFileBits(UINT cbBuffer, const BYTE *lpbBuffer, HDC */ if (mm != MM_TEXT) { - gdi_mf_comment *mfcomment; + wmf_in_emf_comment *mfcomment; UINT mfcomment_size; - mfcomment_size = sizeof (gdi_mf_comment) + cbBuffer; + mfcomment_size = sizeof (*mfcomment) + cbBuffer; mfcomment = HeapAlloc(GetProcessHeap(), 0, mfcomment_size); if (mfcomment) {
1
0
0
0
Huw Davies : gdi32: If the WMF was created by GetWinMetaFileBits() then return the original EMF.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: 19d1416ceff5ebd47a7a41196cf5629d9925fee4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19d1416ceff5ebd47a7a41196…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Jun 8 11:00:46 2016 +0100 gdi32: If the WMF was created by GetWinMetaFileBits() then return the original EMF. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmetafile.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ dlls/gdi32/gdi_private.h | 21 +++++++++++++++++ dlls/gdi32/metafile.c | 22 +----------------- dlls/gdi32/tests/metafile.c | 22 +++++++++++++++--- 4 files changed, 97 insertions(+), 24 deletions(-) diff --git a/dlls/gdi32/enhmetafile.c b/dlls/gdi32/enhmetafile.c index 17ccd1f..c251b4e 100644 --- a/dlls/gdi32/enhmetafile.c +++ b/dlls/gdi32/enhmetafile.c @@ -2686,6 +2686,59 @@ UINT WINAPI GetEnhMetaFilePaletteEntries( HENHMETAFILE hEmf, return infoForCallBack.cEntries; } +/****************************************************************** + * extract_emf_from_comment + * + * If the WMF was created by GetWinMetaFileBits, then extract the + * original EMF that is stored in MFCOMMENT chunks. + */ +static HENHMETAFILE extract_emf_from_comment( const BYTE *buf, UINT mf_size ) +{ + METAHEADER *mh = (METAHEADER *)buf; + METARECORD *mr; + emf_in_wmf_comment *chunk; + WORD checksum = 0; + DWORD size = 0, remaining, chunks; + BYTE *emf_bits = NULL, *ptr; + UINT offset; + HENHMETAFILE emf = NULL; + + if (mf_size < sizeof(*mh)) return NULL; + + for (offset = mh->mtHeaderSize * 2; offset < mf_size; offset += (mr->rdSize * 2)) + { + mr = (METARECORD *)((char *)mh + offset); + chunk = (emf_in_wmf_comment *)(mr->rdParm + 2); + + if (mr->rdFunction != META_ESCAPE || mr->rdParm[0] != MFCOMMENT) goto done; + if (chunk->magic != WMFC_MAGIC) goto done; + + if (!emf_bits) + { + size = remaining = chunk->emf_size; + chunks = chunk->num_chunks; + emf_bits = ptr = HeapAlloc( GetProcessHeap(), 0, size ); + if (!emf_bits) goto done; + } + if (chunk->chunk_size > remaining) goto done; + remaining -= chunk->chunk_size; + if (chunk->remaining_size != remaining) goto done; + memcpy( ptr, chunk->emf_data, chunk->chunk_size ); + ptr += chunk->chunk_size; + if (--chunks == 0) break; + } + + for (offset = 0; offset < mf_size / 2; offset++) + checksum += *((WORD *)buf + offset); + if (checksum) goto done; + + emf = SetEnhMetaFileBits( size, emf_bits ); + +done: + HeapFree( GetProcessHeap(), 0, emf_bits ); + return emf; +} + typedef struct gdi_mf_comment { DWORD ident; @@ -2722,6 +2775,9 @@ HENHMETAFILE WINAPI SetWinMetaFileBits(UINT cbBuffer, const BYTE *lpbBuffer, HDC return NULL; } + ret = extract_emf_from_comment( lpbBuffer, cbBuffer ); + if (ret) return ret; + if(!hdcRef) hdcRef = hdcdisp = CreateDCW(szDisplayW, NULL, NULL, NULL); diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index cde9867..08a5d3b 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -311,6 +311,27 @@ extern void GDI_hdc_not_using_object(HGDIOBJ obj, HDC hdc) DECLSPEC_HIDDEN; extern HMETAFILE MF_Create_HMETAFILE(METAHEADER *mh) DECLSPEC_HIDDEN; extern METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCVOID filename, BOOL unicode ) DECLSPEC_HIDDEN; +/* Format of comment record added by GetWinMetaFileBits */ +#include <pshpack2.h> +typedef struct +{ + DWORD magic; /* WMFC */ + WORD unk04; /* 1 */ + WORD unk06; /* 0 */ + WORD unk08; /* 0 */ + WORD unk0a; /* 1 */ + WORD checksum; + DWORD unk0e; /* 0 */ + DWORD num_chunks; + DWORD chunk_size; + DWORD remaining_size; + DWORD emf_size; + BYTE emf_data[1]; +} emf_in_wmf_comment; +#include <poppack.h> + +#define WMFC_MAGIC 0x43464d57 + /* path.c */ extern void free_gdi_path( struct gdi_path *path ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/metafile.c b/dlls/gdi32/metafile.c index 925d648..c7e25a7 100644 --- a/dlls/gdi32/metafile.c +++ b/dlls/gdi32/metafile.c @@ -1114,26 +1114,6 @@ UINT WINAPI GetMetaFileBitsEx( HMETAFILE hmf, UINT nSize, LPVOID buf ) return mfSize; } -#include <pshpack2.h> -typedef struct -{ - DWORD magic; /* WMFC */ - WORD unk04; /* 1 */ - WORD unk06; /* 0 */ - WORD unk08; /* 0 */ - WORD unk0a; /* 1 */ - WORD checksum; - DWORD unk0e; /* 0 */ - DWORD num_chunks; - DWORD chunk_size; - DWORD remaining_size; - DWORD emf_size; - BYTE emf_data[1]; -} emf_in_wmf_comment; -#include <poppack.h> - -static const DWORD wmfc_magic = 0x43464d57; - /****************************************************************** * add_mf_comment * @@ -1158,7 +1138,7 @@ static BOOL add_mf_comment(HDC hdc, HENHMETAFILE emf) chunk = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(emf_in_wmf_comment, emf_data[max_chunk_size])); if(!chunk) goto end; - chunk->magic = wmfc_magic; + chunk->magic = WMFC_MAGIC; chunk->unk04 = 1; chunk->unk06 = 0; chunk->unk08 = 0; diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 9a5c1a5..79f072b 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3249,16 +3249,17 @@ static BOOL near_match(int x, int y) static void getwinmetafilebits(UINT mode, int scale, RECT *rc) { - HENHMETAFILE emf; + HENHMETAFILE emf, emf2; HDC display_dc, emf_dc; - ENHMETAHEADER *enh_header; - UINT size, emf_size, i; + ENHMETAHEADER *enh_header, *enh2_header; + UINT size, emf_size, i, emf2_size; WORD check = 0; DWORD rec_num = 0; METAHEADER *mh = NULL; METARECORD *rec; INT horz_res, vert_res, horz_size, vert_size; INT curve_caps, line_caps, poly_caps; + METAFILEPICT mfp; display_dc = GetDC(NULL); ok(display_dc != NULL, "display_dc is NULL\n"); @@ -3401,6 +3402,21 @@ static void getwinmetafilebits(UINT mode, int scale, RECT *rc) rec = (METARECORD*)((WORD*)rec + rec->rdSize); } + /* Show that we get the original back when we do the reverse conversion. + mfp is ignored in this case. */ + mfp.mm = MM_ISOTROPIC; + mfp.xExt = 0xcafe; + mfp.yExt = 0xbeef; + emf2 = SetWinMetaFileBits( size, (BYTE*)mh, NULL, &mfp ); + ok( !!emf2, "got NULL\n" ); + emf2_size = GetEnhMetaFileBits( emf2, 0, NULL ); + enh2_header = HeapAlloc( GetProcessHeap(), 0, emf2_size ); + emf2_size = GetEnhMetaFileBits( emf2, emf2_size, (BYTE*)enh2_header ); + ok( emf_size == emf2_size, "%d %d\n", emf_size, emf2_size ); + ok( !memcmp( enh_header, enh2_header, emf_size ), "mismatch\n" ); + HeapFree( GetProcessHeap(), 0, enh2_header ); + DeleteEnhMetaFile( emf2 ); + end: HeapFree(GetProcessHeap(), 0, mh); HeapFree(GetProcessHeap(), 0, enh_header);
1
0
0
0
Huw Davies : gdi32: Rename the struct representing an embedded EMF in a WMF.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: 7be1c53d8297561c7616b4a3ba7698dea01ffd7f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7be1c53d8297561c7616b4a3b…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Jun 8 11:00:45 2016 +0100 gdi32: Rename the struct representing an embedded EMF in a WMF. Also, use an array rather than a pointer to represent the start of the data. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/metafile.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/metafile.c b/dlls/gdi32/metafile.c index 0cb36af..925d648 100644 --- a/dlls/gdi32/metafile.c +++ b/dlls/gdi32/metafile.c @@ -1128,8 +1128,8 @@ typedef struct DWORD chunk_size; DWORD remaining_size; DWORD emf_size; - BYTE *emf_data; -} mf_comment_chunk; + BYTE emf_data[1]; +} emf_in_wmf_comment; #include <poppack.h> static const DWORD wmfc_magic = 0x43464d57; @@ -1146,7 +1146,7 @@ static BOOL add_mf_comment(HDC hdc, HENHMETAFILE emf) { DWORD size = GetEnhMetaFileBits(emf, 0, NULL), i; BYTE *bits, *chunk_data; - mf_comment_chunk *chunk = NULL; + emf_in_wmf_comment *chunk = NULL; BOOL ret = FALSE; static const DWORD max_chunk_size = 0x2000; @@ -1155,7 +1155,7 @@ static BOOL add_mf_comment(HDC hdc, HENHMETAFILE emf) if(!bits) return FALSE; if(!GetEnhMetaFileBits(emf, size, bits)) goto end; - chunk = HeapAlloc(GetProcessHeap(), 0, max_chunk_size + FIELD_OFFSET(mf_comment_chunk, emf_data)); + chunk = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(emf_in_wmf_comment, emf_data[max_chunk_size])); if(!chunk) goto end; chunk->magic = wmfc_magic; @@ -1176,10 +1176,10 @@ static BOOL add_mf_comment(HDC hdc, HENHMETAFILE emf) chunk->chunk_size = chunk->remaining_size; chunk->remaining_size -= chunk->chunk_size; - memcpy(&chunk->emf_data, chunk_data, chunk->chunk_size); + memcpy(chunk->emf_data, chunk_data, chunk->chunk_size); chunk_data += chunk->chunk_size; - if(!Escape(hdc, MFCOMMENT, chunk->chunk_size + FIELD_OFFSET(mf_comment_chunk, emf_data), (char*)chunk, NULL)) + if(!Escape(hdc, MFCOMMENT, FIELD_OFFSET(emf_in_wmf_comment, emf_data[chunk->chunk_size]), (char*)chunk, NULL)) goto end; } ret = TRUE;
1
0
0
0
Michael Stefaniuc : comctl32/tests: Use wine_dbgstr_rect() to print RECTs.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: 96185e23b4ed64d89a420eb5bc6ba49926dde201 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=96185e23b4ed64d89a420eb5b…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 8 12:28:46 2016 +0200 comctl32/tests: Use wine_dbgstr_rect() to print RECTs. Signed-off-by: Michael Stefaniuc <mstefani(a)redhat.de> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/header.c | 4 ++-- dlls/comctl32/tests/progress.c | 12 ++++-------- dlls/comctl32/tests/rebar.c | 9 ++++----- dlls/comctl32/tests/status.c | 5 ++--- dlls/comctl32/tests/toolbar.c | 4 ++-- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index c828465..5c35b60 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -1350,8 +1350,8 @@ static void test_hds_nosizing(HWND hParent) ok(nm->lItemlParam == lparam, "Invalid lItemlParam %d vs %ld\n", lparam, nm->lItemlParam); \ ok((nm->rc.top == _top && nm->rc.bottom == _bottom && nm->rc.left == _left && nm->rc.right == _right) || \ broken(draw_stage != CDDS_ITEMPREPAINT), /* comctl32 < 5.80 */ \ - "Invalid rect (%d,%d) (%d,%d) vs (%d,%d) (%d,%d)\n", _left, _top, _right, _bottom, \ - nm->rc.left, nm->rc.top, nm->rc.right, nm->rc.bottom); + "Invalid rect (%d,%d)-(%d,%d) vs %s\n", _left, _top, _right, _bottom, \ + wine_dbgstr_rect(&nm->rc)); static LRESULT customdraw_1(int n, NMCUSTOMDRAW *nm) { diff --git a/dlls/comctl32/tests/progress.c b/dlls/comctl32/tests/progress.c index f7ae328..7f69c35 100644 --- a/dlls/comctl32/tests/progress.c +++ b/dlls/comctl32/tests/progress.c @@ -206,10 +206,8 @@ static void test_redraw(void) SetRectEmpty(&last_paint_rect); SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0); GetClientRect(hProgressWnd, &client_rect); - ok(EqualRect(&last_paint_rect, &client_rect), - "last_paint_rect was { %d, %d, %d, %d } instead of { %d, %d, %d, %d }\n", - last_paint_rect.left, last_paint_rect.top, last_paint_rect.right, last_paint_rect.bottom, - client_rect.left, client_rect.top, client_rect.right, client_rect.bottom); + ok(EqualRect(&last_paint_rect, &client_rect), "last_paint_rect was %s instead of %s\n", + wine_dbgstr_rect(&last_paint_rect), wine_dbgstr_rect(&client_rect)); update_window(hProgressWnd); ok(!erased, "Progress bar shouldn't have erased the background\n"); @@ -218,10 +216,8 @@ static void test_redraw(void) SetRectEmpty(&last_paint_rect); SendMessageA(hProgressWnd, PBM_SETPOS, 0, 0); GetClientRect(hProgressWnd, &client_rect); - ok(EqualRect(&last_paint_rect, &client_rect), - "last_paint_rect was { %d, %d, %d, %d } instead of { %d, %d, %d, %d }\n", - last_paint_rect.left, last_paint_rect.top, last_paint_rect.right, last_paint_rect.bottom, - client_rect.left, client_rect.top, client_rect.right, client_rect.bottom); + ok(EqualRect(&last_paint_rect, &client_rect), "last_paint_rect was %s instead of %s\n", + wine_dbgstr_rect(&last_paint_rect), wine_dbgstr_rect(&client_rect)); update_window(hProgressWnd); ok(erased, "Progress bar should have erased the background\n"); } diff --git a/dlls/comctl32/tests/rebar.c b/dlls/comctl32/tests/rebar.c index 0c3e2dd..6430ba2 100644 --- a/dlls/comctl32/tests/rebar.c +++ b/dlls/comctl32/tests/rebar.c @@ -36,14 +36,13 @@ static int system_font_height; #define check_rect(name, val, exp) ok(EqualRect(&val, &exp), \ - "invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d)\n", \ - val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom); + "invalid rect (" name ") %s - expected %s\n", wine_dbgstr_rect(&val), wine_dbgstr_rect(&exp)); #define check_rect_no_top(name, val, exp) { \ ok((val.bottom - val.top == exp.bottom - exp.top) && \ - val.left == exp.left && val.right == exp.right, "invalid rect (" name ") (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d), ignoring top\n", \ - val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom); \ - } + val.left == exp.left && val.right == exp.right, \ + "invalid rect (" name ") %s - expected %s, ignoring top\n", \ + wine_dbgstr_rect(&val), wine_dbgstr_rect(&exp)); } #define compare(val, exp, format) ok((val) == (exp), #val " value " format " expected " format "\n", (val), (exp)); diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c index f537fe0..fa0d970 100644 --- a/dlls/comctl32/tests/status.c +++ b/dlls/comctl32/tests/status.c @@ -30,9 +30,8 @@ RECT exp = {abs(got.left - _left), abs(got.top - _top), \ abs(got.right - _right), abs(got.bottom - _bottom)}; \ ok(exp.left <= 2 && exp.top <= 2 && exp.right <= 2 && exp.bottom <= 2, \ - "Expected rect {%d,%d, %d,%d}, got {%d,%d, %d,%d}\n", \ - _left, _top, _right, _bottom, \ - (got).left, (got).top, (got).right, (got).bottom); } while (0) + "Expected rect (%d,%d)-(%d,%d), got %s\n", _left, _top, _right, _bottom, \ + wine_dbgstr_rect(&(got))); } while (0) static HINSTANCE hinst; static WNDPROC g_status_wndproc; diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 01c4214..d825e18 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -109,8 +109,8 @@ static const struct message restore_parent_seq[] = { #define expect(EXPECTED,GOT) ok((GOT)==(EXPECTED), "Expected %d, got %d\n", (EXPECTED), (GOT)) #define check_rect(name, val, exp, ...) ok(EqualRect(&val, &exp), \ - "invalid rect (%d,%d) (%d,%d) - expected (%d,%d) (%d,%d) - (" name ")\n", \ - val.left, val.top, val.right, val.bottom, exp.left, exp.top, exp.right, exp.bottom, __VA_ARGS__); + "invalid rect %s - expected %s - (" name ")\n", \ + wine_dbgstr_rect(&val), wine_dbgstr_rect(&exp), __VA_ARGS__); #define compare(val, exp, format) ok((val) == (exp), #val " value " format " expected " format "\n", (val), (exp));
1
0
0
0
Grazvydas Ignotas : wined3d: Add a fallback for Skylake.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: 6be3a8fb75085dcaa1f0ffa268c98f127cbd2103 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6be3a8fb75085dcaa1f0ffa26…
Author: Grazvydas Ignotas <notasas(a)gmail.com> Date: Wed Jun 8 00:27:55 2016 +0300 wined3d: Add a fallback for Skylake. Signed-off-by: Grazvydas Ignotas <notasas(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 45b3625..3656b8b 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1999,6 +1999,8 @@ cards_amd_binary[] = }, cards_intel[] = { + /* Skylake */ + {"Skylake", CARD_INTEL_HD520}, /* Haswell */ {"Haswell Mobile", CARD_INTEL_HWM}, /* Ivybridge */
1
0
0
0
Henri Verbeet : usp10: Set the base embedding level for Script_Arabic_Numeric to 2.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: 21586466ac0f10a7c767f627aa8cd0f770a33f69 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21586466ac0f10a7c767f627a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 7 21:18:36 2016 +0200 usp10: Set the base embedding level for Script_Arabic_Numeric to 2. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/tests/usp10.c | 22 ++++++++-------------- dlls/usp10/usp10.c | 2 +- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 996f30c..0a0ac2d 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -572,9 +572,9 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, /* Persian numerals and punctuation. */ static const WCHAR test57[] = {0x06f1, 0x06f2, 0x066c, 0x06f3, 0x06f4, 0x06f5, 0x066c, /* ۱۲٬۳۴۵٬ */ 0x06f6, 0x06f7, 0x06f8, 0x066b, 0x06f9, 0x06f0}; /* ۶۷۸٫۹۰ */ - static const itemTest t571[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE},{{0,0,0,1,0,0}, 2,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,0,0,1,0,0}, 6,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,0,0,1,0,0},10,0,1,2,0,arab_tag,FALSE}, + static const itemTest t571[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0}, 2,0,1,2,0,arab_tag,FALSE}, + {{0,0,0,0,0,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0}, 6,0,1,2,0,arab_tag,FALSE}, + {{0,0,0,0,0,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},10,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0},11,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; static const itemTest t572[] = {{{0,0,0,0,0,0}, 0,0,0,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 2,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0}, 3,0,0,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 6,0,1,2,0,arab_tag,FALSE}, @@ -584,19 +584,13 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, {{0,0,0,0,0,0}, 3,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0}, 6,0,0,0,1,arab_tag,FALSE}, {{0,0,0,0,0,0}, 7,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0},10,0,0,0,1,arab_tag,FALSE}, {{0,0,0,0,0,0},11,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; - static const itemTest t574[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0}, 2,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0}, 6,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},10,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0},11,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; /* Arabic numerals and punctuation. */ static const WCHAR test58[] = {0x0661, 0x0662, 0x066c, 0x0663, 0x0664, 0x0665, 0x066c, /* ١٢٬٣٤٥٬ */ 0x0666, 0x0667, 0x0668, 0x066b, 0x0669, 0x0660}; /* ٦٧٨٫٩٠ */ - static const itemTest t581[] = {{{0,0,0,1,0,0}, 0,0,1,2,0,arab_tag,FALSE}, + static const itemTest t581[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; static const itemTest t582[] = {{{0,0,1,1,0,1}, 0,0,0,0,1,arab_tag,FALSE}, {{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; - static const itemTest t583[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; SCRIPT_ITEM items[15]; SCRIPT_CONTROL Control; @@ -801,8 +795,8 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test46,16,&Control,&State,1,t462,FALSE,0); test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0); - test_items_ok(test57,13,&Control,&State,7,t574,FALSE,0); - test_items_ok(test58,13,&Control,&State,1,t583,FALSE,0); + test_items_ok(test57,13,&Control,&State,7,t571,FALSE,0); + test_items_ok(test58,13,&Control,&State,1,t581,FALSE,0); State.uBidiLevel = 1; Control.fMergeNeutralItems = TRUE; @@ -859,8 +853,8 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test46,16,&Control,&State,1,t462,FALSE,0); test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0); - test_items_ok(test57,13,&Control,&State,7,t574,FALSE,0); - test_items_ok(test58,13,&Control,&State,1,t583,FALSE,0); + test_items_ok(test57,13,&Control,&State,7,t571,FALSE,0); + test_items_ok(test58,13,&Control,&State,1,t581,FALSE,0); State.uBidiLevel = 0; Control.fMergeNeutralItems = FALSE; diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index d654cc8..74250ea 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -330,7 +330,7 @@ const scriptData scriptInformation[] = { {LANG_ARABIC, 0, 1, 0, 0, ARABIC_CHARSET, 0, 0, 0, 0, 0, 0, 1, 1, 0}, MS_MAKE_TAG('a','r','a','b'), {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f',0}}, - {{Script_Arabic_Numeric, 0, 1, 0, 0, 0, 0, { 1,0,0,0,0,0,0,0,0,0,0}}, + {{Script_Arabic_Numeric, 0, 1, 0, 0, 0, 0, { 2,0,0,0,0,0,0,0,0,0,0}}, {LANG_ARABIC, 1, 1, 0, 0, ARABIC_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0}, MS_MAKE_TAG('a','r','a','b'), {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f',0}},
1
0
0
0
Henri Verbeet : usp10: Arabic numerals are written left-to-right.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: 2ce0f7e4a3204d3f91c3ba6ef0cfecb0c6fb78d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ce0f7e4a3204d3f91c3ba6ef…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 7 21:18:35 2016 +0200 usp10: Arabic numerals are written left-to-right. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/tests/usp10.c | 10 +++++----- dlls/usp10/usp10.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index fe579d3..996f30c 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -572,9 +572,9 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, /* Persian numerals and punctuation. */ static const WCHAR test57[] = {0x06f1, 0x06f2, 0x066c, 0x06f3, 0x06f4, 0x06f5, 0x066c, /* ۱۲٬۳۴۵٬ */ 0x06f6, 0x06f7, 0x06f8, 0x066b, 0x06f9, 0x06f0}; /* ۶۷۸٫۹۰ */ - static const itemTest t571[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE},{{0,1,0,1,0,0}, 2,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,1,0,1,0,0}, 6,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,1,0,1,0,0},10,0,1,2,0,arab_tag,FALSE}, + static const itemTest t571[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE},{{0,0,0,1,0,0}, 2,0,1,2,0,arab_tag,FALSE}, + {{0,0,0,0,0,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,0,0,1,0,0}, 6,0,1,2,0,arab_tag,FALSE}, + {{0,0,0,0,0,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,0,0,1,0,0},10,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0},11,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; static const itemTest t572[] = {{{0,0,0,0,0,0}, 0,0,0,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 2,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0}, 3,0,0,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 6,0,1,2,0,arab_tag,FALSE}, @@ -591,9 +591,9 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, /* Arabic numerals and punctuation. */ static const WCHAR test58[] = {0x0661, 0x0662, 0x066c, 0x0663, 0x0664, 0x0665, 0x066c, /* ١٢٬٣٤٥٬ */ 0x0666, 0x0667, 0x0668, 0x066b, 0x0669, 0x0660}; /* ٦٧٨٫٩٠ */ - static const itemTest t581[] = {{{0,1,0,1,0,0}, 0,0,1,2,0,arab_tag,FALSE}, + static const itemTest t581[] = {{{0,0,0,1,0,0}, 0,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; - static const itemTest t582[] = {{{0,1,1,1,0,1}, 0,0,0,0,1,arab_tag,FALSE}, + static const itemTest t582[] = {{{0,0,1,1,0,1}, 0,0,0,0,1,arab_tag,FALSE}, {{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; static const itemTest t583[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index d686a68..d654cc8 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -330,7 +330,7 @@ const scriptData scriptInformation[] = { {LANG_ARABIC, 0, 1, 0, 0, ARABIC_CHARSET, 0, 0, 0, 0, 0, 0, 1, 1, 0}, MS_MAKE_TAG('a','r','a','b'), {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f',0}}, - {{Script_Arabic_Numeric, 1, 1, 0, 0, 0, 0, { 1,0,0,0,0,0,0,0,0,0,0}}, + {{Script_Arabic_Numeric, 0, 1, 0, 0, 0, 0, { 1,0,0,0,0,0,0,0,0,0,0}}, {LANG_ARABIC, 1, 1, 0, 0, ARABIC_CHARSET, 0, 0, 0, 0, 0, 0, 1, 0, 0}, MS_MAKE_TAG('a','r','a','b'), {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f',0}},
1
0
0
0
Henri Verbeet : usp10: Handle C2_ARABICNUMBER as numeric.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: 4be7accf2a6be72e7019694d196a79bacb9d68c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4be7accf2a6be72e7019694d1…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 7 21:18:34 2016 +0200 usp10: Handle C2_ARABICNUMBER as numeric. I.e., make sure ٬ and ٫ get classified as Script_Arabic_Numeric. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/tests/usp10.c | 22 +++++++++++----------- dlls/usp10/usp10.c | 5 +++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 1793e65..fe579d3 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -584,19 +584,19 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, {{0,0,0,0,0,0}, 3,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0}, 6,0,0,0,1,arab_tag,FALSE}, {{0,0,0,0,0,0}, 7,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0},10,0,0,0,1,arab_tag,FALSE}, {{0,0,0,0,0,0},11,0,0,0,1,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; - static const itemTest t574[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 2,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 6,0,1,2,0,arab_tag,FALSE}, - {{0,0,0,0,0,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,0,1,0,0,0},10,0,1,2,0,arab_tag,FALSE}, + static const itemTest t574[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0}, 2,0,1,2,0,arab_tag,FALSE}, + {{0,0,0,0,0,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0}, 6,0,1,2,0,arab_tag,FALSE}, + {{0,0,0,0,0,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},10,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0},11,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; /* Arabic numerals and punctuation. */ static const WCHAR test58[] = {0x0661, 0x0662, 0x066c, 0x0663, 0x0664, 0x0665, 0x066c, /* ١٢٬٣٤٥٬ */ 0x0666, 0x0667, 0x0668, 0x066b, 0x0669, 0x0660}; /* ٦٧٨٫٩٠ */ static const itemTest t581[] = {{{0,1,0,1,0,0}, 0,0,1,2,0,arab_tag,FALSE}, - {{1,1,1,1,1,0},13,0,0,0,0,-1,FALSE}}; + {{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; static const itemTest t582[] = {{{0,1,1,1,0,1}, 0,0,0,0,1,arab_tag,FALSE}, - {{1,1,1,1,1,0},13,0,0,0,0,-1,FALSE}}; + {{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; static const itemTest t583[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE}, - {{1,0,0,1,1,0},13,0,0,0,0,-1,FALSE}}; + {{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; SCRIPT_ITEM items[15]; SCRIPT_CONTROL Control; @@ -680,7 +680,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test47,26,NULL,NULL,1,t471,FALSE,0); test_items_ok(test56,6,NULL,NULL,1,t561,FALSE,0); test_items_ok(test57,13,NULL,NULL,7,t571,FALSE,0); - test_items_ok(test58,13,NULL,NULL,1,t581,TRUE,0); + test_items_ok(test58,13,NULL,NULL,1,t581,FALSE,0); State.uBidiLevel = 0; test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0); @@ -745,7 +745,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test55,8,&Control,&State,2,t551,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0); test_items_ok(test57,13,&Control,&State,7,t572,FALSE,0); - test_items_ok(test58,13,&Control,&State,1,t581,TRUE,0); + test_items_ok(test58,13,&Control,&State,1,t581,FALSE,0); State.uBidiLevel = 1; test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0); @@ -802,7 +802,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0); test_items_ok(test57,13,&Control,&State,7,t574,FALSE,0); - test_items_ok(test58,13,&Control,&State,1,t583,TRUE,0); + test_items_ok(test58,13,&Control,&State,1,t583,FALSE,0); State.uBidiLevel = 1; Control.fMergeNeutralItems = TRUE; @@ -860,7 +860,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0); test_items_ok(test57,13,&Control,&State,7,t574,FALSE,0); - test_items_ok(test58,13,&Control,&State,1,t583,TRUE,0); + test_items_ok(test58,13,&Control,&State,1,t583,FALSE,0); State.uBidiLevel = 0; Control.fMergeNeutralItems = FALSE; @@ -927,7 +927,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test55,8,&Control,&State,2,t552,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t562,FALSE,0); test_items_ok(test57,13,&Control,&State,7,t573,FALSE,0); - test_items_ok(test58,13,&Control,&State,1,t582,TRUE,0); + test_items_ok(test58,13,&Control,&State,1,t582,FALSE,0); } static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string, diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 8c4991a..d686a68 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -891,7 +891,7 @@ static inline DWORD decode_surrogate_pair(LPCWSTR str, INT index, INT end) static WORD get_char_script( LPCWSTR str, INT index, INT end, INT *consumed) { static const WCHAR latin_punc[] = {'#','$','&','\'',',',';','<','>','?','@','\\','^','_','`','{','|','}','~', 0x00a0, 0}; - WORD type = 0; + WORD type = 0, type2 = 0; DWORD ch; int i; @@ -921,6 +921,7 @@ static WORD get_char_script( LPCWSTR str, INT index, INT end, INT *consumed) } GetStringTypeW(CT_CTYPE1, &str[index], 1, &type); + GetStringTypeW(CT_CTYPE2, &str[index], 1, &type2); if (type == 0) return SCRIPT_UNDEFINED; @@ -942,7 +943,7 @@ static WORD get_char_script( LPCWSTR str, INT index, INT end, INT *consumed) if (ch >= scriptRanges[i].rangeFirst && ch <= scriptRanges[i].rangeLast) { - if (scriptRanges[i].numericScript && type & C1_DIGIT) + if (scriptRanges[i].numericScript && (type & C1_DIGIT || type2 == C2_ARABICNUMBER)) return scriptRanges[i].numericScript; if (scriptRanges[i].punctScript && type & C1_PUNCT) return scriptRanges[i].punctScript;
1
0
0
0
Henri Verbeet : usp10/tests: Add an itemisation test for Arabic numerals and punctuation.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: f1628183ab0d4f5e55ca71d4cf86148ed73b5f7f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f1628183ab0d4f5e55ca71d4c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 7 21:18:33 2016 +0200 usp10/tests: Add an itemisation test for Arabic numerals and punctuation. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/tests/usp10.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index deb5da0..1793e65 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -86,7 +86,8 @@ static inline void _test_items_ok(LPCWSTR string, DWORD cchString, return; } todo_wine_if (nItemsToDo) - winetest_ok(outnItems == nItems, "Wrong number of items\n"); + winetest_ok(outnItems == nItems, "Wrong number of items (%u)\n", outnItems); + outnItems = min(outnItems, nItems); for (x = 0; x <= outnItems; x++) { if (items[x].isBroken && broken(outpItems[x].iCharPos == items[x].broken_value[0])) @@ -587,6 +588,15 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, {{0,0,0,0,0,0}, 3,0,1,2,0,arab_tag,FALSE},{{0,0,1,0,0,0}, 6,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0}, 7,0,1,2,0,arab_tag,FALSE},{{0,0,1,0,0,0},10,0,1,2,0,arab_tag,FALSE}, {{0,0,0,0,0,0},11,0,1,2,0,arab_tag,FALSE},{{0,0,0,0,0,0},13,0,0,0,0,-1,FALSE}}; + /* Arabic numerals and punctuation. */ + static const WCHAR test58[] = {0x0661, 0x0662, 0x066c, 0x0663, 0x0664, 0x0665, 0x066c, /* ١٢٬٣٤٥٬ */ + 0x0666, 0x0667, 0x0668, 0x066b, 0x0669, 0x0660}; /* ٦٧٨٫٩٠ */ + static const itemTest t581[] = {{{0,1,0,1,0,0}, 0,0,1,2,0,arab_tag,FALSE}, + {{1,1,1,1,1,0},13,0,0,0,0,-1,FALSE}}; + static const itemTest t582[] = {{{0,1,1,1,0,1}, 0,0,0,0,1,arab_tag,FALSE}, + {{1,1,1,1,1,0},13,0,0,0,0,-1,FALSE}}; + static const itemTest t583[] = {{{0,0,0,0,0,0}, 0,0,1,2,0,arab_tag,FALSE}, + {{1,0,0,1,1,0},13,0,0,0,0,-1,FALSE}}; SCRIPT_ITEM items[15]; SCRIPT_CONTROL Control; @@ -670,6 +680,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test47,26,NULL,NULL,1,t471,FALSE,0); test_items_ok(test56,6,NULL,NULL,1,t561,FALSE,0); test_items_ok(test57,13,NULL,NULL,7,t571,FALSE,0); + test_items_ok(test58,13,NULL,NULL,1,t581,TRUE,0); State.uBidiLevel = 0; test_items_ok(test1,4,&Control,&State,1,t11,FALSE,0); @@ -734,6 +745,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test55,8,&Control,&State,2,t551,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0); test_items_ok(test57,13,&Control,&State,7,t572,FALSE,0); + test_items_ok(test58,13,&Control,&State,1,t581,TRUE,0); State.uBidiLevel = 1; test_items_ok(test1,4,&Control,&State,1,t12,FALSE,0); @@ -790,6 +802,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0); test_items_ok(test57,13,&Control,&State,7,t574,FALSE,0); + test_items_ok(test58,13,&Control,&State,1,t583,TRUE,0); State.uBidiLevel = 1; Control.fMergeNeutralItems = TRUE; @@ -847,6 +860,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test47,26,&Control,&State,1,t472,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t561,FALSE,0); test_items_ok(test57,13,&Control,&State,7,t574,FALSE,0); + test_items_ok(test58,13,&Control,&State,1,t583,TRUE,0); State.uBidiLevel = 0; Control.fMergeNeutralItems = FALSE; @@ -913,6 +927,7 @@ static const itemTest t74[4] = {{{0,0,0,0,0,0},0,0,0,0,1,latn_tag,FALSE}, test_items_ok(test55,8,&Control,&State,2,t552,FALSE,0); test_items_ok(test56,6,&Control,&State,1,t562,FALSE,0); test_items_ok(test57,13,&Control,&State,7,t573,FALSE,0); + test_items_ok(test58,13,&Control,&State,1,t582,TRUE,0); } static inline void _test_shape_ok(int valid, HDC hdc, LPCWSTR string,
1
0
0
0
Alexandre Julliard : user32: Remove redundant system menu handle checks.
by Alexandre Julliard
08 Jun '16
08 Jun '16
Module: wine Branch: master Commit: ac2b288b27f5aed3c426528e8b3e77b0766958cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac2b288b27f5aed3c426528e8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 8 16:12:46 2016 +0900 user32: Remove redundant system menu handle checks. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/defwnd.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 68d9480..244e544 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -298,10 +298,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa { LONG hitcode; POINT pt; - WND *wndPtr = WIN_GetPtr( hwnd ); - HMENU hMenu = wndPtr->hSysMenu; - WIN_ReleasePtr( wndPtr ); - if (!hMenu) return 0; pt.x = (short)LOWORD(lParam); pt.y = (short)HIWORD(lParam); hitcode = NC_HandleNCHitTest(hwnd, pt); @@ -315,16 +311,11 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa break; case WM_POPUPSYSTEMMENU: - { - /* This is an undocumented message used by the windows taskbar to - display the system menu of windows that belong to other processes. */ - HMENU menu = GetSystemMenu(hwnd, FALSE); - - if (menu) - TrackPopupMenu(menu, TPM_LEFTBUTTON|TPM_RIGHTBUTTON, - LOWORD(lParam), HIWORD(lParam), 0, hwnd, NULL); - return 0; - } + /* This is an undocumented message used by the windows taskbar to + display the system menu of windows that belong to other processes. */ + TrackPopupMenu( GetSystemMenu(hwnd, FALSE), TPM_LEFTBUTTON|TPM_RIGHTBUTTON, + (short)LOWORD(lParam), (short)HIWORD(lParam), 0, hwnd, NULL ); + return 0; case WM_NCACTIVATE: return NC_HandleNCActivate( hwnd, wParam, lParam );
1
0
0
0
← Newer
1
...
43
44
45
46
47
48
49
...
60
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
Results per page:
10
25
50
100
200