winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 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
849 discussions
Start a n
N
ew thread
Hans Leidekker : msi: Fix building the message string in MSI_ProcessMessage .
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: 31291ec2050a642ce67dd8c2f224d701f55050a3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=31291ec2050a642ce67dd8c2f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Mar 31 11:57:47 2011 +0200 msi: Fix building the message string in MSI_ProcessMessage. --- dlls/msi/package.c | 62 ++++++++++++++++++++++++++------------------------- 1 files changed, 32 insertions(+), 30 deletions(-) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 7317af2..49acdb7 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1703,8 +1703,7 @@ MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE hInstall) return handle; } -INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, - MSIRECORD *record) +INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, MSIRECORD *record ) { static const WCHAR szActionData[] = {'A','c','t','i','o','n','D','a','t','a',0}; @@ -1713,10 +1712,9 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, static const WCHAR szActionText[] = {'A','c','t','i','o','n','T','e','x','t',0}; LPWSTR message; - DWORD sz, total_size = 0, log_type = 0; - INT i, rc = 0; + DWORD i, len, total_len, log_type = 0; + INT rc = 0; char *msg; - int len; TRACE("%x\n", eMessageType); @@ -1769,35 +1767,39 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, } else { - INT msg_field=1; - message = msi_alloc(1*sizeof (WCHAR)); - message[0]=0; - msg_field = MSI_RecordGetFieldCount(record); - for (i = 1; i <= msg_field; i++) + static const WCHAR format[] = {'%','u',':',' ',0}; + UINT count = MSI_RecordGetFieldCount( record ); + WCHAR *p; + + total_len = 1; + for (i = 1; i <= count; i++) + { + len = 0; + MSI_RecordGetStringW( record, i, NULL, &len ); + total_len += len + 13; + } + p = message = msi_alloc( total_len * sizeof(WCHAR) ); + if (!p) return ERROR_OUTOFMEMORY; + + for (i = 1; i <= count; i++) { - LPWSTR tmp; - WCHAR number[3]; - static const WCHAR format[] = { '%','i',':',' ',0}; - sz = 0; - MSI_RecordGetStringW(record,i,NULL,&sz); - sz+=4; - total_size+=sz*sizeof(WCHAR); - tmp = msi_alloc(sz*sizeof(WCHAR)); - message = msi_realloc(message,total_size*sizeof (WCHAR)); - - MSI_RecordGetStringW(record,i,tmp,&sz); - - if (msg_field > 1) + if (count > 1) { - sprintfW(number,format,i); - strcatW(message,number); + len = sprintfW( p, format, i ); + total_len -= len; + p += len; + } + len = total_len; + MSI_RecordGetStringW( record, i, p, &len ); + total_len -= len; + p += len; + if (count > 1 && total_len) + { + *p++ = ' '; + total_len--; } - strcatW(message,tmp); - if (msg_field > 1) - strcatW(message, szSpace); - - msi_free(tmp); } + p[0] = 0; } TRACE("%p %p %p %x %x %s\n", gUIHandlerA, gUIHandlerW, gUIHandlerRecord,
1
0
0
0
Hans Leidekker : msi: Fix buffer size calculation in get_keypath.
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: 0aaf17c0d8c35de836540f83b573e1329b991e09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0aaf17c0d8c35de836540f83b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Mar 31 11:57:25 2011 +0200 msi: Fix buffer size calculation in get_keypath. --- dlls/msi/action.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index a5a1e33..73d6d1b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2879,14 +2879,11 @@ static WCHAR *get_keypath( MSIPACKAGE *package, HKEY root, const WCHAR *path ) UINT size; WCHAR *path_32node; - size = (strlenW( path ) + strlenW( szWow6432Node ) + 1) * sizeof(WCHAR); - path_32node = msi_alloc( size ); - if (!path_32node) - return NULL; + size = (strlenW( path ) + strlenW( szWow6432Node ) + 2) * sizeof(WCHAR); + if (!(path_32node = msi_alloc( size ))) return NULL; memcpy( path_32node, path, len * sizeof(WCHAR) ); - path_32node[len] = 0; - strcatW( path_32node, szWow6432Node ); + strcpyW( path_32node + len, szWow6432Node ); strcatW( path_32node, szBackSlash ); strcatW( path_32node, path + len ); return path_32node;
1
0
0
0
Bart Van Assche : ntdll: Avoid examining uninitialized data.
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: e5fe510720ba3d8a247a91e17d1b09bde5f268c3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5fe510720ba3d8a247a91e17…
Author: Bart Van Assche <bvanassche(a)acm.org> Date: Wed Mar 30 20:50:12 2011 +0200 ntdll: Avoid examining uninitialized data. --- dlls/ntdll/directory.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 66572da..b57741a 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -923,7 +923,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir ) #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) struct statfs stfs; - statfs( dir, &stfs ); + if (statfs( dir, &stfs ) == -1) return FALSE; /* Assume these file systems are always case insensitive on Mac OS. * For FreeBSD, only assume CIOPFS is case insensitive (AFAIK, Mac OS * is the only UNIX that supports case-insensitive lookup). @@ -960,7 +960,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir ) #elif defined(__NetBSD__) struct statvfs stfs; - statvfs( dir, &stfs ); + if (statvfs( dir, &stfs ) == -1) return FALSE; /* Only assume CIOPFS is case insensitive. */ if (strcmp( stfs.f_fstypename, "fusefs" ) || strncmp( stfs.f_mntfromname, "ciopfs", 5 )) @@ -973,7 +973,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir ) char *cifile; /* Only assume CIOPFS is case insensitive. */ - statfs( dir, &stfs ); + if (statfs( dir, &stfs ) == -1) return FALSE; if (stfs.f_type != 0x65735546 /* FUSE_SUPER_MAGIC */) return TRUE; /* Normally, we'd have to parse the mtab to find out exactly what @@ -2175,7 +2175,6 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i } } closedir( dir ); - goto not_found; /* avoid warning */ not_found: unix_name[pos - 1] = 0;
1
0
0
0
Matteo Bruni : opengl32/tests: Improve window destroy tests.
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: bc3ba2f06e4ce34177ac60dc4a48b6c39470d6e7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc3ba2f06e4ce34177ac60dc4…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Mon Mar 14 14:47:25 2011 +0100 opengl32/tests: Improve window destroy tests. --- dlls/opengl32/tests/opengl.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 1669d73..64b9ee5 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -949,6 +949,8 @@ static void test_destroy(HDC oldhdc) glFinish(); glerr = glGetError(); ok(glerr == GL_NO_ERROR, "Failed glClear, error %#x.\n", glerr); + ret = SwapBuffers(dc); + ok(ret, "Failed SwapBuffers, error %#x.\n", GetLastError()); ret = DestroyWindow(window); ok(ret, "Failed to destroy window, last error %#x.\n", GetLastError()); @@ -960,6 +962,10 @@ static void test_destroy(HDC oldhdc) err = GetLastError(); ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + SetLastError(0xdeadbeef); + ret = SwapBuffers(dc); + err = GetLastError(); + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#x.\n", err); ok(wglGetCurrentContext() == ctx, "Wrong current context.\n"); @@ -967,6 +973,10 @@ static void test_destroy(HDC oldhdc) glFinish(); glerr = glGetError(); ok(glerr == GL_NO_ERROR, "Failed glClear, error %#x.\n", glerr); + SetLastError(0xdeadbeef); + ret = SwapBuffers(dc); + err = GetLastError(); + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#x.\n", err); ret = wglMakeCurrent(NULL, NULL); ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); @@ -975,6 +985,10 @@ static void test_destroy(HDC oldhdc) glFinish(); glerr = glGetError(); todo_wine ok(glerr == GL_INVALID_OPERATION, "Failed glClear, error %#x.\n", glerr); + SetLastError(0xdeadbeef); + ret = SwapBuffers(dc); + err = GetLastError(); + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#x.\n", err); SetLastError(0xdeadbeef); ret = wglMakeCurrent(dc, ctx); @@ -1087,6 +1101,8 @@ static void test_destroy_read(HDC oldhdc) glFinish(); glerr = glGetError(); ok(glerr == GL_NO_ERROR, "Failed glCopyPixel, error %#x.\n", glerr); + ret = SwapBuffers(draw_dc); + ok(ret, "Failed SwapBuffers, error %#x.\n", GetLastError()); ret = DestroyWindow(read_window); ok(ret, "Failed to destroy window, last error %#x.\n", GetLastError()); @@ -1105,6 +1121,8 @@ static void test_destroy_read(HDC oldhdc) glFinish(); glerr = glGetError(); ok(glerr == GL_NO_ERROR, "Failed glClear, error %#x.\n", glerr); + ret = SwapBuffers(draw_dc); + ok(ret, "Failed SwapBuffers, error %#x.\n", GetLastError()); ret = wglMakeCurrent(NULL, NULL); ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); @@ -1125,6 +1143,10 @@ static void test_destroy_read(HDC oldhdc) glFinish(); glerr = glGetError(); todo_wine ok(glerr == GL_INVALID_OPERATION, "Failed glClear, error %#x.\n", glerr); + SetLastError(0xdeadbeef); + ret = SwapBuffers(draw_dc); + err = GetLastError(); + ok(!ret && err == ERROR_INVALID_HANDLE, "Unexpected behavior with SwapBuffer, last error %#x.\n", err); SetLastError(0xdeadbeef); ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx);
1
0
0
0
Matteo Bruni : winex11.drv: Take care of the destroyed drawable in wglFlush /wglFinish too.
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: 1e0075cd61c908b3cf6523c132fb16b1a8ee58ae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1e0075cd61c908b3cf6523c13…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Mon Mar 7 22:39:34 2011 +0100 winex11.drv: Take care of the destroyed drawable in wglFlush/wglFinish too. --- dlls/winex11.drv/opengl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index a7ec8c8..feead5f 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -2271,7 +2271,7 @@ void flush_gl_drawable(X11DRV_PDEVICE *physDev) { int w, h; - if (!physDev->gl_copy) + if (!physDev->gl_copy || !physDev->current_pf) return; w = physDev->dc_rect.right - physDev->dc_rect.left;
1
0
0
0
Matteo Bruni : winex11.drv: Don' t call glXSwapBuffers if the context or the drawable are invalid.
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: 90608c8ce633cd79dffd45d02b32fe16e615f4fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90608c8ce633cd79dffd45d02…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Mar 17 22:51:04 2011 +0100 winex11.drv: Don't call glXSwapBuffers if the context or the drawable are invalid. --- dlls/winex11.drv/opengl.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 81979ae..a7ec8c8 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3818,6 +3818,20 @@ BOOL CDECL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) TRACE("(%p)\n", physDev); + if (!ctx) + { + WARN("Using a NULL context, skipping\n"); + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (!physDev->current_pf) + { + WARN("Using an invalid drawable, skipping\n"); + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + drawable = get_glxdrawable(physDev); wine_tsx11_lock();
1
0
0
0
Matteo Bruni : winex11.drv: Fix wglMakeContextCurrent with an invalid drawable.
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: 1902e1cb9306b65ab903f02d855078545a1ddfa6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1902e1cb9306b65ab903f02d8…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Mar 16 00:32:47 2011 +0100 winex11.drv: Fix wglMakeContextCurrent with an invalid drawable. --- dlls/opengl32/tests/opengl.c | 8 ++++---- dlls/winex11.drv/opengl.c | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 7b6c911..1669d73 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -1129,10 +1129,10 @@ static void test_destroy_read(HDC oldhdc) SetLastError(0xdeadbeef); ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); err = GetLastError(); - todo_wine ok(!ret && (err == ERROR_INVALID_HANDLE || err == 0xc0070006), + ok(!ret && (err == ERROR_INVALID_HANDLE || err == 0xc0070006), "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); - todo_wine ok(wglGetCurrentContext() == NULL, "Wrong current context.\n"); + ok(wglGetCurrentContext() == NULL, "Wrong current context.\n"); wglMakeCurrent(NULL, NULL); @@ -1142,10 +1142,10 @@ static void test_destroy_read(HDC oldhdc) SetLastError(0xdeadbeef); ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); err = GetLastError(); - todo_wine ok(!ret && (err == ERROR_INVALID_HANDLE || err == 0xc0070006), + ok(!ret && (err == ERROR_INVALID_HANDLE || err == 0xc0070006), "Unexpected behavior when making context current, last error %#x.\n", err); - todo_wine ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n"); + ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n"); ret = wglDeleteContext(ctx); ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 1d2eacf..81979ae 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1972,6 +1972,12 @@ BOOL CDECL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* pDrawDev, X11DRV_PDEV ret = pglXMakeCurrent(gdi_display, None, NULL); NtCurrentTeb()->glContext = NULL; } + else if (!pDrawDev->current_pf) + { + WARN("Trying to use an invalid drawable\n"); + SetLastError(ERROR_INVALID_HANDLE); + ret = FALSE; + } else { if (NULL == pglXMakeContextCurrent) {
1
0
0
0
Matteo Bruni : winex11.drv: Don' t modify state if glXMakeContextCurrent fails.
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: 868974c61579fda8eabf84a3caf299346e069662 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=868974c61579fda8eabf84a3c…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Mar 11 21:47:32 2011 +0100 winex11.drv: Don't modify state if glXMakeContextCurrent fails. --- dlls/winex11.drv/opengl.c | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 0a23e44..1d2eacf 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1977,22 +1977,27 @@ BOOL CDECL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* pDrawDev, X11DRV_PDEV if (NULL == pglXMakeContextCurrent) { ret = FALSE; } else { - Wine_GLContext *prev_ctx = NtCurrentTeb()->glContext; Wine_GLContext *ctx = (Wine_GLContext *) hglrc; Drawable d_draw = get_glxdrawable(pDrawDev); Drawable d_read = get_glxdrawable(pReadDev); - if (prev_ctx) prev_ctx->tid = 0; - - ctx->has_been_current = TRUE; - ctx->tid = GetCurrentThreadId(); - ctx->hdc = pDrawDev->hdc; - ctx->read_hdc = pReadDev->hdc; - ctx->drawables[0] = d_draw; - ctx->drawables[1] = d_read; - ctx->refresh_drawables = FALSE; ret = pglXMakeContextCurrent(gdi_display, d_draw, d_read, ctx->ctx); - NtCurrentTeb()->glContext = ctx; + if (ret) + { + Wine_GLContext *prev_ctx = NtCurrentTeb()->glContext; + if (prev_ctx) prev_ctx->tid = 0; + + ctx->has_been_current = TRUE; + ctx->tid = GetCurrentThreadId(); + ctx->hdc = pDrawDev->hdc; + ctx->read_hdc = pReadDev->hdc; + ctx->drawables[0] = d_draw; + ctx->drawables[1] = d_read; + ctx->refresh_drawables = FALSE; + NtCurrentTeb()->glContext = ctx; + } + else + SetLastError(ERROR_INVALID_HANDLE); } } wine_tsx11_unlock();
1
0
0
0
Matteo Bruni : opengl32/tests: Add a test for window destroy with wglMakeContextCurrentARB.
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: 8818c1d8b6712af5efa754a5145817a28d36a23e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8818c1d8b6712af5efa754a51…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Mar 18 14:16:58 2011 +0100 opengl32/tests: Add a test for window destroy with wglMakeContextCurrentARB. --- dlls/opengl32/tests/opengl.c | 158 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 157 insertions(+), 1 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 9834c6d..7b6c911 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -24,8 +24,10 @@ void WINAPI glClearColor(float red, float green, float blue, float alpha); void WINAPI glClear(unsigned int mask); -void WINAPI glFinish(void); +#define GL_COLOR 0x1800 typedef unsigned int GLenum; +void WINAPI glCopyPixels(int x, int y, int width, int height, GLenum type); +void WINAPI glFinish(void); #define GL_NO_ERROR 0x0 #define GL_INVALID_OPERATION 0x502 GLenum WINAPI glGetError(void); @@ -1003,6 +1005,157 @@ static void test_destroy(HDC oldhdc) ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); } +static void test_destroy_read(HDC oldhdc) +{ + PIXELFORMATDESCRIPTOR pf_desc = + { + sizeof(PIXELFORMATDESCRIPTOR), + 1, /* version */ + PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, + PFD_TYPE_RGBA, + 24, /* 24-bit color depth */ + 0, 0, 0, 0, 0, 0, /* color bits */ + 0, /* alpha buffer */ + 0, /* shift bit */ + 0, /* accumulation buffer */ + 0, 0, 0, 0, /* accum bits */ + 32, /* z-buffer */ + 0, /* stencil buffer */ + 0, /* auxiliary buffer */ + PFD_MAIN_PLANE, /* main layer */ + 0, /* reserved */ + 0, 0, 0 /* layer masks */ + }; + int pixel_format; + HWND draw_window, read_window; + HGLRC ctx; + BOOL ret; + HDC read_dc, draw_dc; + GLenum glerr; + DWORD err; + HGLRC oldctx = wglGetCurrentContext(); + + ok(!!oldctx, "Expected to find a valid current context\n"); + + draw_window = CreateWindowA("static", "opengl32_test", + WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0); + ok(!!draw_window, "Failed to create window, last error %#x.\n", GetLastError()); + + draw_dc = GetDC(draw_window); + ok(!!draw_dc, "Failed to get DC.\n"); + + pixel_format = ChoosePixelFormat(draw_dc, &pf_desc); + if (!pixel_format) + { + win_skip("Failed to find pixel format.\n"); + ReleaseDC(draw_window, draw_dc); + DestroyWindow(draw_window); + return; + } + + ret = SetPixelFormat(draw_dc, pixel_format, &pf_desc); + ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + + read_window = CreateWindowA("static", "opengl32_test", + WS_POPUP, 0, 0, 640, 480, 0, 0, 0, 0); + ok(!!read_window, "Failed to create window, last error %#x.\n", GetLastError()); + + read_dc = GetDC(read_window); + ok(!!draw_dc, "Failed to get DC.\n"); + + pixel_format = ChoosePixelFormat(read_dc, &pf_desc); + if (!pixel_format) + { + win_skip("Failed to find pixel format.\n"); + ReleaseDC(read_window, read_dc); + DestroyWindow(read_window); + ReleaseDC(draw_window, draw_dc); + DestroyWindow(draw_window); + return; + } + + ret = SetPixelFormat(read_dc, pixel_format, &pf_desc); + ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + + ctx = wglCreateContext(draw_dc); + ok(!!ctx, "Failed to create GL context, last error %#x.\n", GetLastError()); + + ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); + ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + + glCopyPixels(0, 0, 640, 480, GL_COLOR); + glFinish(); + glerr = glGetError(); + ok(glerr == GL_NO_ERROR, "Failed glCopyPixel, error %#x.\n", glerr); + + ret = DestroyWindow(read_window); + ok(ret, "Failed to destroy window, last error %#x.\n", GetLastError()); + + ok(wglGetCurrentContext() == ctx, "Wrong current context.\n"); + + if (0) /* Crashes on AMD on Windows */ + { + glCopyPixels(0, 0, 640, 480, GL_COLOR); + glFinish(); + glerr = glGetError(); + ok(glerr == GL_NO_ERROR, "Failed glCopyPixel, error %#x.\n", glerr); + } + + glClear(GL_COLOR_BUFFER_BIT); + glFinish(); + glerr = glGetError(); + ok(glerr == GL_NO_ERROR, "Failed glClear, error %#x.\n", glerr); + + ret = wglMakeCurrent(NULL, NULL); + ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); + + if (0) /* This crashes with Nvidia drivers on Windows. */ + { + SetLastError(0xdeadbeef); + ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); + err = GetLastError(); + ok(!ret && err == ERROR_INVALID_HANDLE, + "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + } + + ret = DestroyWindow(draw_window); + ok(ret, "Failed to destroy window, last error %#x.\n", GetLastError()); + + glClear(GL_COLOR_BUFFER_BIT); + glFinish(); + glerr = glGetError(); + todo_wine ok(glerr == GL_INVALID_OPERATION, "Failed glClear, error %#x.\n", glerr); + + SetLastError(0xdeadbeef); + ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); + err = GetLastError(); + todo_wine ok(!ret && (err == ERROR_INVALID_HANDLE || err == 0xc0070006), + "Unexpected behavior when making context current, ret %d, last error %#x.\n", ret, err); + + todo_wine ok(wglGetCurrentContext() == NULL, "Wrong current context.\n"); + + wglMakeCurrent(NULL, NULL); + + wglMakeCurrent(oldhdc, oldctx); + ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n"); + + SetLastError(0xdeadbeef); + ret = pwglMakeContextCurrentARB(draw_dc, read_dc, ctx); + err = GetLastError(); + todo_wine ok(!ret && (err == ERROR_INVALID_HANDLE || err == 0xc0070006), + "Unexpected behavior when making context current, last error %#x.\n", err); + + todo_wine ok(wglGetCurrentContext() == oldctx, "Wrong current context.\n"); + + ret = wglDeleteContext(ctx); + ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + + ReleaseDC(read_window, read_dc); + ReleaseDC(draw_window, draw_dc); + + wglMakeCurrent(oldhdc, oldctx); +} + START_TEST(opengl) { HWND hwnd; @@ -1103,7 +1256,10 @@ START_TEST(opengl) test_opengl3(hdc); if(strstr(wgl_extensions, "WGL_ARB_make_current_read")) + { test_make_current_read(hdc); + test_destroy_read(hdc); + } else skip("WGL_ARB_make_current_read not supported, skipping test\n");
1
0
0
0
Piotr Caban : mshtml/tests: Ignore calls missing in IE6.
by Alexandre Julliard
31 Mar '11
31 Mar '11
Module: wine Branch: master Commit: 454da235ea30fae25bb6d12c8661565301dc2830 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=454da235ea30fae25bb6d12c8…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Mar 30 22:28:27 2011 +0200 mshtml/tests: Ignore calls missing in IE6. --- dlls/mshtml/tests/htmldoc.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 2df4e74..b0ceea0 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -74,6 +74,12 @@ DEFINE_OLEGUID(CGID_DocHostCmdPriv, 0x000214D4L, 0, 0); expect_ ## func = called_ ## func = FALSE; \ }while(0) +#define CHECK_CALLED_BROKEN(func) \ + do { \ + ok(called_ ## func || broken(!called_ ## func), "expected " #func "\n"); \ + expect_ ## func = called_ ## func = FALSE; \ + }while(0) + static IOleDocumentView *view = NULL; static HWND container_hwnd = NULL, hwnd = NULL, last_hwnd = NULL; @@ -1213,7 +1219,7 @@ static void continue_binding(IBindStatusCallback *callback) BINDSTATUS_BEGINDOWNLOADDATA, doc_url); ok(hres == S_OK, "OnProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres); if(status_code != HTTP_STATUS_OK) { - CHECK_CALLED(IsErrorUrl); + CHECK_CALLED_BROKEN(IsErrorUrl); SET_EXPECT(IsErrorUrl); } @@ -3928,7 +3934,7 @@ static void test_Load(IPersistMoniker *persist, IMoniker *mon) CHECK_CALLED(Invoke_AMBIENT_SILENT); CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED); CHECK_CALLED(Exec_ShellDocView_37); - todo_wine CHECK_CALLED(IsErrorUrl); + todo_wine CHECK_CALLED_BROKEN(IsErrorUrl); } else todo_wine CHECK_CALLED(GetTravelLog); @@ -4068,18 +4074,18 @@ static void test_download(DWORD flags) CHECK_CALLED(Exec_MSHTML_PARSECOMPLETE); CHECK_CALLED(Exec_HTTPEQUIV_DONE); SET_CALLED(SetStatusText); - if(nav_url) { /* avoiding race, FIXME: fund better way */ + if(nav_url) { /* avoiding race, FIXME: find better way */ SET_CALLED(UpdateUI); SET_CALLED(Exec_UPDATECOMMANDS); SET_CALLED(Exec_SETTITLE); - todo_wine CHECK_CALLED(UpdateBackForwardState); + todo_wine CHECK_CALLED_BROKEN(UpdateBackForwardState); } if(!editmode && !(flags & DWL_EMPTY)) todo_wine CHECK_CALLED(FireNavigateComplete2); if(!editmode) CHECK_CALLED(FireDocumentComplete); todo_wine CHECK_CALLED(ActiveElementChanged); - todo_wine CHECK_CALLED(IsErrorUrl); + todo_wine CHECK_CALLED_BROKEN(IsErrorUrl); load_state = LD_COMPLETE;
1
0
0
0
← Newer
1
2
3
4
5
6
...
85
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
Results per page:
10
25
50
100
200