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
July
June
May
April
March
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
October 2012
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
960 discussions
Start a n
N
ew thread
Christian Costa : quartz: Fill right RECT structure in SetDefaultTargetRec.
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: 03086e87ffbf8a59f7a0a71e45fba35e810ef3b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=03086e87ffbf8a59f7a0a71e4…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Sun Oct 7 22:01:08 2012 +0200 quartz: Fill right RECT structure in SetDefaultTargetRec. --- dlls/quartz/videorenderer.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index a045ba8..5e78c55 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -599,10 +599,10 @@ static HRESULT WINAPI VideoRenderer_SetDefaultTargetRect(BaseControlVideo* iface if (!GetClientRect(This->baseControlWindow.baseWindow.hWnd, &rect)) return E_FAIL; - This->SourceRect.left = 0; - This->SourceRect.top = 0; - This->SourceRect.right = rect.right; - This->SourceRect.bottom = rect.bottom; + This->DestRect.left = 0; + This->DestRect.top = 0; + This->DestRect.right = rect.right; + This->DestRect.bottom = rect.bottom; return S_OK; }
1
0
0
0
Christian Costa : quartz: Forward IMediaControl_RenderFile to IFilterGraph2_RenderFile.
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: 7ea44c0007c432b3ef1f6431e0d112a736e79bad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ea44c0007c432b3ef1f6431e…
Author: Christian Costa <titan.costa(a)gmail.com> Date: Sun Oct 7 22:01:00 2012 +0200 quartz: Forward IMediaControl_RenderFile to IFilterGraph2_RenderFile. --- dlls/quartz/filtergraph.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 239cf0b..58d8588 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2091,9 +2091,9 @@ static HRESULT WINAPI MediaControl_RenderFile(IMediaControl *iface, BSTR strFile { IFilterGraphImpl *This = impl_from_IMediaControl(iface); - FIXME("(%p/%p)->(%s (%p)): stub !!!\n", This, iface, debugstr_w(strFilename), strFilename); + TRACE("(%p/%p)->(%s (%p))\n", This, iface, debugstr_w(strFilename), strFilename); - return S_OK; + return IFilterGraph2_RenderFile(&This->IFilterGraph2_iface, strFilename, NULL); } static HRESULT WINAPI MediaControl_AddSourceFilter(IMediaControl *iface, BSTR strFilename,
1
0
0
0
Jacek Caban : mshtml: Wine Gecko 1.8 release.
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: 0ae458cc94fec9cda7736faf7bd4a2c119c5f717 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ae458cc94fec9cda7736faf7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 9 11:26:18 2012 +0200 mshtml: Wine Gecko 1.8 release. --- dlls/appwiz.cpl/addons.c | 6 +- dlls/mshtml/mshtml_private.h | 2 +- dlls/mshtml/nsiface.idl | 175 ++++++++++++++++++++++++++++++----------- dlls/mshtml/script.c | 4 + 4 files changed, 136 insertions(+), 51 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0ae458cc94fec9cda7736…
1
0
0
0
Jacek Caban : appwiz.cpl: Cache downloaded addon MSI files.
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: d18465088705bfbb39e5ee50bd7660773c9de51f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d18465088705bfbb39e5ee50b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 9 15:48:47 2012 +0200 appwiz.cpl: Cache downloaded addon MSI files. --- dlls/appwiz.cpl/addons.c | 126 ++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 111 insertions(+), 15 deletions(-) diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c index 82a6797..efb6cf0 100644 --- a/dlls/appwiz.cpl/addons.c +++ b/dlls/appwiz.cpl/addons.c @@ -17,10 +17,12 @@ */ #include "config.h" +#include "wine/port.h" #include <stdarg.h> #include <fcntl.h> #include <stdio.h> +#include <errno.h> #ifdef HAVE_UNISTD_H # include <unistd.h> #endif @@ -105,6 +107,10 @@ static const addon_info_t *addon; static HWND install_dialog = NULL; static LPWSTR url = NULL; +static WCHAR * (CDECL *p_wine_get_dos_file_name)(const char*); +static const WCHAR kernel32_dllW[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0}; + + /* SHA definitions are copied from advapi32. They aren't available in headers. */ typedef struct { @@ -153,13 +159,7 @@ static BOOL sha_check(const WCHAR *file_name) sprintf(buf + i*2, "%02x", *((unsigned char*)sha+i)); if(strcmp(buf, addon->sha)) { - WCHAR message[256]; - WARN("Got %s, expected %s\n", buf, addon->sha); - - if(LoadStringW(hInst, IDS_INVALID_SHA, message, sizeof(message)/sizeof(WCHAR))) - MessageBoxW(NULL, message, NULL, MB_ICONERROR); - return FALSE; } @@ -201,9 +201,6 @@ static enum install_res install_from_unix_file(const char *dir, const char *subd int fd, len; enum install_res ret; - static WCHAR * (CDECL *wine_get_dos_file_name)(const char*); - static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0}; - len = strlen(dir); file_path = heap_alloc(len+strlen(subdir)+strlen(file_name)+3); if(!file_path) @@ -228,11 +225,8 @@ static enum install_res install_from_unix_file(const char *dir, const char *subd close(fd); - if(!wine_get_dos_file_name) - wine_get_dos_file_name = (void*)GetProcAddress(GetModuleHandleW(kernel32W), "wine_get_dos_file_name"); - - if(wine_get_dos_file_name) { /* Wine UNIX mode */ - dos_file_name = wine_get_dos_file_name(file_path); + if(p_wine_get_dos_file_name) { /* Wine UNIX mode */ + dos_file_name = p_wine_get_dos_file_name(file_path); if(!dos_file_name) { ERR("Could not get dos file name of %s\n", debugstr_a(file_path)); heap_free(file_path); @@ -334,6 +328,90 @@ static enum install_res install_from_default_dir(void) return ret; } +static WCHAR *get_cache_file_name(BOOL ensure_exists) +{ + const char *home_dir = NULL, *xdg_cache_dir; + size_t len, size = strlen(addon->file_name) + 7; /* strlen("/wine/"), '\0' */ + char *cache_file_name; + WCHAR *ret; + + /* non-Wine (eg. Windows) cache is currently not supported */ + if(!p_wine_get_dos_file_name) + return NULL; + + xdg_cache_dir = getenv("XDG_CACHE_HOME"); + if(xdg_cache_dir && *xdg_cache_dir) { + size += strlen(xdg_cache_dir); + }else { + home_dir = getenv("HOME"); + if(!home_dir) + return NULL; + + size += strlen(home_dir) + 8; /* strlen("/.cache/") */ + } + + cache_file_name = heap_alloc(size); + if(!cache_file_name) + return NULL; + + if(xdg_cache_dir && *xdg_cache_dir) { + len = strlen(xdg_cache_dir); + if(len > 1 && xdg_cache_dir[len-1] == '/') + len--; + memcpy(cache_file_name, xdg_cache_dir, len); + cache_file_name[len] = 0; + }else { + len = strlen(home_dir); + memcpy(cache_file_name, home_dir, len); + strcpy(cache_file_name+len, "/.cache"); + len += 7; + } + + if(ensure_exists && mkdir(cache_file_name, 0777) && errno != EEXIST) { + WARN("%s does not exist and could not be created: %s\n", cache_file_name, strerror(errno)); + heap_free(cache_file_name); + return NULL; + } + + strcpy(cache_file_name+len, "/wine"); + len += 5; + + if(ensure_exists && mkdir(cache_file_name, 0777) && errno != EEXIST) { + WARN("%s does not exist and could not be created: %s\n", cache_file_name, strerror(errno)); + return NULL; + } + + cache_file_name[len++] = '/'; + strcpy(cache_file_name+len, addon->file_name); + ret = p_wine_get_dos_file_name(cache_file_name); + + TRACE("%s -> %s\n", cache_file_name, debugstr_w(ret)); + + heap_free(cache_file_name); + return ret; +} + +static enum install_res install_from_cache(void) +{ + WCHAR *cache_file_name; + enum install_res res; + + cache_file_name = get_cache_file_name(FALSE); + if(!cache_file_name) + return INSTALL_NEXT; + + if(!sha_check(cache_file_name)) { + WARN("could not validate check sum\n"); + DeleteFileW(cache_file_name); + heap_free(cache_file_name); + return INSTALL_NEXT; + } + + res = install_file(cache_file_name); + heap_free(cache_file_name); + return res; +} + static HRESULT WINAPI InstallCallback_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv) { @@ -501,8 +579,23 @@ static DWORD WINAPI download_proc(PVOID arg) return 0; } - if(sha_check(tmp_file)) + if(sha_check(tmp_file)) { + WCHAR *cache_file_name; + install_file(tmp_file); + + cache_file_name = get_cache_file_name(TRUE); + if(cache_file_name) { + MoveFileW(tmp_file, cache_file_name); + heap_free(cache_file_name); + } + }else { + WCHAR message[256]; + + if(LoadStringW(hInst, IDS_INVALID_SHA, message, sizeof(message)/sizeof(WCHAR))) + MessageBoxW(NULL, message, NULL, MB_ICONERROR); + } + DeleteFileW(tmp_file); EndDialog(install_dialog, 0); return 0; @@ -589,6 +682,8 @@ BOOL install_addon(addon_t addon_type) addon = addons_info+addon_type; + p_wine_get_dos_file_name = (void*)GetProcAddress(GetModuleHandleW(kernel32_dllW), "wine_get_dos_file_name"); + /* * Try to find addon .msi file in following order: * - directory stored in $dir_config_key value of HKCU/Wine/Software/$config_key key @@ -599,6 +694,7 @@ BOOL install_addon(addon_t addon_type) */ if (install_from_registered_dir() == INSTALL_NEXT && install_from_default_dir() == INSTALL_NEXT + && install_from_cache() == INSTALL_NEXT && (url = get_url())) DialogBoxW(hInst, addon->dialog_template, 0, installer_proc);
1
0
0
0
Jacek Caban : services: Fixed memory leak.
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: cea783ddda62feeff8ea4197c7ce6c5997ce3a3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cea783ddda62feeff8ea4197c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 9 13:39:29 2012 +0200 services: Fixed memory leak. --- programs/services/rpc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/programs/services/rpc.c b/programs/services/rpc.c index 9031430..bf8ce80 100644 --- a/programs/services/rpc.c +++ b/programs/services/rpc.c @@ -456,8 +456,10 @@ DWORD __cdecl svcctl_CreateServiceW( return err; err = parse_dependencies((LPCWSTR)lpDependencies, entry); - if (err != ERROR_SUCCESS) + if (err != ERROR_SUCCESS) { + free_service_entry(entry); return err; + } entry->ref_count = 1; entry->config.dwServiceType = entry->status.dwServiceType = dwServiceType;
1
0
0
0
Piotr Caban : msvcp60: Added missing 64-bit exports.
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: e920be279f850f96cf00693b632540992c20b4a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e920be279f850f96cf00693b6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Oct 9 13:06:34 2012 +0200 msvcp60: Added missing 64-bit exports. --- dlls/msvcp60/msvcp60.spec | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp60/msvcp60.spec b/dlls/msvcp60/msvcp60.spec index 22a3da8..561fc64 100644 --- a/dlls/msvcp60/msvcp60.spec +++ b/dlls/msvcp60/msvcp60.spec @@ -2280,7 +2280,7 @@ @ cdecl -arch=win32 ?_Init@locale@std@@CAPAV_Locimp@12@XZ() locale__Init @ cdecl -arch=win64 ?_Init@locale@std@@CAPEAV_Locimp@12@XZ() locale__Init @ thiscall -arch=win32 ?_Init@strstreambuf@std@@IAEXHPAD0H@Z(ptr long ptr ptr long) strstreambuf__Init -@ stub -arch=win64 ?_Init@strstreambuf@std@@IEAAXHPEAD0H@Z +@ cdecl -arch=win64 ?_Init@strstreambuf@std@@IEAAXHPEAD0H@Z(ptr long ptr ptr long) strstreambuf__Init @ extern ?_Init_cnt@Init@ios_base@std@@0HA ios_base_Init__Init_cnt @ extern ?_Init_cnt@_Winit@std@@0HA _Winit__Init_cnt @ stub -arch=win32 ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXXZ @@ -3638,7 +3638,7 @@ @ thiscall -arch=win32 ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IBEPAGXZ(ptr) basic_streambuf_wchar_pptr @ cdecl -arch=win64 ?pptr@?$basic_streambuf@GU?$char_traits@G@std@@@std@@IEBAPEAGXZ(ptr) basic_streambuf_wchar_pptr @ thiscall -arch=win32 ?precision@ios_base@std@@QAEHH@Z(ptr long) ios_base_precision_set -@ stub -arch=win64 ?precision@ios_base@std@@QEAA_JH@Z +@ cdecl -arch=win64 ?precision@ios_base@std@@QEAA_JH@Z(ptr long) ios_base_precision_set @ thiscall -arch=win32 ?precision@ios_base@std@@QBEHXZ(ptr) ios_base_precision_get @ cdecl -arch=win64 ?precision@ios_base@std@@QEBA_JXZ(ptr) ios_base_precision_get @ thiscall -arch=win32 ?pubimbue@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAE?AVlocale@2@ABV32@@Z(ptr ptr ptr) basic_streambuf_char_pubimbue @@ -4003,9 +4003,9 @@ @ thiscall -arch=win32 ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QAEHPAGH@Z(ptr ptr long) basic_streambuf_wchar_sgetn @ cdecl -arch=win64 ?sgetn@?$basic_streambuf@GU?$char_traits@G@std@@@std@@QEAA_JPEAG_J@Z(ptr ptr long) basic_streambuf_wchar_sgetn @ thiscall -arch=win32 ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ(ptr) basic_streambuf_char_showmanyc -@ stub -arch=win64 ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ +@ cdecl -arch=win64 ?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAAHXZ(ptr) basic_streambuf_char_showmanyc @ thiscall -arch=win32 ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MAEHXZ(ptr) basic_streambuf_wchar_showmanyc -@ stub -arch=win64 ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ +@ cdecl -arch=win64 ?showmanyc@?$basic_streambuf@GU?$char_traits@G@std@@@std@@MEAAHXZ(ptr) basic_streambuf_wchar_showmanyc @ cdecl ?signaling_NaN@?$numeric_limits@C@std@@SACXZ() msvcp90.?signaling_NaN@?$numeric_limits@C@std@@SACXZ @ cdecl ?signaling_NaN@?$numeric_limits@D@std@@SADXZ() msvcp90.?signaling_NaN@?$numeric_limits@D@std@@SADXZ @ cdecl ?signaling_NaN@?$numeric_limits@E@std@@SAEXZ() msvcp90.?signaling_NaN@?$numeric_limits@E@std@@SAEXZ
1
0
0
0
Dmitry Timoshkov : gdiplus: Add more font transformation tests.
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: 8fd422499bb31eb0202e9b48904aa06158cffe9f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8fd422499bb31eb0202e9b489…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Oct 9 18:41:47 2012 +0900 gdiplus: Add more font transformation tests. --- dlls/gdiplus/tests/font.c | 177 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 176 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index 0ac9558..d710a5b 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -26,7 +26,8 @@ #include "wine/test.h" #define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) -#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %f, got %f\n", expected, got) +#define expectf_(expected, got, precision) ok(fabs((expected) - (got)) <= (precision), "Expected %f, got %f\n", (expected), (got)) +#define expectf(expected, got) expectf_((expected), (got), 0.001) static const WCHAR nonexistent[] = {'T','h','i','s','F','o','n','t','s','h','o','u','l','d','N','o','t','E','x','i','s','t','\0'}; static const WCHAR MSSansSerif[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}; @@ -36,6 +37,14 @@ static const WCHAR CourierNew[] = {'C','o','u','r','i','e','r',' ','N','e','w',' static const WCHAR Tahoma[] = {'T','a','h','o','m','a',0}; static const WCHAR LiberationSerif[] = {'L','i','b','e','r','a','t','i','o','n',' ','S','e','r','i','f',0}; +static void set_rect_empty(RectF *rc) +{ + rc->X = 0.0; + rc->Y = 0.0; + rc->Width = 0.0; + rc->Height = 0.0; +} + static void test_createfont(void) { GpFontFamily* fontfamily = NULL, *fontfamily2; @@ -806,17 +815,30 @@ todo_wine static void test_font_transform(void) { + static const WCHAR string[] = { 'A',0 }; GpStatus status; HDC hdc; LOGFONT lf; GpFont *font; GpGraphics *graphics; GpMatrix *matrix; + GpStringFormat *format, *typographic; + PointF pos[1] = { { 0,0 } }; + REAL height; + RectF bounds, rect; hdc = CreateCompatibleDC(0); status = GdipCreateFromHDC(hdc, &graphics); expect(Ok, status); + status = GdipSetPageUnit(graphics, UnitPixel); + expect(Ok, status); + + status = GdipCreateStringFormat(0, LANG_NEUTRAL, &format); + expect(Ok, status); + status = GdipStringFormatGetGenericTypographic(&typographic); + expect(Ok, status); + memset(&lf, 0, sizeof(lf)); lstrcpy(lf.lfFaceName, "Tahoma"); lf.lfHeight = -100; @@ -833,6 +855,34 @@ static void test_font_transform(void) expect(Ok, status); expect(-100, lf.lfHeight); expect(0, lf.lfWidth); + status = GdipGetFontHeight(font, graphics, &height); + expect(Ok, status); + expectf(120.703125, height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(133.203125, bounds.Height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, typographic, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(120.703125, bounds.Height); + set_rect_empty(&bounds); + status = GdipMeasureDriverString(graphics, (const UINT16 *)string, -1, font, pos, + DriverStringOptionsCmapLookup, NULL, &bounds); + expect(Ok, status); + expectf(0.0, bounds.X); +todo_wine + expectf_(-100.0, bounds.Y, 0.05); +todo_wine + expectf(120.703125, bounds.Height); /* scale matrix */ status = GdipScaleMatrix(matrix, 2.0, 3.0, MatrixOrderAppend); @@ -844,6 +894,34 @@ static void test_font_transform(void) todo_wine expect(-300, lf.lfHeight); expect(0, lf.lfWidth); + status = GdipGetFontHeight(font, graphics, &height); + expect(Ok, status); + expectf(120.703125, height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(133.203125, bounds.Height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, typographic, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(120.703125, bounds.Height); + set_rect_empty(&bounds); + status = GdipMeasureDriverString(graphics, (const UINT16 *)string, -1, font, pos, + DriverStringOptionsCmapLookup, NULL, &bounds); + expect(Ok, status); + expectf(0.0, bounds.X); +todo_wine + expectf_(-100.0, bounds.Y, 0.05); +todo_wine + expectf(120.703125, bounds.Height); /* scale + ratate matrix */ status = GdipRotateMatrix(matrix, 45.0, MatrixOrderAppend); @@ -855,6 +933,34 @@ todo_wine todo_wine expect(-300, lf.lfHeight); expect(0, lf.lfWidth); + status = GdipGetFontHeight(font, graphics, &height); + expect(Ok, status); + expectf(120.703125, height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(133.203125, bounds.Height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, typographic, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(120.703125, bounds.Height); + set_rect_empty(&bounds); + status = GdipMeasureDriverString(graphics, (const UINT16 *)string, -1, font, pos, + DriverStringOptionsCmapLookup, NULL, &bounds); + expect(Ok, status); + expectf(0.0, bounds.X); +todo_wine + expectf_(-100.0, bounds.Y, 0.05); +todo_wine + expectf(120.703125, bounds.Height); /* scale + ratate + shear matrix */ status = GdipShearMatrix(matrix, 4.0, 5.0, MatrixOrderAppend); @@ -866,10 +972,79 @@ todo_wine todo_wine expect(1032, lf.lfHeight); expect(0, lf.lfWidth); + status = GdipGetFontHeight(font, graphics, &height); + expect(Ok, status); + expectf(120.703125, height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(133.203125, bounds.Height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, typographic, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(120.703125, bounds.Height); + set_rect_empty(&bounds); + status = GdipMeasureDriverString(graphics, (const UINT16 *)string, -1, font, pos, + DriverStringOptionsCmapLookup, NULL, &bounds); + expect(Ok, status); + expectf(0.0, bounds.X); +todo_wine + expectf_(-100.0, bounds.Y, 0.05); +todo_wine + expectf(120.703125, bounds.Height); + + /* scale + ratate + shear + translate matrix */ + status = GdipTranslateMatrix(matrix, 10.0, 20.0, MatrixOrderAppend); + expect(Ok, status); + status = GdipSetWorldTransform(graphics, matrix); + expect(Ok, status); + status = GdipGetLogFontA(font, graphics, &lf); + expect(Ok, status); +todo_wine + expect(1032, lf.lfHeight); + expect(0, lf.lfWidth); + status = GdipGetFontHeight(font, graphics, &height); + expect(Ok, status); + expectf(120.703125, height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, format, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(133.203125, bounds.Height); + set_rect_empty(&rect); + set_rect_empty(&bounds); + status = GdipMeasureString(graphics, string, -1, font, &rect, typographic, &bounds, NULL, NULL); + expect(Ok, status); + expectf(0.0, bounds.X); + expectf(0.0, bounds.Y); +todo_wine + expectf(120.703125, bounds.Height); + set_rect_empty(&bounds); + status = GdipMeasureDriverString(graphics, (const UINT16 *)string, -1, font, pos, + DriverStringOptionsCmapLookup, NULL, &bounds); + expect(Ok, status); + expectf(0.0, bounds.X); +todo_wine + expectf_(-100.0, bounds.Y, 0.05); +todo_wine + expectf(120.703125, bounds.Height); GdipDeleteMatrix(matrix); GdipDeleteFont(font); GdipDeleteGraphics(graphics); + GdipDeleteStringFormat(typographic); + GdipDeleteStringFormat(format); DeleteDC(hdc); }
1
0
0
0
Alexandre Julliard : user32: Add support for setting the window surface visible region.
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: cc7bf355c50b17b2e04f754c80464289df2a9ee7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cc7bf355c50b17b2e04f754c8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 9 15:21:21 2012 +0200 user32: Add support for setting the window surface visible region. --- dlls/user32/win.c | 6 +++++ dlls/user32/winpos.c | 55 ++++++++++++++++++++++++++++++++++++++++++++- dlls/winex11.drv/bitblt.c | 23 ++++++++++++++++++ include/wine/gdi_driver.h | 1 + 4 files changed, 84 insertions(+), 1 deletions(-) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 7da4972..66eaf09 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -539,6 +539,11 @@ static RECT *dummy_surface_get_bounds( struct window_surface *window_surface ) return &dummy_bounds; } +static void dummy_surface_set_region( struct window_surface *window_surface, HRGN region ) +{ + /* nothing to do */ +} + static void dummy_surface_flush( struct window_surface *window_surface ) { /* nothing to do */ @@ -555,6 +560,7 @@ static const struct window_surface_funcs dummy_surface_funcs = dummy_surface_unlock, dummy_surface_get_bitmap_info, dummy_surface_get_bounds, + dummy_surface_set_region, dummy_surface_flush, dummy_surface_destroy }; diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 7a0d8f9..a04bf2c 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1941,6 +1941,57 @@ static BOOL fixup_flags( WINDOWPOS *winpos ) /*********************************************************************** + * update_surface_region + */ +static void update_surface_region( HWND hwnd ) +{ + NTSTATUS status; + HRGN region = 0; + RGNDATA *data; + size_t size = 256; + WND *win = WIN_GetPtr( hwnd ); + + if (!win || win == WND_DESKTOP || win == WND_OTHER_PROCESS) return; + if (!win->surface) goto done; + + do + { + if (!(data = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( RGNDATA, Buffer[size] )))) goto done; + + SERVER_START_REQ( get_surface_region ) + { + req->window = wine_server_user_handle( hwnd ); + wine_server_set_reply( req, data->Buffer, size ); + if (!(status = wine_server_call( req ))) + { + size_t reply_size = wine_server_reply_size( reply ); + if (reply_size) + { + data->rdh.dwSize = sizeof(data->rdh); + data->rdh.iType = RDH_RECTANGLES; + data->rdh.nCount = reply_size / sizeof(RECT); + data->rdh.nRgnSize = reply_size; + region = ExtCreateRegion( NULL, size, data ); + OffsetRgn( region, -reply->visible_rect.left, -reply->visible_rect.top ); + } + } + else size = reply->total_size; + } + SERVER_END_REQ; + HeapFree( GetProcessHeap(), 0, data ); + } while (status == STATUS_BUFFER_OVERFLOW); + + if (status) goto done; + + win->surface->funcs->set_region( win->surface, region ); + if (region) DeleteObject( region ); + +done: + WIN_ReleasePtr( win ); +} + + +/*********************************************************************** * set_window_pos * * Backend implementation of SetWindowPos. @@ -1949,7 +2000,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, const RECT *valid_rects ) { WND *win; - HWND parent = GetAncestor( hwnd, GA_PARENT ); + HWND surface_win = 0, parent = GetAncestor( hwnd, GA_PARENT ); BOOL ret; int old_width; RECT visible_rect, old_visible_rect, old_window_rect; @@ -2005,6 +2056,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, win->visible_rect = visible_rect; old_surface = win->surface; win->surface = new_surface; + surface_win = wine_server_ptr_handle( reply->surface_win ); if (GetWindowLongW( win->parent, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) { RECT client; @@ -2022,6 +2074,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, if (ret) { + if (surface_win) update_surface_region( surface_win ); if (old_surface != new_surface || ((swp_flags & SWP_AGG_NOPOSCHANGE) != SWP_AGG_NOPOSCHANGE) || (swp_flags & (SWP_HIDEWINDOW | SWP_SHOWWINDOW | SWP_STATECHANGED | SWP_FRAMECHANGED))) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index e1812cd..c3cf056 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1848,6 +1848,28 @@ static RECT *x11drv_surface_get_bounds( struct window_surface *window_surface ) } /*********************************************************************** + * x11drv_surface_set_region + */ +static void x11drv_surface_set_region( struct window_surface *window_surface, HRGN region ) +{ + RGNDATA *data; + struct x11drv_window_surface *surface = get_x11_surface( window_surface ); + + TRACE( "updating surface %p with %p\n", surface, region ); + + if (!region) + { + XSetClipMask( gdi_display, surface->gc, None ); + } + else if ((data = X11DRV_GetRegionData( region, 0 ))) + { + XSetClipRectangles( gdi_display, surface->gc, 0, 0, + (XRectangle *)data->Buffer, data->rdh.nCount, YXBanded ); + HeapFree( GetProcessHeap(), 0, data ); + } +} + +/*********************************************************************** * x11drv_surface_flush */ static void x11drv_surface_flush( struct window_surface *window_surface ) @@ -1945,6 +1967,7 @@ static const struct window_surface_funcs x11drv_surface_funcs = x11drv_surface_unlock, x11drv_surface_get_bitmap_info, x11drv_surface_get_bounds, + x11drv_surface_set_region, x11drv_surface_flush, x11drv_surface_destroy }; diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index c58803d..e942ed9 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -233,6 +233,7 @@ struct window_surface_funcs void (*unlock)( struct window_surface *surface ); void* (*get_info)( struct window_surface *surface, BITMAPINFO *info ); RECT* (*get_bounds)( struct window_surface *surface ); + void (*set_region)( struct window_surface *surface, HRGN region ); void (*flush)( struct window_surface *surface ); void (*destroy)( struct window_surface *surface ); };
1
0
0
0
Alexandre Julliard : server: Add a heuristic to avoid computing surface regions when no pixel format has been set .
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: d0c9d223713044aee3e5515f199920b7c7ec6fec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0c9d223713044aee3e5515f1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 9 15:17:57 2012 +0200 server: Add a heuristic to avoid computing surface regions when no pixel format has been set. --- server/window.c | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/server/window.c b/server/window.c index 9943452..2b4bc50 100644 --- a/server/window.c +++ b/server/window.c @@ -102,6 +102,7 @@ struct window #define PAINT_ERASE 0x0020 /* needs WM_ERASEBKGND */ #define PAINT_NONCLIENT 0x0040 /* needs WM_NCPAINT */ #define PAINT_DELAYED_ERASE 0x0080 /* still needs erase after WM_ERASEBKGND */ +#define PAINT_PIXEL_FORMAT_CHILD 0x0100 /* at least one child has a custom pixel format */ /* growable array of user handles */ struct user_handle_array @@ -165,6 +166,14 @@ static inline struct window *get_last_child( struct window *win ) return ptr ? LIST_ENTRY( ptr, struct window, entry ) : NULL; } +/* set the PAINT_PIXEL_FORMAT_CHILD flag on all the parents */ +/* note: we never reset the flag, it's just a heuristic */ +static inline void update_pixel_format_flags( struct window *win ) +{ + for (win = win->parent; win && win->parent; win = win->parent) + win->paint_flags |= PAINT_PIXEL_FORMAT_CHILD; +} + /* link a window at the right place in the siblings list */ static void link_window( struct window *win, struct window *previous ) { @@ -244,6 +253,8 @@ static int set_parent_window( struct window *win, struct window *parent ) /* top-level, attach the two threads */ if (parent->thread && parent->thread != win->thread && !is_desktop_window(parent)) attach_thread_input( win->thread, parent->thread ); + + if (win->paint_flags & PAINT_HAS_PIXEL_FORMAT) update_pixel_format_flags( win ); } else /* move it to parent unlinked list */ { @@ -1038,6 +1049,7 @@ static struct region *clip_pixel_format_children( struct window *parent, struct offset_region( clip, offset_x, offset_y ); if (!intersect_region( clip, clip, parent_clip )) break; if (!union_region( region, region, clip )) break; + if (!(ptr->paint_flags & (PAINT_HAS_PIXEL_FORMAT | PAINT_PIXEL_FORMAT_CHILD))) continue; /* subtract the client rect if it uses a custom pixel format */ set_region_rect( clip, &ptr->client_rect ); @@ -2238,6 +2250,7 @@ DECL_HANDLER(set_window_pos) } win->paint_flags = (win->paint_flags & ~PAINT_CLIENT_FLAGS) | (req->paint_flags & PAINT_CLIENT_FLAGS); + if (win->paint_flags & PAINT_HAS_PIXEL_FORMAT) update_pixel_format_flags( win ); if (get_req_data_size() >= 3 * sizeof(rectangle_t)) { @@ -2256,7 +2269,10 @@ DECL_HANDLER(set_window_pos) reply->new_ex_style = win->ex_style; top = get_top_clipping_window( win ); - if (is_visible( top ) && (top->paint_flags & PAINT_HAS_SURFACE)) reply->surface_win = top->handle; + if (is_visible( top ) && + (top->paint_flags & PAINT_HAS_SURFACE) && + (top->paint_flags & PAINT_PIXEL_FORMAT_CHILD)) + reply->surface_win = top->handle; }
1
0
0
0
Alexandre Julliard : server: Add a request to compute the clipping region of a window surface.
by Alexandre Julliard
09 Oct '12
09 Oct '12
Module: wine Branch: master Commit: a52ebb158ef036f131a2386b0703896933840e94 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a52ebb158ef036f131a2386b0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Oct 9 11:47:50 2012 +0200 server: Add a request to compute the clipping region of a window surface. --- include/wine/server_protocol.h | 23 +++++++++- server/protocol.def | 11 ++++ server/request.h | 10 ++++- server/trace.c | 16 ++++++ server/window.c | 99 +++++++++++++++++++++++++++++++++++++++- 5 files changed, 156 insertions(+), 3 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a52ebb158ef036f131a23…
1
0
0
0
← Newer
1
...
67
68
69
70
71
72
73
...
96
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
Results per page:
10
25
50
100
200