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
July 2008
----- 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
3 participants
1114 discussions
Start a n
N
ew thread
James Hawkins : fusion: The VersionLength member is not constant, so dynamically load the metadata header.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: 8f985a338abcf9ed7dbf1c549f69a6a470c332c5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f985a338abcf9ed7dbf1c549…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jul 16 10:51:54 2008 -0500 fusion: The VersionLength member is not constant, so dynamically load the metadata header. --- dlls/fusion/assembly.c | 49 ++++++++++++++++++++++++++++++++++++++------- dlls/fusion/fusionpriv.h | 6 ++-- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/dlls/fusion/assembly.c b/dlls/fusion/assembly.c index 5bc8725..56ad060 100644 --- a/dlls/fusion/assembly.c +++ b/dlls/fusion/assembly.c @@ -271,22 +271,54 @@ static HRESULT parse_clr_tables(ASSEMBLY *assembly, ULONG offset) return S_OK; } +static HRESULT parse_metadata_header(ASSEMBLY *assembly, DWORD *hdrsz) +{ + METADATAHDR *metadatahdr; + BYTE *ptr, *dest; + DWORD size, ofs; + ULONG rva; + + rva = assembly->corhdr->MetaData.VirtualAddress; + ptr = ImageRvaToVa(assembly->nthdr, assembly->data, rva, NULL); + if (!ptr) + return E_FAIL; + + metadatahdr = (METADATAHDR *)ptr; + + assembly->metadatahdr = HeapAlloc(GetProcessHeap(), 0, sizeof(METADATAHDR)); + if (!assembly->metadatahdr) + return E_OUTOFMEMORY; + + size = FIELD_OFFSET(METADATAHDR, Version); + memcpy(assembly->metadatahdr, metadatahdr, size); + + /* we don't care about the version string */ + + ofs = FIELD_OFFSET(METADATAHDR, Flags); + ptr += FIELD_OFFSET(METADATAHDR, Version) + metadatahdr->VersionLength + 1; + dest = (BYTE *)assembly->metadatahdr + ofs; + memcpy(dest, ptr, sizeof(METADATAHDR) - ofs); + + *hdrsz = sizeof(METADATAHDR) - sizeof(LPSTR) + metadatahdr->VersionLength + 1; + + return S_OK; +} + static HRESULT parse_clr_metadata(ASSEMBLY *assembly) { METADATASTREAMHDR *streamhdr; ULONG rva, i, ofs; LPSTR stream; HRESULT hr; + DWORD hdrsz; BYTE *ptr; - rva = assembly->corhdr->MetaData.VirtualAddress; - assembly->metadatahdr = ImageRvaToVa(assembly->nthdr, assembly->data, - rva, NULL); - if (!assembly->metadatahdr) - return E_FAIL; + hr = parse_metadata_header(assembly, &hdrsz); + if (FAILED(hr)) + return hr; - ptr = ImageRvaToVa(assembly->nthdr, assembly->data, - rva + sizeof(METADATAHDR), NULL); + rva = assembly->corhdr->MetaData.VirtualAddress; + ptr = ImageRvaToVa(assembly->nthdr, assembly->data, rva + hdrsz, NULL); if (!ptr) return E_FAIL; @@ -393,7 +425,7 @@ HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file) return S_OK; failed: - assembly_release( assembly ); + assembly_release(assembly); return hr; } @@ -402,6 +434,7 @@ HRESULT assembly_release(ASSEMBLY *assembly) if (!assembly) return S_OK; + HeapFree(GetProcessHeap(), 0, assembly->metadatahdr); HeapFree(GetProcessHeap(), 0, assembly->path); UnmapViewOfFile(assembly->data); CloseHandle(assembly->hmap); diff --git a/dlls/fusion/fusionpriv.h b/dlls/fusion/fusionpriv.h index 08a2d5c..a4e6193 100644 --- a/dlls/fusion/fusionpriv.h +++ b/dlls/fusion/fusionpriv.h @@ -27,6 +27,8 @@ #include "winbase.h" #include "winuser.h" +#include <pshpack1.h> + typedef struct { ULONG Signature; @@ -34,13 +36,11 @@ typedef struct USHORT MinorVersion; ULONG Reserved; ULONG VersionLength; - BYTE Version[12]; + LPSTR Version; BYTE Flags; WORD Streams; } METADATAHDR; -#include <pshpack1.h> - typedef struct { DWORD Offset;
1
0
0
0
James Hawkins : fusion: Load the table row numbers before calculating the table offsets.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: 378fde9acfbb87a5f1bc17b16d8ab6e82bc3aeb4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=378fde9acfbb87a5f1bc17b16…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jul 16 10:51:06 2008 -0500 fusion: Load the table row numbers before calculating the table offsets. --- dlls/fusion/assembly.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/fusion/assembly.c b/dlls/fusion/assembly.c index bbe8a76..5bc8725 100644 --- a/dlls/fusion/assembly.c +++ b/dlls/fusion/assembly.c @@ -241,9 +241,17 @@ static HRESULT parse_clr_tables(ASSEMBLY *assembly, ULONG offset) memset(assembly->tables, -1, MAX_CLR_TABLES * sizeof(CLRTABLE)); if (assembly->tableshdr->MaskValid.u.LowPart & 1) - { assembly->tables[0].offset = currofs; - assembly->tables[0].rows = assembly->numrows[0]; + + offidx = 0; + for (i = 0; i < MAX_CLR_TABLES; i++) + { + if ((i < 32 && (assembly->tableshdr->MaskValid.u.LowPart >> i) & 1) || + (i >= 32 && (assembly->tableshdr->MaskValid.u.HighPart >> i) & 1)) + { + assembly->tables[i].rows = assembly->numrows[offidx]; + offidx++; + } } previ = 0; @@ -255,7 +263,6 @@ static HRESULT parse_clr_tables(ASSEMBLY *assembly, ULONG offset) { currofs += COR_TABLE_SIZES[previ] * assembly->numrows[offidx - 1]; assembly->tables[i].offset = currofs; - assembly->tables[i].rows = assembly->numrows[offidx]; offidx++; previ = i; }
1
0
0
0
James Hawkins : fusion: Allow parsing the blob stream without a #.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: 8a7b76fefac7a7be52703d37cb01956890a5e678 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a7b76fefac7a7be52703d37c…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Wed Jul 16 10:49:24 2008 -0500 fusion: Allow parsing the blob stream without a #. --- dlls/fusion/assembly.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/fusion/assembly.c b/dlls/fusion/assembly.c index 94ea542..bbe8a76 100644 --- a/dlls/fusion/assembly.c +++ b/dlls/fusion/assembly.c @@ -299,7 +299,7 @@ static HRESULT parse_clr_metadata(ASSEMBLY *assembly) } else if (!lstrcmpA(stream, "#Strings") || !lstrcmpA(stream, "Strings")) assembly->strings = (BYTE *)assembly_data_offset(assembly, ofs); - else if (!lstrcmpA(stream, "#Blob")) + else if (!lstrcmpA(stream, "#Blob") || !lstrcmpA(stream, "Blob")) assembly->blobs = (BYTE *)assembly_data_offset(assembly, ofs); ptr += lstrlenA(stream);
1
0
0
0
Detlef Riekenberg : winetest: Run tests again on Win9x.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: fbc9dc109c2a2fe658663ff216e6b107064e8f2d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fbc9dc109c2a2fe658663ff21…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Wed Jul 16 18:33:12 2008 +0200 winetest: Run tests again on Win9x. --- programs/winetest/main.c | 16 ++++++++++++++++ programs/winetest/send.c | 8 ++++++++ 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 9d04e90..04eaae4 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -346,6 +346,14 @@ get_subtests (const char *tempdir, struct wine_test *test, LPTSTR res_name) subfile = CreateFileA( subname, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, &sa, CREATE_ALWAYS, 0, NULL ); + + if ((subfile == INVALID_HANDLE_VALUE) && + (GetLastError() == ERROR_INVALID_PARAMETER)) { + /* FILE_SHARE_DELETE not supported on win9x */ + subfile = CreateFileA( subname, GENERIC_READ|GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + &sa, CREATE_ALWAYS, 0, NULL ); + } if (subfile == INVALID_HANDLE_VALUE) { report (R_ERROR, "Can't open subtests output of %s: %u", test->name, GetLastError()); @@ -474,6 +482,14 @@ run_tests (char *logname) logfile = CreateFileA( logname, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, &sa, CREATE_ALWAYS, 0, NULL ); + + if ((logfile == INVALID_HANDLE_VALUE) && + (GetLastError() == ERROR_INVALID_PARAMETER)) { + /* FILE_SHARE_DELETE not supported on win9x */ + logfile = CreateFileA( logname, GENERIC_READ|GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + &sa, CREATE_ALWAYS, 0, NULL ); + } if (logfile == INVALID_HANDLE_VALUE) report (R_FATAL, "Could not open logfile: %u", GetLastError()); diff --git a/programs/winetest/send.c b/programs/winetest/send.c index dc25bd2..c8372f3 100644 --- a/programs/winetest/send.c +++ b/programs/winetest/send.c @@ -134,6 +134,14 @@ send_file (const char *name) file = CreateFileA( name, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL ); + + if ((file == INVALID_HANDLE_VALUE) && + (GetLastError() == ERROR_INVALID_PARAMETER)) { + /* FILE_SHARE_DELETE not supported on win9x */ + file = CreateFileA( name, GENERIC_READ, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, 0, NULL ); + } if (file == INVALID_HANDLE_VALUE) { report (R_WARNING, "Can't open file '%s': %u", name, GetLastError());
1
0
0
0
Zhangrong Huang : msxml3: Add support for accessing CDATASection node.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: c4ac69b7556bccafe9fe0825dd3552d64877a263 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c4ac69b7556bccafe9fe0825d…
Author: Zhangrong Huang <hzhrong(a)gmail.com> Date: Wed Jul 16 23:41:14 2008 +0800 msxml3: Add support for accessing CDATASection node. --- dlls/msxml3/node.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 8ace2ea..583e0e1 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -1446,6 +1446,9 @@ IXMLDOMNode *create_node( xmlNodePtr node ) case XML_TEXT_NODE: pUnk = create_text( node ); break; + case XML_CDATA_SECTION_NODE: + pUnk = create_cdata( node ); + break; case XML_COMMENT_NODE: pUnk = create_comment( node ); break;
1
0
0
0
Zhangrong Huang : msxml3: Add support for accessing document node.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: 89f1bfabe3ed9fc7fccc1c413735e40de3a1d1bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89f1bfabe3ed9fc7fccc1c413…
Author: Zhangrong Huang <hzhrong(a)gmail.com> Date: Wed Jul 16 20:13:18 2008 +0800 msxml3: Add support for accessing document node. --- dlls/msxml3/domdoc.c | 14 ++++++++++++++ dlls/msxml3/msxml_private.h | 2 +- dlls/msxml3/node.c | 4 ++-- dlls/msxml3/tests/domdoc.c | 12 +----------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c index 59ea8c5..3952b5e 100644 --- a/dlls/msxml3/domdoc.c +++ b/dlls/msxml3/domdoc.c @@ -2287,6 +2287,20 @@ HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj) return hr; } +IUnknown* create_domdoc( xmlNodePtr document ) +{ + HRESULT hr; + LPVOID pObj = NULL; + + TRACE("(%p)\n", document); + + hr = DOMDocument_create_from_xmldoc((xmlDocPtr)document, (IXMLDOMDocument2**)&pObj); + if (FAILED(hr)) + return NULL; + + return (IUnknown*)pObj; +} + #else HRESULT DOMDocument_create(IUnknown *pUnkOuter, LPVOID *ppObj) diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index 34e4800..c365a11 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -32,7 +32,7 @@ #endif /* constructors */ -extern IUnknown *create_domdoc( void ); +extern IUnknown *create_domdoc( xmlNodePtr document ); extern IUnknown *create_xmldoc( void ); extern IXMLDOMNode *create_node( xmlNodePtr node ); extern IUnknown *create_basic_node( xmlNodePtr node, IUnknown *pUnkOuter ); diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index 6b1d6b0..8ace2ea 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -1450,8 +1450,8 @@ IXMLDOMNode *create_node( xmlNodePtr node ) pUnk = create_comment( node ); break; case XML_DOCUMENT_NODE: - ERR("shouldn't be here!\n"); - return NULL; + pUnk = create_domdoc( node ); + break; default: FIXME("only creating basic node for type %d\n", node->type); pUnk = create_basic_node( node, NULL ); diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 19a9a2f..7c64f6c 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -330,8 +330,7 @@ static void node_to_string(IXMLDOMNode *node, char *buf) * results we "fix" it */ if (r == S_OK) ole_check(IXMLDOMNode_get_nodeType(new_node, &parent_type)); - /* we need also to workaround the no document node problem - see below */ - if (((r == S_FALSE && type != NODE_DOCUMENT) || parent_type == NODE_DOCUMENT) && type != NODE_PROCESSING_INSTRUCTION && pos==1) + if ((parent_type == NODE_DOCUMENT) && type != NODE_PROCESSING_INSTRUCTION && pos==1) { todo_wine ok(FALSE, "The first child of the document node in MSXML is the <?xml ... ?> processing instruction\n"); pos++; @@ -347,15 +346,6 @@ static void node_to_string(IXMLDOMNode *node, char *buf) *(buf++) = '.'; } - /* currently we can't access document node in wine. All our examples this is the - * root node so to be able to test query results we add it */ - if (type != NODE_DOCUMENT) - { - todo_wine ok(FALSE, "Document node is not the last returned node!\n"); - *(buf++) = '.'; - *(buf++) = 'D'; - *(buf++) = '1'; - } *buf = 0; }
1
0
0
0
Mikołaj Zalewski : comctl32: statusbar: WM_CREATE should not resize the window - it should happen in WM_SIZE.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: 1e43f207cd5a2436928cf50f115d33a1b86bbdf0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1e43f207cd5a2436928cf50f1…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Wed Jul 16 15:25:43 2008 +0200 comctl32: statusbar: WM_CREATE should not resize the window - it should happen in WM_SIZE. --- dlls/comctl32/status.c | 6 +--- dlls/comctl32/tests/status.c | 65 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 61 insertions(+), 10 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index f7e3033..33ffcbf 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -913,7 +913,7 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) NONCLIENTMETRICSW nclm; DWORD dwStyle; RECT rect; - int width, len, textHeight = 0; + int len, textHeight = 0; HDC hdc; TRACE("\n"); @@ -1006,8 +1006,6 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) if (!(dwStyle & CCS_NORESIZE)) { /* don't resize wnd if it doesn't want it ! */ HTHEME theme; - GetClientRect (infoPtr->Notify, &rect); - width = rect.right - rect.left; infoPtr->height = textHeight + 4 + infoPtr->verticalBorder; if ((theme = GetWindowTheme (hwnd))) @@ -1025,8 +1023,6 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) ReleaseDC (hwnd, hdc); } - SetWindowPos(hwnd, 0, lpCreate->x, lpCreate->y - 1, - width, infoPtr->height, SWP_NOZORDER); STATUSBAR_SetPartBounds (infoPtr); } diff --git a/dlls/comctl32/tests/status.c b/dlls/comctl32/tests/status.c index 4e643c1..18501fb 100644 --- a/dlls/comctl32/tests/status.c +++ b/dlls/comctl32/tests/status.c @@ -24,9 +24,16 @@ #include "wine/test.h" -#define expect(expected,got) ok (expected == got,"Expected %d, got %d\n",expected,got); +#define expect(expected,got) ok (expected == got,"Expected %d, got %d\n",expected,got) +#define expect_rect(_left,_top,_right,_bottom,got) do { RECT _rcExp = {_left, _top, _right, _bottom}; \ + ok(memcmp(&_rcExp, &(got), sizeof(RECT)) == 0, "Expected rect {%d,%d, %d,%d}, got {%d,%d, %d,%d}\n", \ + _rcExp.left, _rcExp.top, _rcExp.right, _rcExp.bottom, \ + (got).left, (got).top, (got).right, (got).bottom); } while (0) static HINSTANCE hinst; +static WNDPROC g_status_wndproc; +static RECT g_rcCreated; +static HWND g_hMainWnd; static HWND create_status_control(DWORD style, DWORD exstyle) { @@ -42,6 +49,48 @@ static HWND create_status_control(DWORD style, DWORD exstyle) return hWndStatus; } +static LRESULT WINAPI create_test_wndproc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + if (msg == WM_CREATE) + { + CREATESTRUCT *cs = (CREATESTRUCT *)lParam; + LRESULT ret = CallWindowProc(g_status_wndproc, hwnd, msg, wParam, lParam); + GetWindowRect(hwnd, &g_rcCreated); + MapWindowPoints(HWND_DESKTOP, g_hMainWnd, (LPPOINT)&g_rcCreated, 2); + ok(cs->x == g_rcCreated.left, "CREATESTRUCT.x modified\n"); + ok(cs->y == g_rcCreated.top, "CREATESTRUCT.y modified\n"); + return ret; + } + return CallWindowProc(g_status_wndproc, hwnd, msg, wParam, lParam); +} + +static void test_create() +{ + WNDCLASSEX cls; + RECT rc; + HWND hwnd; + + cls.cbSize = sizeof(WNDCLASSEX); + GetClassInfoEx(NULL, STATUSCLASSNAME, &cls); + g_status_wndproc = cls.lpfnWndProc; + cls.lpfnWndProc = create_test_wndproc; + cls.lpszClassName = "MyStatusBar"; + cls.hInstance = NULL; + ok(RegisterClassEx(&cls), "RegisterClassEx failed\n"); + + ok((hwnd = CreateWindowA("MyStatusBar", "", WS_CHILD|WS_VISIBLE|SBARS_SIZEGRIP, 0, 0, 100, 100, + g_hMainWnd, NULL, NULL, 0)) != NULL, "CreateWindowA failed\n"); + MapWindowPoints(HWND_DESKTOP, g_hMainWnd, (LPPOINT)&rc, 2); + GetWindowRect(hwnd, &rc); + MapWindowPoints(HWND_DESKTOP, g_hMainWnd, (LPPOINT)&rc, 2); + expect_rect(0, 0, 100, 100, g_rcCreated); + expect(0, rc.left); + expect(672, rc.right); + expect(226, rc.bottom); + /* we don't check rc.top as this may depend on user font settings */ + DestroyWindow(hwnd); +} + static void test_status_control(void) { HWND hWndStatus; @@ -56,7 +105,7 @@ static void test_status_control(void) hWndStatus = create_status_control(WS_VISIBLE, 0); /* Divide into parts and set text */ - r = SendMessage(hWndStatus, SB_SETPARTS, 3, (long)nParts); + r = SendMessage(hWndStatus, SB_SETPARTS, 3, (LPARAM)nParts); expect(TRUE,r); r = SendMessage(hWndStatus, SB_SETTEXT, 0, (LPARAM)"First"); expect(TRUE,r); @@ -87,12 +136,12 @@ static void test_status_control(void) expect(0,HIWORD(r)); /* Get parts and borders */ - r = SendMessage(hWndStatus, SB_GETPARTS, 3, (long)checkParts); + r = SendMessage(hWndStatus, SB_GETPARTS, 3, (LPARAM)checkParts); ok(r == 3, "Expected 3, got %d\n", r); expect(50,checkParts[0]); expect(150,checkParts[1]); expect(-1,checkParts[2]); - r = SendMessage(hWndStatus, SB_GETBORDERS, 0, (long)borders); + r = SendMessage(hWndStatus, SB_GETBORDERS, 0, (LPARAM)borders); ok(r == TRUE, "Expected TRUE, got %d\n", r); expect(0,borders[0]); expect(2,borders[1]); @@ -151,7 +200,7 @@ static void test_status_control(void) expect(TRUE,r); /* Reset number of parts */ - r = SendMessage(hWndStatus, SB_SETPARTS, 2, (long)nParts); + r = SendMessage(hWndStatus, SB_SETPARTS, 2, (LPARAM)nParts); expect(TRUE,r); /* Set the minimum height and get rectangle information again */ @@ -190,7 +239,13 @@ START_TEST(status) { hinst = GetModuleHandleA(NULL); + g_hMainWnd = CreateWindowExA(0, "static", "", WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, 672+2*GetSystemMetrics(SM_CXSIZEFRAME), + 226+GetSystemMetrics(SM_CYCAPTION)+2*GetSystemMetrics(SM_CYSIZEFRAME), + NULL, NULL, GetModuleHandleA(NULL), 0); + InitCommonControls(); test_status_control(); + test_create(); }
1
0
0
0
Mikołaj Zalewski : comctl32: statusbar: Rename NtfUnicode to bUnicode to make is more consistent with other controls , use NF_REQUERY in WM_CREATE.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: 0cb74db9921c53c96b542d02d42528b9cf86001e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0cb74db9921c53c96b542d02d…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Wed Jul 16 12:09:12 2008 +0200 comctl32: statusbar: Rename NtfUnicode to bUnicode to make is more consistent with other controls, use NF_REQUERY in WM_CREATE. --- dlls/comctl32/status.c | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index d1d4893..f7e3033 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -77,7 +77,7 @@ typedef struct HFONT hFont; HFONT hDefaultFont; COLORREF clrBk; /* background color */ - BOOL NtfUnicode; /* notify format */ + BOOL bUnicode; /* notify format. TRUE if notifies in Unicode */ STATUSWINDOWPART part0; /* simple window */ STATUSWINDOWPART* parts; INT horizontalBorder; @@ -100,6 +100,8 @@ static const WCHAR themeClass[] = { 'S','t','a','t','u','s',0 }; /* prototype */ static void STATUSBAR_SetPartBounds (STATUS_INFO *infoPtr); +static LRESULT +STATUSBAR_NotifyFormat (STATUS_INFO *infoPtr, HWND from, INT cmd); static inline LPCSTR debugstr_t(LPCWSTR text, BOOL isW) { @@ -844,10 +846,10 @@ STATUSBAR_SetTipTextW (const STATUS_INFO *infoPtr, INT id, LPWSTR text) static inline LRESULT STATUSBAR_SetUnicodeFormat (STATUS_INFO *infoPtr, BOOL bUnicode) { - BOOL bOld = infoPtr->NtfUnicode; + BOOL bOld = infoPtr->bUnicode; TRACE("(0x%x)\n", bUnicode); - infoPtr->NtfUnicode = bUnicode; + infoPtr->bUnicode = bUnicode; return bOld; } @@ -911,7 +913,7 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) NONCLIENTMETRICSW nclm; DWORD dwStyle; RECT rect; - int i, width, len, textHeight = 0; + int width, len, textHeight = 0; HDC hdc; TRACE("\n"); @@ -930,8 +932,7 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) infoPtr->verticalBorder = VERT_BORDER; infoPtr->horizontalGap = HORZ_GAP; - i = SendMessageW(infoPtr->Notify, WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY); - infoPtr->NtfUnicode = (i == NFR_UNICODE); + STATUSBAR_NotifyFormat(infoPtr, infoPtr->Notify, NF_REQUERY); GetClientRect (hwnd, &rect); InvalidateRect (hwnd, &rect, 0); @@ -1182,9 +1183,9 @@ STATUSBAR_NotifyFormat (STATUS_INFO *infoPtr, HWND from, INT cmd) { if (cmd == NF_REQUERY) { INT i = SendMessageW(from, WM_NOTIFYFORMAT, (WPARAM)infoPtr->Self, NF_QUERY); - infoPtr->NtfUnicode = (i == NFR_UNICODE); + infoPtr->bUnicode = (i == NFR_UNICODE); } - return infoPtr->NtfUnicode ? NFR_UNICODE : NFR_ANSI; + return infoPtr->bUnicode ? NFR_UNICODE : NFR_ANSI; } @@ -1249,7 +1250,7 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return STATUSBAR_GetTipTextW (infoPtr, LOWORD(wParam), (LPWSTR)lParam, HIWORD(wParam)); case SB_GETUNICODEFORMAT: - return infoPtr->NtfUnicode; + return infoPtr->bUnicode; case SB_ISSIMPLE: return infoPtr->simple;
1
0
0
0
Mikołaj Zalewski : comctl32: statusbar: Window is always Unicode, CCM_SETUNICODEFORMAT should change the notify format.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: 7f97372a892fdfced4a8c8d6b9f797e33b888cdc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f97372a892fdfced4a8c8d6b…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Wed Jul 16 12:04:30 2008 +0200 comctl32: statusbar: Window is always Unicode, CCM_SETUNICODEFORMAT should change the notify format. --- dlls/comctl32/status.c | 61 ++++++++++++----------------------------------- 1 files changed, 16 insertions(+), 45 deletions(-) diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index 464e650..d1d4893 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -77,7 +77,6 @@ typedef struct HFONT hFont; HFONT hDefaultFont; COLORREF clrBk; /* background color */ - BOOL bUnicode; /* unicode flag */ BOOL NtfUnicode; /* notify format */ STATUSWINDOWPART part0; /* simple window */ STATUSWINDOWPART* parts; @@ -845,10 +844,10 @@ STATUSBAR_SetTipTextW (const STATUS_INFO *infoPtr, INT id, LPWSTR text) static inline LRESULT STATUSBAR_SetUnicodeFormat (STATUS_INFO *infoPtr, BOOL bUnicode) { - BOOL bOld = infoPtr->bUnicode; + BOOL bOld = infoPtr->NtfUnicode; TRACE("(0x%x)\n", bUnicode); - infoPtr->bUnicode = bUnicode; + infoPtr->NtfUnicode = bUnicode; return bOld; } @@ -961,24 +960,11 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate) OpenThemeData (hwnd, themeClass); - if (IsWindowUnicode (hwnd)) { - infoPtr->bUnicode = TRUE; - if (lpCreate->lpszName && - (len = strlenW ((LPCWSTR)lpCreate->lpszName))) { - infoPtr->parts[0].text = Alloc ((len + 1)*sizeof(WCHAR)); - if (!infoPtr->parts[0].text) goto create_fail; - strcpyW (infoPtr->parts[0].text, (LPCWSTR)lpCreate->lpszName); - } - } - else { - if (lpCreate->lpszName && - (len = strlen((LPCSTR)lpCreate->lpszName))) { - DWORD lenW = MultiByteToWideChar( CP_ACP, 0, (LPCSTR)lpCreate->lpszName, -1, NULL, 0 ); - infoPtr->parts[0].text = Alloc (lenW*sizeof(WCHAR)); - if (!infoPtr->parts[0].text) goto create_fail; - MultiByteToWideChar( CP_ACP, 0, (LPCSTR)lpCreate->lpszName, -1, - infoPtr->parts[0].text, lenW ); - } + if (lpCreate->lpszName && (len = strlenW ((LPCWSTR)lpCreate->lpszName))) + { + infoPtr->parts[0].text = Alloc ((len + 1)*sizeof(WCHAR)); + if (!infoPtr->parts[0].text) goto create_fail; + strcpyW (infoPtr->parts[0].text, (LPCWSTR)lpCreate->lpszName); } dwStyle = GetWindowLongW (hwnd, GWL_STYLE); @@ -1062,17 +1048,11 @@ STATUSBAR_WMGetText (const STATUS_INFO *infoPtr, INT size, LPWSTR buf) TRACE("\n"); if (!(infoPtr->parts[0].text)) return 0; - if (infoPtr->bUnicode) - len = strlenW (infoPtr->parts[0].text); - else - len = WideCharToMultiByte( CP_ACP, 0, infoPtr->parts[0].text, -1, NULL, 0, NULL, NULL )-1; + + len = strlenW (infoPtr->parts[0].text); if (size > len) { - if (infoPtr->bUnicode) - strcpyW (buf, infoPtr->parts[0].text); - else - WideCharToMultiByte( CP_ACP, 0, infoPtr->parts[0].text, -1, - (LPSTR)buf, len+1, NULL, NULL ); + strcpyW (buf, infoPtr->parts[0].text); return len; } @@ -1145,20 +1125,11 @@ STATUSBAR_WMSetText (const STATUS_INFO *infoPtr, LPCSTR text) /* duplicate string */ Free (part->text); part->text = 0; - if (infoPtr->bUnicode) { - if (text && (len = strlenW((LPCWSTR)text))) { - part->text = Alloc ((len+1)*sizeof(WCHAR)); - if (!part->text) return FALSE; - strcpyW (part->text, (LPCWSTR)text); - } - } - else { - if (text && (len = lstrlenA(text))) { - DWORD lenW = MultiByteToWideChar( CP_ACP, 0, text, -1, NULL, 0 ); - part->text = Alloc (lenW*sizeof(WCHAR)); - if (!part->text) return FALSE; - MultiByteToWideChar( CP_ACP, 0, text, -1, part->text, lenW ); - } + + if (text && (len = strlenW((LPCWSTR)text))) { + part->text = Alloc ((len+1)*sizeof(WCHAR)); + if (!part->text) return FALSE; + strcpyW (part->text, (LPCWSTR)text); } InvalidateRect(infoPtr->Self, &part->bound, FALSE); @@ -1278,7 +1249,7 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return STATUSBAR_GetTipTextW (infoPtr, LOWORD(wParam), (LPWSTR)lParam, HIWORD(wParam)); case SB_GETUNICODEFORMAT: - return infoPtr->bUnicode; + return infoPtr->NtfUnicode; case SB_ISSIMPLE: return infoPtr->simple;
1
0
0
0
Philip Nilsson : wined3d: Enable filtering for D3DFMT_A4R4G4B4.
by Alexandre Julliard
16 Jul '08
16 Jul '08
Module: wine Branch: master Commit: 9528b1c63e34c5310b5aefaa53d9814b10cc6550 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9528b1c63e34c5310b5aefaa5…
Author: Philip Nilsson <pnilsson(a)nullref.se> Date: Sun Jul 13 21:41:45 2008 +0200 wined3d: Enable filtering for D3DFMT_A4R4G4B4. This patch enables texture filtering for textures using the A4R4G4B4 format, I can see no reason why it shouldn't be filtered (especially considering X4R4G4B4 has it). --- dlls/wined3d/utils.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 6093b32..40c154d 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -188,7 +188,7 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = { {WINED3DFMT_A1R5G5B5 ,GL_RGB5_A1 ,GL_RGB5_A1 , 0, GL_BGRA ,GL_UNSIGNED_SHORT_1_5_5_5_REV ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING }, {WINED3DFMT_A4R4G4B4 ,GL_RGBA4 ,GL_SRGB8_ALPHA8_EXT , 0, GL_BGRA ,GL_UNSIGNED_SHORT_4_4_4_4_REV - ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING }, + ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING }, {WINED3DFMT_R3G3B2 ,GL_R3_G3_B2 ,GL_R3_G3_B2 , 0, GL_RGB ,GL_UNSIGNED_BYTE_3_3_2 ,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING }, {WINED3DFMT_A8 ,GL_ALPHA8 ,GL_ALPHA8 , 0, GL_ALPHA ,GL_UNSIGNED_BYTE
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
112
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200