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 2011
----- 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
838 discussions
Start a n
N
ew thread
Juan Lang : wininet: Implement setting proxy options globally for a process .
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: cfdce43de93bf66a126a297f85721a4e42b24755 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cfdce43de93bf66a126a297f8…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jul 21 13:17:21 2011 -0700 wininet: Implement setting proxy options globally for a process. --- dlls/wininet/internet.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 66 insertions(+), 1 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 90dd27e..c949f5d 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -498,10 +498,24 @@ static void FreeProxyInfo( proxyinfo_t *lpwpi ) heap_free(lpwpi->proxyBypass); } +static proxyinfo_t *global_proxy; + +static void free_global_proxy( void ) +{ + EnterCriticalSection( &WININET_cs ); + if (global_proxy) + { + FreeProxyInfo( global_proxy ); + heap_free( global_proxy ); + } + LeaveCriticalSection( &WININET_cs ); +} + /*********************************************************************** * INTERNET_LoadProxySettings * - * Loads proxy information from the registry or environment into lpwpi. + * Loads proxy information from process-wide global settings, the registry, + * or the environment into lpwpi. * * The caller should call FreeProxyInfo when done with lpwpi. * @@ -516,6 +530,15 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi ) LPCSTR envproxy; LONG ret; + EnterCriticalSection( &WININET_cs ); + if (global_proxy) + { + lpwpi->proxyEnabled = global_proxy->proxyEnabled; + lpwpi->proxy = heap_strdupW( global_proxy->proxy ); + lpwpi->proxyBypass = heap_strdupW( global_proxy->proxyBypass ); + } + LeaveCriticalSection( &WININET_cs ); + if ((ret = RegOpenKeyW( HKEY_CURRENT_USER, szInternetSettings, &key ))) return ret; @@ -2538,6 +2561,48 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, lpwhh->ErrorMask = *(ULONG*)lpBuffer; } break; + case INTERNET_OPTION_PROXY: + { + INTERNET_PROXY_INFOW *info = lpBuffer; + + if (!lpBuffer || dwBufferLength < sizeof(INTERNET_PROXY_INFOW)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (!hInternet) + { + EnterCriticalSection( &WININET_cs ); + free_global_proxy(); + global_proxy = heap_alloc( sizeof(proxyinfo_t) ); + if (global_proxy) + { + if (info->dwAccessType == INTERNET_OPEN_TYPE_PROXY) + { + global_proxy->proxyEnabled = 1; + global_proxy->proxy = heap_strdupW( info->lpszProxy ); + global_proxy->proxyBypass = heap_strdupW( info->lpszProxyBypass ); + } + else + { + global_proxy->proxyEnabled = 0; + global_proxy->proxy = global_proxy->proxyBypass = NULL; + } + } + LeaveCriticalSection( &WININET_cs ); + } + else + { + /* In general, each type of object should handle + * INTERNET_OPTION_PROXY directly. This FIXME ensures it doesn't + * get silently dropped. + */ + FIXME("INTERNET_OPTION_PROXY unimplemented\n"); + SetLastError(ERROR_INTERNET_INVALID_OPTION); + ret = FALSE; + } + break; + } case INTERNET_OPTION_CODEPAGE: { ULONG codepage = *(ULONG *)lpBuffer;
1
0
0
0
Juan Lang : wininet: De-Hungarian proxyinfo_t.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 027238f856fa50471bcfe836719cf170b3bbf84c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=027238f856fa50471bcfe8367…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jul 21 12:54:27 2011 -0700 wininet: De-Hungarian proxyinfo_t. --- dlls/wininet/internet.c | 60 +++++++++++++++++++++++----------------------- 1 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index c865368..90dd27e 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -105,9 +105,9 @@ static UINT_PTR handle_table_size; typedef struct { - DWORD dwProxyEnabled; - LPWSTR lpszProxyServer; - LPWSTR lpszProxyBypass; + DWORD proxyEnabled; + LPWSTR proxy; + LPWSTR proxyBypass; } proxyinfo_t; static const WCHAR szInternetSettings[] = @@ -337,15 +337,15 @@ static LONG INTERNET_SaveProxySettings( proxyinfo_t *lpwpi ) if ((ret = RegOpenKeyW( HKEY_CURRENT_USER, szInternetSettings, &key ))) return ret; - if ((ret = RegSetValueExW( key, szProxyEnable, 0, REG_DWORD, (BYTE*)&lpwpi->dwProxyEnabled, sizeof(DWORD)))) + if ((ret = RegSetValueExW( key, szProxyEnable, 0, REG_DWORD, (BYTE*)&lpwpi->proxyEnabled, sizeof(DWORD)))) { RegCloseKey( key ); return ret; } - if (lpwpi->lpszProxyServer) + if (lpwpi->proxy) { - if ((ret = RegSetValueExW( key, szProxyServer, 0, REG_SZ, (BYTE*)lpwpi->lpszProxyServer, sizeof(WCHAR) * (lstrlenW(lpwpi->lpszProxyServer) + 1)))) + if ((ret = RegSetValueExW( key, szProxyServer, 0, REG_SZ, (BYTE*)lpwpi->proxy, sizeof(WCHAR) * (lstrlenW(lpwpi->proxy) + 1)))) { RegCloseKey( key ); return ret; @@ -494,8 +494,8 @@ BOOL WINAPI DetectAutoProxyUrl(LPSTR lpszAutoProxyUrl, static void FreeProxyInfo( proxyinfo_t *lpwpi ) { - heap_free(lpwpi->lpszProxyServer); - heap_free(lpwpi->lpszProxyBypass); + heap_free(lpwpi->proxy); + heap_free(lpwpi->proxyBypass); } /*********************************************************************** @@ -520,17 +520,17 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi ) return ret; len = sizeof(DWORD); - if (RegQueryValueExW( key, szProxyEnable, NULL, &type, (BYTE *)&lpwpi->dwProxyEnabled, &len ) || type != REG_DWORD) + if (RegQueryValueExW( key, szProxyEnable, NULL, &type, (BYTE *)&lpwpi->proxyEnabled, &len ) || type != REG_DWORD) { - lpwpi->dwProxyEnabled = 0; - if((ret = RegSetValueExW( key, szProxyEnable, 0, REG_DWORD, (BYTE *)&lpwpi->dwProxyEnabled, sizeof(DWORD) ))) + lpwpi->proxyEnabled = 0; + if((ret = RegSetValueExW( key, szProxyEnable, 0, REG_DWORD, (BYTE *)&lpwpi->proxyEnabled, sizeof(DWORD) ))) { RegCloseKey( key ); return ret; } } - if (!(envproxy = getenv( "http_proxy" )) || lpwpi->dwProxyEnabled) + if (!(envproxy = getenv( "http_proxy" )) || lpwpi->proxyEnabled) { TRACE("Proxy is enabled.\n"); @@ -557,14 +557,14 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi ) p = strchrW( szProxy, ' ' ); if (p) *p = 0; - lpwpi->lpszProxyServer = szProxy; + lpwpi->proxy = szProxy; - TRACE("http proxy = %s\n", debugstr_w(lpwpi->lpszProxyServer)); + TRACE("http proxy = %s\n", debugstr_w(lpwpi->proxy)); } else { TRACE("No proxy server settings in registry.\n"); - lpwpi->lpszProxyServer = NULL; + lpwpi->proxy = NULL; } } else if (envproxy) @@ -576,14 +576,14 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi ) return ERROR_OUTOFMEMORY; MultiByteToWideChar( CP_UNIXCP, 0, envproxy, -1, envproxyW, len ); - lpwpi->dwProxyEnabled = 1; - lpwpi->lpszProxyServer = envproxyW; + lpwpi->proxyEnabled = 1; + lpwpi->proxy = envproxyW; - TRACE("http proxy (from environment) = %s\n", debugstr_w(lpwpi->lpszProxyServer)); + TRACE("http proxy (from environment) = %s\n", debugstr_w(lpwpi->proxy)); } RegCloseKey( key ); - lpwpi->lpszProxyBypass = NULL; + lpwpi->proxyBypass = NULL; return ERROR_SUCCESS; } @@ -598,10 +598,10 @@ static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai ) if (INTERNET_LoadProxySettings( &wpi )) return FALSE; - if (wpi.dwProxyEnabled) + if (wpi.proxyEnabled) { lpwai->accessType = INTERNET_OPEN_TYPE_PROXY; - lpwai->proxy = wpi.lpszProxyServer; + lpwai->proxy = wpi.proxy; return TRUE; } @@ -2333,7 +2333,7 @@ DWORD INET_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD * switch (optionW->dwOption) { case INTERNET_PER_CONN_FLAGS: - if(pi.dwProxyEnabled) + if(pi.proxyEnabled) optionW->Value.dwValue = PROXY_TYPE_PROXY; else optionW->Value.dwValue = PROXY_TYPE_DIRECT; @@ -2341,16 +2341,16 @@ DWORD INET_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD * case INTERNET_PER_CONN_PROXY_SERVER: if (unicode) - optionW->Value.pszValue = heap_strdupW(pi.lpszProxyServer); + optionW->Value.pszValue = heap_strdupW(pi.proxy); else - optionA->Value.pszValue = heap_strdupWtoA(pi.lpszProxyServer); + optionA->Value.pszValue = heap_strdupWtoA(pi.proxy); break; case INTERNET_PER_CONN_PROXY_BYPASS: if (unicode) - optionW->Value.pszValue = heap_strdupW(pi.lpszProxyBypass); + optionW->Value.pszValue = heap_strdupW(pi.proxyBypass); else - optionA->Value.pszValue = heap_strdupWtoA(pi.lpszProxyBypass); + optionA->Value.pszValue = heap_strdupWtoA(pi.proxyBypass); break; case INTERNET_PER_CONN_AUTOCONFIG_URL: @@ -2669,18 +2669,18 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, switch (option->dwOption) { case INTERNET_PER_CONN_PROXY_SERVER: - heap_free(pi.lpszProxyServer); - pi.lpszProxyServer = heap_strdupW(option->Value.pszValue); + heap_free(pi.proxy); + pi.proxy = heap_strdupW(option->Value.pszValue); break; case INTERNET_PER_CONN_FLAGS: if(option->Value.dwValue & PROXY_TYPE_PROXY) - pi.dwProxyEnabled = 1; + pi.proxyEnabled = 1; else { if(option->Value.dwValue != PROXY_TYPE_DIRECT) FIXME("Unhandled flags: 0x%x\n", option->Value.dwValue); - pi.dwProxyEnabled = 0; + pi.proxyEnabled = 0; } break;
1
0
0
0
Henri Verbeet : wined3d: Make the heap parameter to update_heap_entry() const.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: dbcbf0c45b21915672fca6811c24a8ddd5753fcf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dbcbf0c45b21915672fca6811…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jul 21 19:16:04 2011 +0200 wined3d: Make the heap parameter to update_heap_entry() const. --- dlls/wined3d/glsl_shader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index dec690e..d421e65 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -852,7 +852,7 @@ static void shader_glsl_load_constants(const struct wined3d_context *context, } } -static inline void update_heap_entry(struct constant_heap *heap, unsigned int idx, +static void update_heap_entry(const struct constant_heap *heap, unsigned int idx, unsigned int heap_idx, DWORD new_version) { struct constant_entry *entries = heap->entries;
1
0
0
0
Henri Verbeet : wined3d: Make the tex_unit_map parameter to shader_glsl_load_vsamplers() const.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 959874c2d88f616c4706ab6558b95ddf4cc71e29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=959874c2d88f616c4706ab655…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jul 21 19:16:03 2011 +0200 wined3d: Make the tex_unit_map parameter to shader_glsl_load_vsamplers() const. --- dlls/wined3d/glsl_shader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index b046263..dec690e 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -376,7 +376,7 @@ static void shader_glsl_load_psamplers(const struct wined3d_gl_info *gl_info, /* GL locking is done by the caller */ static void shader_glsl_load_vsamplers(const struct wined3d_gl_info *gl_info, - DWORD *tex_unit_map, GLhandleARB programId) + const DWORD *tex_unit_map, GLhandleARB programId) { GLint name_loc; char sampler_name[20];
1
0
0
0
Henri Verbeet : wined3d: Make the tex_unit_map parameter to shader_glsl_load_psamplers() const.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 86dd8476db17eb792a1f5e45026c79b79da4c1c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=86dd8476db17eb792a1f5e450…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jul 21 19:16:02 2011 +0200 wined3d: Make the tex_unit_map parameter to shader_glsl_load_psamplers() const. --- dlls/wined3d/glsl_shader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index c8b4a0a..b046263 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -351,7 +351,7 @@ static void shader_glsl_validate_link(const struct wined3d_gl_info *gl_info, GLh */ /* GL locking is done by the caller */ static void shader_glsl_load_psamplers(const struct wined3d_gl_info *gl_info, - DWORD *tex_unit_map, GLhandleARB programId) + const DWORD *tex_unit_map, GLhandleARB programId) { GLint name_loc; int i;
1
0
0
0
Henri Verbeet : ddraw/tests: Add tests to show that resizing the window on mode changes is a property of DDSCL_EXCLUSIVE .
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: e55121773a2bc57cb10ce339326430076a292042 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e55121773a2bc57cb10ce3393…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jul 21 19:16:01 2011 +0200 ddraw/tests: Add tests to show that resizing the window on mode changes is a property of DDSCL_EXCLUSIVE. --- dlls/ddraw/tests/d3d.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 72d61b8..c7066f1 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -4253,6 +4253,50 @@ static void test_coop_level_mode_set(void) r.left, r.top, r.right, r.bottom); hr = IDirectDraw7_SetCooperativeLevel(ddraw7, window, DDSCL_NORMAL); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); + + GetWindowRect(window, &r); + ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, + r.left, r.top, r.right, r.bottom); + + expect_messages = normal_messages; + screen_size.cx = 0; + screen_size.cy = 0; + + hr = IDirectDraw7_SetDisplayMode(ddraw7, 640, 480, 32, 0, 0); + ok(SUCCEEDED(hr), "SetDipslayMode failed, hr %#x.\n", hr); + + ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); + expect_messages = NULL; + ok(!screen_size.cx && !screen_size.cy, "Got unxpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + + GetWindowRect(window, &r); + ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, + r.left, r.top, r.right, r.bottom); + + expect_messages = normal_messages; + screen_size.cx = 0; + screen_size.cy = 0; + + hr = IDirectDraw_RestoreDisplayMode(ddraw7); + ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); + + ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); + expect_messages = NULL; + ok(!screen_size.cx && !screen_size.cy, "Got unxpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); + + GetWindowRect(window, &r); + ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", + fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom, + r.left, r.top, r.right, r.bottom); + + /* DDSCL_NORMAL | DDSCL_FULLSCREEN behaves the same as just DDSCL_NORMAL. + * Resizing the window on mode changes is a property of DDSCL_EXCLUSIVE, + * not DDSCL_FULLSCREEN. */ + hr = IDirectDraw7_SetCooperativeLevel(ddraw7, window, DDSCL_NORMAL | DDSCL_FULLSCREEN); + ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr); GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
1
0
0
0
Henri Verbeet : ddraw: Resize the window after setting the new display mode .
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 84413298de371a9e9b9ecfe0dd01f580b7521222 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84413298de371a9e9b9ecfe0d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Jul 21 19:16:00 2011 +0200 ddraw: Resize the window after setting the new display mode. --- dlls/ddraw/ddraw.c | 6 +++--- dlls/ddraw/tests/d3d.c | 36 ++++++++++++++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 5c80113..40d27ed 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -910,12 +910,12 @@ static HRESULT ddraw_set_display_mode(IDirectDrawImpl *ddraw, DWORD Width, DWORD * or some drawing is in progress */ - if (ddraw->cooperative_level & DDSCL_EXCLUSIVE) - SetWindowPos(ddraw->dest_window, HWND_TOP, 0, 0, Width, Height, SWP_SHOWWINDOW | SWP_NOACTIVATE); - /* TODO: Lose the primary surface */ hr = wined3d_device_set_display_mode(ddraw->wined3d_device, 0, &Mode); + if (ddraw->cooperative_level & DDSCL_EXCLUSIVE) + SetWindowPos(ddraw->dest_window, HWND_TOP, 0, 0, Width, Height, SWP_SHOWWINDOW | SWP_NOACTIVATE); + LeaveCriticalSection(&ddraw_cs); switch(hr) { diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index ba81a63..72d61b8 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -4146,6 +4146,19 @@ static void test_redundant_mode_set(void) DestroyWindow(window); } +static SIZE screen_size; + +static LRESULT CALLBACK mode_set_proc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) +{ + if (message == WM_SIZE) + { + screen_size.cx = GetSystemMetrics(SM_CXSCREEN); + screen_size.cy = GetSystemMetrics(SM_CYSCREEN); + } + + return test_proc(hwnd, message, wparam, lparam); +} + static void test_coop_level_mode_set(void) { RECT fullscreen_rect, r, s; @@ -4160,7 +4173,10 @@ static void test_coop_level_mode_set(void) WM_WINDOWPOSCHANGING, WM_WINDOWPOSCHANGED, WM_SIZE, - WM_DISPLAYCHANGE, + /* WM_DISPLAYCHANGE, This message is received after WM_SIZE on native. However, the + * more important behaviour is that at the time the WM_SIZE message + * is processed SM_CXSCREEN and SM_CYSCREEN already have the new + * values. */ 0, }; @@ -4177,7 +4193,7 @@ static void test_coop_level_mode_set(void) return; } - wc.lpfnWndProc = test_proc; + wc.lpfnWndProc = mode_set_proc; wc.lpszClassName = "d3d7_test_wndproc_wc"; ok(RegisterClassA(&wc), "Failed to register window class.\n"); @@ -4201,12 +4217,17 @@ static void test_coop_level_mode_set(void) r.left, r.top, r.right, r.bottom); expect_messages = exclusive_messages; + screen_size.cx = 0; + screen_size.cy = 0; hr = IDirectDraw7_SetDisplayMode(ddraw7, 640, 480, 32, 0, 0); ok(SUCCEEDED(hr), "SetDipslayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); expect_messages = NULL; + ok(screen_size.cx == s.right && screen_size.cy == s.bottom, + "Expected screen size %ux%u, got %ux%u.\n", + s.right, s.bottom, screen_size.cx, screen_size.cy); GetWindowRect(window, &r); ok(EqualRect(&r, &s), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", @@ -4214,12 +4235,17 @@ static void test_coop_level_mode_set(void) r.left, r.top, r.right, r.bottom); expect_messages = exclusive_messages; + screen_size.cx = 0; + screen_size.cy = 0; hr = IDirectDraw_RestoreDisplayMode(ddraw7); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); expect_messages = NULL; + ok(screen_size.cx == fullscreen_rect.right && screen_size.cy == fullscreen_rect.bottom, + "Expected screen size %ux%u, got %ux%u.\n", + fullscreen_rect.right, fullscreen_rect.bottom, screen_size.cx, screen_size.cy); GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", @@ -4234,12 +4260,15 @@ static void test_coop_level_mode_set(void) r.left, r.top, r.right, r.bottom); expect_messages = normal_messages; + screen_size.cx = 0; + screen_size.cy = 0; hr = IDirectDraw7_SetDisplayMode(ddraw7, 640, 480, 32, 0, 0); ok(SUCCEEDED(hr), "SetDipslayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); expect_messages = NULL; + ok(!screen_size.cx && !screen_size.cy, "Got unxpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n", @@ -4247,12 +4276,15 @@ static void test_coop_level_mode_set(void) r.left, r.top, r.right, r.bottom); expect_messages = normal_messages; + screen_size.cx = 0; + screen_size.cy = 0; hr = IDirectDraw_RestoreDisplayMode(ddraw7); ok(SUCCEEDED(hr), "RestoreDisplayMode failed, hr %#x.\n", hr); ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages); expect_messages = NULL; + ok(!screen_size.cx && !screen_size.cy, "Got unxpected screen size %ux%u.\n", screen_size.cx, screen_size.cy); GetWindowRect(window, &r); ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
1
0
0
0
Alexandre Julliard : wineps: Implement the additional clipping in PutImage.
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 0f9ee1b68face4b6bf0e3f6992a9f1943c7cf2f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f9ee1b68face4b6bf0e3f699…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 21 19:46:28 2011 +0200 wineps: Implement the additional clipping in PutImage. --- dlls/wineps.drv/bitmap.c | 1 + dlls/wineps.drv/clipping.c | 108 +++++++++++++++++++------------------------- dlls/wineps.drv/psdrv.h | 1 + 3 files changed, 49 insertions(+), 61 deletions(-) diff --git a/dlls/wineps.drv/bitmap.c b/dlls/wineps.drv/bitmap.c index 39e4536..4897b4e 100644 --- a/dlls/wineps.drv/bitmap.c +++ b/dlls/wineps.drv/bitmap.c @@ -308,6 +308,7 @@ DWORD PSDRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info, PSDRV_SetClip(dev); PSDRV_WriteGSave(dev); + if (clip) PSDRV_AddClip( dev, clip ); PSDRV_WriteImageBits( dev, info, dst_x, dst_y, dst_width, dst_height, width, height, dst_bits.ptr, size ); PSDRV_WriteGRestore(dev); diff --git a/dlls/wineps.drv/clipping.c b/dlls/wineps.drv/clipping.c index 7b112eb..59c8817 100644 --- a/dlls/wineps.drv/clipping.c +++ b/dlls/wineps.drv/clipping.c @@ -25,6 +25,47 @@ WINE_DEFAULT_DEBUG_CHANNEL(psdrv); /*********************************************************************** + * PSDRV_AddClip + */ +void PSDRV_AddClip( PHYSDEV dev, HRGN hrgn ) +{ + CHAR szArrayName[] = "clippath"; + RECT *rect; + RGNDATA *data; + DWORD i, size = GetRegionData(hrgn, 0, NULL); + + if (!size) return; + if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) return; + GetRegionData( hrgn, size, data ); + rect = (RECT *)data->Buffer; + + switch (data->rdh.nCount) + { + case 0: + /* set an empty clip path. */ + PSDRV_WriteRectClip(dev, 0, 0, 0, 0); + break; + case 1: + /* optimize when it is a simple region */ + PSDRV_WriteRectClip(dev, rect->left, rect->top, + rect->right - rect->left, rect->bottom - rect->top); + break; + default: + PSDRV_WriteArrayDef(dev, szArrayName, data->rdh.nCount * 4); + for (i = 0; i < data->rdh.nCount; i++, rect++) + { + PSDRV_WriteArrayPut(dev, szArrayName, i * 4, rect->left); + PSDRV_WriteArrayPut(dev, szArrayName, i * 4 + 1, rect->top); + PSDRV_WriteArrayPut(dev, szArrayName, i * 4 + 2, rect->right - rect->left); + PSDRV_WriteArrayPut(dev, szArrayName, i * 4 + 3, rect->bottom - rect->top); + } + PSDRV_WriteRectClip2(dev, szArrayName); + break; + } + HeapFree( GetProcessHeap(), 0, data ); +} + +/*********************************************************************** * PSDRV_SetClip * * The idea here is that every graphics operation should bracket @@ -38,76 +79,21 @@ WINE_DEFAULT_DEBUG_CHANNEL(psdrv); void PSDRV_SetClip( PHYSDEV dev ) { PSDRV_PDEVICE *physDev = get_psdrv_dev( dev ); - CHAR szArrayName[] = "clippath"; - DWORD size; - RGNDATA *rgndata = NULL; - HRGN hrgn = CreateRectRgn(0,0,0,0); - BOOL empty; + HRGN hrgn; TRACE("hdc=%p\n", dev->hdc); if(physDev->pathdepth) { TRACE("inside a path, so not clipping\n"); - goto end; + return; } - empty = !GetClipRgn(dev->hdc, hrgn); - - if(!empty) { - size = GetRegionData(hrgn, 0, NULL); - if(!size) { - ERR("Invalid region\n"); - goto end; - } - - rgndata = HeapAlloc( GetProcessHeap(), 0, size ); - if(!rgndata) { - ERR("Can't allocate buffer\n"); - goto end; - } - - GetRegionData(hrgn, size, rgndata); - + hrgn = CreateRectRgn(0,0,0,0); + if (GetClipRgn(dev->hdc, hrgn)) + { PSDRV_WriteGSave(dev); - - /* check for NULL region */ - if (rgndata->rdh.nCount == 0) - { - /* set an empty clip path. */ - PSDRV_WriteRectClip(dev, 0, 0, 0, 0); - } - /* optimize when it is a simple region */ - else if (rgndata->rdh.nCount == 1) - { - RECT *pRect = (RECT *)rgndata->Buffer; - - PSDRV_WriteRectClip(dev, pRect->left, pRect->top, - pRect->right - pRect->left, - pRect->bottom - pRect->top); - } - else - { - UINT i; - RECT *pRect = (RECT *)rgndata->Buffer; - - PSDRV_WriteArrayDef(dev, szArrayName, rgndata->rdh.nCount * 4); - - for (i = 0; i < rgndata->rdh.nCount; i++, pRect++) - { - PSDRV_WriteArrayPut(dev, szArrayName, i * 4, - pRect->left); - PSDRV_WriteArrayPut(dev, szArrayName, i * 4 + 1, - pRect->top); - PSDRV_WriteArrayPut(dev, szArrayName, i * 4 + 2, - pRect->right - pRect->left); - PSDRV_WriteArrayPut(dev, szArrayName, i * 4 + 3, - pRect->bottom - pRect->top); - } - PSDRV_WriteRectClip2(dev, szArrayName); - } + PSDRV_AddClip( dev, hrgn ); } -end: - HeapFree( GetProcessHeap(), 0, rgndata ); DeleteObject(hrgn); } diff --git a/dlls/wineps.drv/psdrv.h b/dlls/wineps.drv/psdrv.h index d24a8fd..7b8185f 100644 --- a/dlls/wineps.drv/psdrv.h +++ b/dlls/wineps.drv/psdrv.h @@ -480,6 +480,7 @@ extern BOOL PSDRV_Brush(PHYSDEV dev, BOOL EO) DECLSPEC_HIDDEN; extern BOOL PSDRV_SetFont( PHYSDEV dev ) DECLSPEC_HIDDEN; extern BOOL PSDRV_SetPen( PHYSDEV dev ) DECLSPEC_HIDDEN; +extern void PSDRV_AddClip( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN; extern void PSDRV_SetClip( PHYSDEV dev ) DECLSPEC_HIDDEN; extern void PSDRV_ResetClip( PHYSDEV dev ) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : winex11: Implement the additional clipping in PutImage .
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 316372a21f4350d91f80d05643366c0d9965de6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=316372a21f4350d91f80d0564…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 21 19:12:55 2011 +0200 winex11: Implement the additional clipping in PutImage. --- dlls/winex11.drv/bitblt.c | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 08e0386..2f09517 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1921,15 +1921,30 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info image->data = dst_bits.ptr; if (bitmap) { + RGNDATA *clip_data = NULL; + GC gc; + + if (clip) clip_data = X11DRV_GetRegionData( clip, 0 ); X11DRV_DIB_Lock( bitmap, DIB_Status_GdiMod ); + wine_tsx11_lock(); - XPutImage( gdi_display, bitmap->pixmap, get_bitmap_gc(depth), image, src->visrect.left, 0, + gc = XCreateGC( gdi_display, bitmap->pixmap, 0, NULL ); + XSetGraphicsExposures( gdi_display, gc, False ); + if (clip_data) XSetClipRectangles( gdi_display, gc, 0, 0, (XRectangle *)clip_data->Buffer, + clip_data->rdh.nCount, YXBanded ); + XPutImage( gdi_display, bitmap->pixmap, gc, image, src->visrect.left, 0, dst->visrect.left, dst->visrect.top, width, height ); + XFreeGC( gdi_display, gc ); wine_tsx11_unlock(); + X11DRV_DIB_Unlock( bitmap, TRUE ); + HeapFree( GetProcessHeap(), 0, clip_data ); } else { + HRGN saved_region = 0; + + if (clip) saved_region = add_extra_clipping_region( physdev, clip ); X11DRV_LockDIBSection( physdev, DIB_Status_GdiMod ); /* optimization for single-op ROPs */ @@ -1964,6 +1979,7 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info } X11DRV_UnlockDIBSection( physdev, !ret ); + if (saved_region) restore_clipping_region( physdev, saved_region ); } image->data = NULL; }
1
0
0
0
Alexandre Julliard : winex11: Add helper functions for changing and restoring the current clipping region .
by Alexandre Julliard
22 Jul '11
22 Jul '11
Module: wine Branch: master Commit: 72607b38171bab9de3ef99fd8dd18592bef2d30c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72607b38171bab9de3ef99fd8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 21 19:03:10 2011 +0200 winex11: Add helper functions for changing and restoring the current clipping region. --- dlls/winex11.drv/graphics.c | 51 ++++++++++++++++++++++++++++++++++++------ dlls/winex11.drv/text.c | 16 ++----------- dlls/winex11.drv/x11drv.h | 2 + dlls/winex11.drv/xrender.c | 16 ++----------- 4 files changed, 51 insertions(+), 34 deletions(-) diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index e867670..7c4e0d5 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -185,27 +185,62 @@ RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp ) } -/*********************************************************************** - * X11DRV_SetDeviceClipping - */ -void X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn ) +static void update_x11_clipping( X11DRV_PDEVICE *physDev ) { - X11DRV_PDEVICE *physDev = get_x11drv_dev( dev ); RGNDATA *data; - CombineRgn( physDev->region, vis_rgn, clip_rgn, clip_rgn ? RGN_AND : RGN_COPY ); if (!(data = X11DRV_GetRegionData( physDev->region, 0 ))) return; - wine_tsx11_lock(); XSetClipRectangles( gdi_display, physDev->gc, physDev->dc_rect.left, physDev->dc_rect.top, (XRectangle *)data->Buffer, data->rdh.nCount, YXBanded ); wine_tsx11_unlock(); if (physDev->xrender) X11DRV_XRender_SetDeviceClipping(physDev, data); - HeapFree( GetProcessHeap(), 0, data ); } +/*********************************************************************** + * add_extra_clipping_region + * + * Temporarily add a region to the current clipping region. + * The returned region must be restored with restore_clipping_region. + */ +HRGN add_extra_clipping_region( X11DRV_PDEVICE *dev, HRGN rgn ) +{ + HRGN ret, clip; + + if (!(clip = CreateRectRgn( 0, 0, 0, 0 ))) return 0; + CombineRgn( clip, dev->region, rgn, RGN_AND ); + ret = dev->region; + dev->region = clip; + update_x11_clipping( dev ); + return ret; +} + + +/*********************************************************************** + * restore_clipping_region + */ +void restore_clipping_region( X11DRV_PDEVICE *dev, HRGN rgn ) +{ + if (!rgn) return; + DeleteObject( dev->region ); + dev->region = rgn; + update_x11_clipping( dev ); +} + + +/*********************************************************************** + * X11DRV_SetDeviceClipping + */ +void X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn ) +{ + X11DRV_PDEVICE *physDev = get_x11drv_dev( dev ); + + CombineRgn( physDev->region, vis_rgn, clip_rgn, clip_rgn ? RGN_AND : RGN_COPY ); + update_x11_clipping( physDev ); +} + /*********************************************************************** * X11DRV_SetupGCForPatBlt diff --git a/dlls/winex11.drv/text.c b/dlls/winex11.drv/text.c index 89af8f6..442a4c2 100644 --- a/dlls/winex11.drv/text.c +++ b/dlls/winex11.drv/text.c @@ -85,13 +85,8 @@ BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, if (flags & ETO_CLIPPED) { - HRGN clip_region; - - clip_region = CreateRectRgnIndirect( lprect ); - /* make a copy of the current device region */ - saved_region = CreateRectRgn( 0, 0, 0, 0 ); - CombineRgn( saved_region, physDev->region, 0, RGN_COPY ); - X11DRV_SetDeviceClipping( dev, saved_region, clip_region ); + HRGN clip_region = CreateRectRgnIndirect( lprect ); + saved_region = add_extra_clipping_region( physDev, clip_region ); DeleteObject( clip_region ); } @@ -177,12 +172,7 @@ BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, } HeapFree( GetProcessHeap(), 0, str2b ); - if (flags & ETO_CLIPPED) - { - /* restore the device region */ - X11DRV_SetDeviceClipping( dev, saved_region, 0 ); - DeleteObject( saved_region ); - } + if (saved_region) restore_clipping_region( physDev, saved_region ); goto END; FAIL: diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 93d3981..deec898 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -289,6 +289,8 @@ extern X_PHYSBITMAP *X11DRV_init_phys_bitmap( HBITMAP hbitmap ) DECLSPEC_HIDDEN; extern Pixmap X11DRV_get_pixmap( HBITMAP hbitmap ) DECLSPEC_HIDDEN; extern RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp ) DECLSPEC_HIDDEN; +extern HRGN add_extra_clipping_region( X11DRV_PDEVICE *dev, HRGN rgn ) DECLSPEC_HIDDEN; +extern void restore_clipping_region( X11DRV_PDEVICE *dev, HRGN rgn ) DECLSPEC_HIDDEN; extern BOOL X11DRV_SetupGCForPatBlt( X11DRV_PDEVICE *physDev, GC gc, BOOL fMapColors ) DECLSPEC_HIDDEN; extern BOOL X11DRV_SetupGCForBrush( X11DRV_PDEVICE *physDev ) DECLSPEC_HIDDEN; diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index dc603af..ad8e08b 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1866,13 +1866,8 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag if (flags & ETO_CLIPPED) { - HRGN clip_region; - - clip_region = CreateRectRgnIndirect( lprect ); - /* make a copy of the current device region */ - saved_region = CreateRectRgn( 0, 0, 0, 0 ); - CombineRgn( saved_region, physDev->region, 0, RGN_COPY ); - X11DRV_SetDeviceClipping( &physDev->dev, saved_region, clip_region ); + HRGN clip_region = CreateRectRgnIndirect( lprect ); + saved_region = add_extra_clipping_region( physDev, clip_region ); DeleteObject( clip_region ); } @@ -2131,12 +2126,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag } LeaveCriticalSection(&xrender_cs); - if (flags & ETO_CLIPPED) - { - /* restore the device region */ - X11DRV_SetDeviceClipping( &physDev->dev, saved_region, 0 ); - DeleteObject( saved_region ); - } + if (saved_region) restore_clipping_region( physDev, saved_region ); retv = TRUE;
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
84
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
Results per page:
10
25
50
100
200