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
November 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
910 discussions
Start a n
N
ew thread
Alexandre Julliard : winex11: Get rid of the SetDCOrg entry point.
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: 184f1fe33178eaff2f21764779521526ae53f879 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=184f1fe33178eaff2f2176477…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 17 12:43:53 2009 +0100 winex11: Get rid of the SetDCOrg entry point. --- dlls/winex11.drv/graphics.c | 12 ------------ dlls/winex11.drv/winex11.drv.spec | 1 - 2 files changed, 0 insertions(+), 13 deletions(-) diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index e6cedfb..bc00e85 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -1476,18 +1476,6 @@ BOOL CDECL X11DRV_GetDCOrgEx( X11DRV_PDEVICE *physDev, LPPOINT lpp ) } -/*********************************************************************** - * SetDCOrg (X11DRV.@) - */ -DWORD CDECL X11DRV_SetDCOrg( X11DRV_PDEVICE *physDev, INT x, INT y ) -{ - DWORD ret = MAKELONG( physDev->dc_rect.left + physDev->drawable_rect.left, - physDev->dc_rect.top + physDev->drawable_rect.top ); - physDev->dc_rect.left = x - physDev->drawable_rect.left; - physDev->dc_rect.top = y - physDev->drawable_rect.top; - return ret; -} - static unsigned char *get_icm_profile( unsigned long *size ) { Atom type; diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec index 6fd8831..4993d9a 100644 --- a/dlls/winex11.drv/winex11.drv.spec +++ b/dlls/winex11.drv/winex11.drv.spec @@ -46,7 +46,6 @@ @ cdecl SetBitmapBits(long ptr long) X11DRV_SetBitmapBits @ cdecl SetBkColor(ptr long) X11DRV_SetBkColor @ cdecl SetDCBrushColor(ptr long) X11DRV_SetDCBrushColor -@ cdecl SetDCOrg(ptr long long) X11DRV_SetDCOrg @ cdecl SetDCPenColor(ptr long) X11DRV_SetDCPenColor @ cdecl SetDIBColorTable(ptr long long ptr) X11DRV_SetDIBColorTable @ cdecl SetDIBits(ptr long long long ptr ptr long) X11DRV_SetDIBits
1
0
0
0
Alexandre Julliard : gdi32: Get rid of the SetDCOrg driver entry point.
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: 1c67717876d07240f7807a4a1be143bf6b5181ef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1c67717876d07240f7807a4a1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 17 12:43:43 2009 +0100 gdi32: Get rid of the SetDCOrg driver entry point. --- dlls/gdi32/driver.c | 1 - dlls/gdi32/enhmfdrv/init.c | 1 - dlls/gdi32/gdi_private.h | 1 - dlls/gdi32/mfdrv/init.c | 1 - 4 files changed, 0 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index ec5de20..73c594f 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -163,7 +163,6 @@ static struct graphics_driver *create_driver( HMODULE module ) GET_FUNC(SetBkColor); GET_FUNC(SetBkMode); GET_FUNC(SetDCBrushColor); - GET_FUNC(SetDCOrg); GET_FUNC(SetDCPenColor); GET_FUNC(SetDIBColorTable); GET_FUNC(SetDIBits); diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index dd0b89e..bc53493 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -121,7 +121,6 @@ static const DC_FUNCTIONS EMFDRV_Funcs = EMFDRV_SetBkColor, /* pSetBkColor */ EMFDRV_SetBkMode, /* pSetBkMode */ NULL, /* pSetDCBrushColor */ - NULL, /* pSetDCOrg */ NULL, /* pSetDCPenColor */ NULL, /* pSetDIBColorTable */ NULL, /* pSetDIBits */ diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index bc2d9a7..ab4cd03 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -161,7 +161,6 @@ typedef struct tagDC_FUNCS COLORREF (CDECL *pSetBkColor)(PHYSDEV,COLORREF); INT (CDECL *pSetBkMode)(PHYSDEV,INT); COLORREF (CDECL *pSetDCBrushColor)(PHYSDEV, COLORREF); - DWORD (CDECL *pSetDCOrg)(PHYSDEV,INT,INT); COLORREF (CDECL *pSetDCPenColor)(PHYSDEV, COLORREF); UINT (CDECL *pSetDIBColorTable)(PHYSDEV,UINT,UINT,const RGBQUAD*); INT (CDECL *pSetDIBits)(PHYSDEV,HBITMAP,UINT,UINT,LPCVOID,const BITMAPINFO*,UINT); diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c index 59c973a..4c88ac6 100644 --- a/dlls/gdi32/mfdrv/init.c +++ b/dlls/gdi32/mfdrv/init.c @@ -119,7 +119,6 @@ static const DC_FUNCTIONS MFDRV_Funcs = MFDRV_SetBkColor, /* pSetBkColor */ MFDRV_SetBkMode, /* pSetBkMode */ NULL, /* pSetDCBrushColor*/ - NULL, /* pSetDCOrg */ NULL, /* pSetDCPenColor*/ NULL, /* pSetDIBColorTable */ NULL, /* pSetDIBits */
1
0
0
0
Alexandre Julliard : gdi32: Disable SetDCOrg16.
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: 1fd7159cae735a83b5ea5e8f3646d449be902291 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fd7159cae735a83b5ea5e8f3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 17 12:42:16 2009 +0100 gdi32: Disable SetDCOrg16. --- dlls/gdi32/gdi16.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dlls/gdi32/gdi16.c b/dlls/gdi32/gdi16.c index 0712f40..a8644da 100644 --- a/dlls/gdi32/gdi16.c +++ b/dlls/gdi32/gdi16.c @@ -3662,13 +3662,8 @@ void WINAPI SetDCState16( HDC16 hdc, HDC16 hdcs ) */ DWORD WINAPI SetDCOrg16( HDC16 hdc16, INT16 x, INT16 y ) { - DWORD prevOrg = 0; - HDC hdc = HDC_32( hdc16 ); - DC *dc = get_dc_ptr( hdc ); - if (!dc) return 0; - if (dc->funcs->pSetDCOrg) prevOrg = dc->funcs->pSetDCOrg( dc->physDev, x, y ); - release_dc_ptr( dc ); - return prevOrg; + FIXME( "%04x %d,%d no longer supported\n", hdc16, x, y ); + return 0; }
1
0
0
0
Alexandre Julliard : gdi32: Reimplement SaveVisRgn16/ RestoreVisRgn16 to avoid accessing the DC internals.
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: 16da76923d90291b2e6dc24e8e886aeb84f398ab URL:
http://source.winehq.org/git/wine.git/?a=commit;h=16da76923d90291b2e6dc24e8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 17 12:28:44 2009 +0100 gdi32: Reimplement SaveVisRgn16/RestoreVisRgn16 to avoid accessing the DC internals. --- dlls/gdi32/dc.c | 10 ------- dlls/gdi32/gdi16.c | 66 ++++++++++++++++++++++++++------------------- dlls/gdi32/gdi_private.h | 8 ----- 3 files changed, 38 insertions(+), 46 deletions(-) diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index f7b295a..fdfc100 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -144,7 +144,6 @@ DC *alloc_dc_ptr( const DC_FUNCTIONS *funcs, WORD magic ) dc->BoundsRect.top = 0; dc->BoundsRect.right = 0; dc->BoundsRect.bottom = 0; - dc->saved_visrgn = NULL; PATH_InitGdiPath(&dc->path); if (!(dc->hSelf = alloc_gdi_handle( &dc->header, magic, &dc_funcs ))) @@ -403,7 +402,6 @@ INT save_dc_state( HDC hdc ) newdc->pAbortProc = NULL; newdc->hookProc = NULL; - newdc->saved_visrgn = NULL; if (!(newdc->hSelf = alloc_gdi_handle( &newdc->header, dc->header.type, &dc_funcs ))) { @@ -845,14 +843,6 @@ BOOL WINAPI DeleteDC( HDC hdc ) dc->physDev = NULL; } - while (dc->saved_visrgn) - { - struct saved_visrgn *next = dc->saved_visrgn->next; - DeleteObject( dc->saved_visrgn->hrgn ); - HeapFree( GetProcessHeap(), 0, dc->saved_visrgn ); - dc->saved_visrgn = next; - } - free_dc_ptr( dc ); if (funcs) DRIVER_release_driver( funcs ); /* do that after releasing the GDI lock */ return TRUE; diff --git a/dlls/gdi32/gdi16.c b/dlls/gdi32/gdi16.c index bd535d1..0712f40 100644 --- a/dlls/gdi32/gdi16.c +++ b/dlls/gdi32/gdi16.c @@ -34,6 +34,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdi); #define HGDIOBJ_32(handle16) ((HGDIOBJ)(ULONG_PTR)(handle16)) #define HGDIOBJ_16(handle32) ((HGDIOBJ16)(ULONG_PTR)(handle32)) +struct saved_visrgn +{ + struct list entry; + HDC hdc; + HRGN hrgn; +}; + +static struct list saved_regions = LIST_INIT( saved_regions ); + /* * ############################################################################ */ @@ -1312,9 +1321,18 @@ BOOL16 WINAPI DeleteDC16( HDC16 hdc ) { if (DeleteDC( HDC_32(hdc) )) { + struct saved_visrgn *saved, *next; struct gdi_thunk* thunk; - if ((thunk = GDI_FindThunk(hdc))) - GDI_DeleteThunk(thunk); + + if ((thunk = GDI_FindThunk(hdc))) GDI_DeleteThunk(thunk); + + LIST_FOR_EACH_ENTRY_SAFE( saved, next, &saved_regions, struct saved_visrgn, entry ) + { + if (saved->hdc != HDC_32(hdc)) continue; + list_remove( &saved->entry ); + DeleteObject( saved->hrgn ); + HeapFree( GetProcessHeap(), 0, saved ); + } return TRUE; } return FALSE; @@ -3704,24 +3722,19 @@ HRGN16 WINAPI SaveVisRgn16( HDC16 hdc16 ) { struct saved_visrgn *saved; HDC hdc = HDC_32( hdc16 ); - DC *dc = get_dc_ptr( hdc ); - if (!dc) return 0; TRACE("%p\n", hdc ); - update_dc( dc ); - if (!(saved = HeapAlloc( GetProcessHeap(), 0, sizeof(*saved) ))) goto error; - if (!(saved->hrgn = CreateRectRgn( 0, 0, 0, 0 ))) goto error; - CombineRgn( saved->hrgn, dc->hVisRgn, 0, RGN_COPY ); - saved->next = dc->saved_visrgn; - dc->saved_visrgn = saved; - release_dc_ptr( dc ); + if (!(saved = HeapAlloc( GetProcessHeap(), 0, sizeof(*saved) ))) return 0; + if (!(saved->hrgn = CreateRectRgn( 0, 0, 0, 0 ))) + { + HeapFree( GetProcessHeap(), 0, saved ); + return 0; + } + saved->hdc = hdc; + GetRandomRgn( hdc, saved->hrgn, SYSRGN ); + list_add_head( &saved_regions, &saved->entry ); return HRGN_16(saved->hrgn); - -error: - release_dc_ptr( dc ); - HeapFree( GetProcessHeap(), 0, saved ); - return 0; } @@ -3732,22 +3745,19 @@ INT16 WINAPI RestoreVisRgn16( HDC16 hdc16 ) { struct saved_visrgn *saved; HDC hdc = HDC_32( hdc16 ); - DC *dc = get_dc_ptr( hdc ); INT16 ret = ERROR; - if (!dc) return ERROR; - TRACE("%p\n", hdc ); - if (!(saved = dc->saved_visrgn)) goto done; - - ret = CombineRgn( dc->hVisRgn, saved->hrgn, 0, RGN_COPY ); - dc->saved_visrgn = saved->next; - DeleteObject( saved->hrgn ); - HeapFree( GetProcessHeap(), 0, saved ); - CLIPPING_UpdateGCRegion( dc ); - done: - release_dc_ptr( dc ); + LIST_FOR_EACH_ENTRY( saved, &saved_regions, struct saved_visrgn, entry ) + { + if (saved->hdc != hdc) continue; + ret = SelectVisRgn( hdc, saved->hrgn ); + list_remove( &saved->entry ); + DeleteObject( saved->hrgn ); + HeapFree( GetProcessHeap(), 0, saved ); + break; + } return ret; } diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index ad57b1b..bc2d9a7 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -234,12 +234,6 @@ typedef struct tagGdiPath typedef struct tagGdiFont GdiFont; -struct saved_visrgn -{ - struct saved_visrgn *next; - HRGN hrgn; -}; - typedef struct tagDC { GDIOBJHDR header; @@ -310,8 +304,6 @@ typedef struct tagDC XFORM xformVport2World; /* Inverse of the above transformation */ BOOL vport2WorldValid; /* Is xformVport2World valid? */ RECT BoundsRect; /* Current bounding rect */ - - struct saved_visrgn *saved_visrgn; } DC; /* DC flags */
1
0
0
0
Alexandre Julliard : gdi32: Return copies of the region in InquireVisRgn16 and GetClipRgn16.
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: 61925b7e89f51c35b4d52c5b7050b210c9ac7186 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=61925b7e89f51c35b4d52c5b7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 17 12:26:04 2009 +0100 gdi32: Return copies of the region in InquireVisRgn16 and GetClipRgn16. --- dlls/gdi32/gdi16.c | 26 ++++++++++---------------- 1 files changed, 10 insertions(+), 16 deletions(-) diff --git a/dlls/gdi32/gdi16.c b/dlls/gdi32/gdi16.c index 8c4f79b..bd535d1 100644 --- a/dlls/gdi32/gdi16.c +++ b/dlls/gdi32/gdi16.c @@ -3659,14 +3659,11 @@ DWORD WINAPI SetDCOrg16( HDC16 hdc16, INT16 x, INT16 y ) */ HRGN16 WINAPI InquireVisRgn16( HDC16 hdc ) { - HRGN16 ret = 0; - DC * dc = get_dc_ptr( HDC_32(hdc) ); - if (dc) - { - ret = HRGN_16(dc->hVisRgn); - release_dc_ptr( dc ); - } - return ret; + static HRGN hrgn; + + if (!hrgn) hrgn = CreateRectRgn( 0, 0, 0, 0 ); + GetRandomRgn( HDC_32(hdc), hrgn, SYSRGN ); + return HRGN_16(hrgn); } @@ -3760,14 +3757,11 @@ INT16 WINAPI RestoreVisRgn16( HDC16 hdc16 ) */ HRGN16 WINAPI GetClipRgn16( HDC16 hdc ) { - HRGN16 ret = 0; - DC * dc = get_dc_ptr( HDC_32(hdc) ); - if (dc) - { - ret = HRGN_16(dc->hClipRgn); - release_dc_ptr( dc ); - } - return ret; + static HRGN hrgn; + + if (!hrgn) hrgn = CreateRectRgn( 0, 0, 0, 0 ); + GetClipRgn( HDC_32(hdc), hrgn ); + return HRGN_16(hrgn); }
1
0
0
0
Alexandre Julliard : gdi32: Disable the 16-bit visible region manipulation functions.
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: 569f56e87a50faa258a265a63719217dac67c792 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=569f56e87a50faa258a265a63…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 17 12:21:15 2009 +0100 gdi32: Disable the 16-bit visible region manipulation functions. --- dlls/gdi32/gdi16.c | 69 ++++----------------------------------------------- 1 files changed, 6 insertions(+), 63 deletions(-) diff --git a/dlls/gdi32/gdi16.c b/dlls/gdi32/gdi16.c index c8d0536..8c4f79b 100644 --- a/dlls/gdi32/gdi16.c +++ b/dlls/gdi32/gdi16.c @@ -3675,17 +3675,8 @@ HRGN16 WINAPI InquireVisRgn16( HDC16 hdc ) */ INT16 WINAPI OffsetVisRgn16( HDC16 hdc16, INT16 x, INT16 y ) { - INT16 retval; - HDC hdc = HDC_32( hdc16 ); - DC * dc = get_dc_ptr( hdc ); - - if (!dc) return ERROR; - TRACE("%p %d,%d\n", hdc, x, y ); - update_dc( dc ); - retval = OffsetRgn( dc->hVisRgn, x, y ); - CLIPPING_UpdateGCRegion( dc ); - release_dc_ptr( dc ); - return retval; + FIXME( "%04x %d,%d no longer supported\n", hdc16, x, y ); + return ERROR; } @@ -3694,32 +3685,8 @@ INT16 WINAPI OffsetVisRgn16( HDC16 hdc16, INT16 x, INT16 y ) */ INT16 WINAPI ExcludeVisRect16( HDC16 hdc16, INT16 left, INT16 top, INT16 right, INT16 bottom ) { - HRGN tempRgn; - INT16 ret; - POINT pt[2]; - HDC hdc = HDC_32( hdc16 ); - DC * dc = get_dc_ptr( hdc ); - if (!dc) return ERROR; - - pt[0].x = left; - pt[0].y = top; - pt[1].x = right; - pt[1].y = bottom; - - LPtoDP( hdc, pt, 2 ); - - TRACE("%p %d,%d - %d,%d\n", hdc, pt[0].x, pt[0].y, pt[1].x, pt[1].y); - - if (!(tempRgn = CreateRectRgn( pt[0].x, pt[0].y, pt[1].x, pt[1].y ))) ret = ERROR; - else - { - update_dc( dc ); - ret = CombineRgn( dc->hVisRgn, dc->hVisRgn, tempRgn, RGN_DIFF ); - DeleteObject( tempRgn ); - } - if (ret != ERROR) CLIPPING_UpdateGCRegion( dc ); - release_dc_ptr( dc ); - return ret; + FIXME( "%04x %d,%d-%d,%d no longer supported\n", hdc16, left, top, right, bottom ); + return ERROR; } @@ -3728,32 +3695,8 @@ INT16 WINAPI ExcludeVisRect16( HDC16 hdc16, INT16 left, INT16 top, INT16 right, */ INT16 WINAPI IntersectVisRect16( HDC16 hdc16, INT16 left, INT16 top, INT16 right, INT16 bottom ) { - HRGN tempRgn; - INT16 ret; - POINT pt[2]; - HDC hdc = HDC_32( hdc16 ); - DC * dc = get_dc_ptr( hdc ); - if (!dc) return ERROR; - - pt[0].x = left; - pt[0].y = top; - pt[1].x = right; - pt[1].y = bottom; - - LPtoDP( hdc, pt, 2 ); - - TRACE("%p %d,%d - %d,%d\n", hdc, pt[0].x, pt[0].y, pt[1].x, pt[1].y); - - if (!(tempRgn = CreateRectRgn( pt[0].x, pt[0].y, pt[1].x, pt[1].y ))) ret = ERROR; - else - { - update_dc( dc ); - ret = CombineRgn( dc->hVisRgn, dc->hVisRgn, tempRgn, RGN_AND ); - DeleteObject( tempRgn ); - } - if (ret != ERROR) CLIPPING_UpdateGCRegion( dc ); - release_dc_ptr( dc ); - return ret; + FIXME( "%04x %d,%d-%d,%d no longer supported\n", hdc16, left, top, right, bottom ); + return ERROR; }
1
0
0
0
Alexandre Julliard : gdi32: Reimplement LPtoDP16/ DPtoLP16 on top of the 32-bit functions.
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: 250237e1c1d1e7a16678de7ba8107c0431807971 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=250237e1c1d1e7a16678de7ba…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 17 12:19:36 2009 +0100 gdi32: Reimplement LPtoDP16/DPtoLP16 on top of the 32-bit functions. --- dlls/gdi32/gdi16.c | 56 +++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 40 insertions(+), 16 deletions(-) diff --git a/dlls/gdi32/gdi16.c b/dlls/gdi32/gdi16.c index 62c9ac6..c8d0536 100644 --- a/dlls/gdi32/gdi16.c +++ b/dlls/gdi32/gdi16.c @@ -3564,17 +3564,29 @@ VOID WINAPI SetMagicColors16(HDC16 hDC, COLORREF color, UINT16 index) */ BOOL16 WINAPI DPtoLP16( HDC16 hdc, LPPOINT16 points, INT16 count ) { - DC * dc = get_dc_ptr( HDC_32(hdc) ); - if (!dc) return FALSE; + POINT points32[8], *pt32 = points32; + int i; + BOOL ret; - while (count--) + if (count > 8) { - points->x = MulDiv( points->x - dc->vportOrgX, dc->wndExtX, dc->vportExtX ) + dc->wndOrgX; - points->y = MulDiv( points->y - dc->vportOrgY, dc->wndExtY, dc->vportExtY ) + dc->wndOrgY; - points++; + if (!(pt32 = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*pt32) ))) return FALSE; } - release_dc_ptr( dc ); - return TRUE; + for (i = 0; i < count; i++) + { + pt32[i].x = points[i].x; + pt32[i].y = points[i].y; + } + if ((ret = DPtoLP( HDC_32(hdc), pt32, count ))) + { + for (i = 0; i < count; i++) + { + points[i].x = pt32[i].x; + points[i].y = pt32[i].y; + } + } + if (pt32 != points32) HeapFree( GetProcessHeap(), 0, pt32 ); + return ret; } @@ -3583,17 +3595,29 @@ BOOL16 WINAPI DPtoLP16( HDC16 hdc, LPPOINT16 points, INT16 count ) */ BOOL16 WINAPI LPtoDP16( HDC16 hdc, LPPOINT16 points, INT16 count ) { - DC * dc = get_dc_ptr( HDC_32(hdc) ); - if (!dc) return FALSE; + POINT points32[8], *pt32 = points32; + int i; + BOOL ret; - while (count--) + if (count > 8) { - points->x = MulDiv( points->x - dc->wndOrgX, dc->vportExtX, dc->wndExtX ) + dc->vportOrgX; - points->y = MulDiv( points->y - dc->wndOrgY, dc->vportExtY, dc->wndExtY ) + dc->vportOrgY; - points++; + if (!(pt32 = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*pt32) ))) return FALSE; } - release_dc_ptr( dc ); - return TRUE; + for (i = 0; i < count; i++) + { + pt32[i].x = points[i].x; + pt32[i].y = points[i].y; + } + if ((ret = LPtoDP( HDC_32(hdc), pt32, count ))) + { + for (i = 0; i < count; i++) + { + points[i].x = pt32[i].x; + points[i].y = pt32[i].y; + } + } + if (pt32 != points32) HeapFree( GetProcessHeap(), 0, pt32 ); + return ret; }
1
0
0
0
Alexandre Julliard : gdi32: Don't crash when we don't have AbortProc thunks .
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: 9a145d13f1b297f29cb1c0b107d3e05bf8cecebf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a145d13f1b297f29cb1c0b10…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 17 12:17:37 2009 +0100 gdi32: Don't crash when we don't have AbortProc thunks. --- dlls/gdi32/gdi16.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/gdi16.c b/dlls/gdi32/gdi16.c index 37a15e9..62c9ac6 100644 --- a/dlls/gdi32/gdi16.c +++ b/dlls/gdi32/gdi16.c @@ -127,6 +127,7 @@ static struct gdi_thunk* GDI_FindThunk(HDC16 hdc) { struct gdi_thunk* thunk; + if (!GDI_Thunks) return NULL; for (thunk = GDI_Thunks; thunk < &GDI_Thunks[GDI_MAX_THUNKS]; thunk++) { if (thunk->hdc == hdc) return thunk;
1
0
0
0
Juan Lang : crypt32/tests: Fix another test failure.
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: a299470622dfb04197f35c49082eafe2c32fd844 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a299470622dfb04197f35c490…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Nov 16 14:23:17 2009 -0800 crypt32/tests: Fix another test failure. --- dlls/crypt32/tests/chain.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c index bfdf203..b5ceb61 100644 --- a/dlls/crypt32/tests/chain.c +++ b/dlls/crypt32/tests/chain.c @@ -3512,8 +3512,10 @@ static void testGetCertChain(void) { ok(chain->TrustStatus.dwErrorStatus == chainCheckEmbeddedNull.status.status.dwErrorStatus || - broken(chain->TrustStatus.dwErrorStatus == - chainCheckEmbeddedNullBroken.status.status.dwErrorStatus), + broken((chain->TrustStatus.dwErrorStatus & + ~chainCheckEmbeddedNullBroken.status.statusToIgnore.dwErrorStatus) == + (chainCheckEmbeddedNullBroken.status.status.dwErrorStatus & + ~chainCheckEmbeddedNullBroken.status.statusToIgnore.dwErrorStatus)), "unexpected chain error status %08x\n", chain->TrustStatus.dwErrorStatus); if (chainCheckEmbeddedNull.status.status.dwErrorStatus ==
1
0
0
0
Juan Lang : crypt32: Implement CertIsRDNAttrsInCertificateName.
by Alexandre Julliard
17 Nov '09
17 Nov '09
Module: wine Branch: master Commit: 440c702ce413861f8a030e728ee6bceee255b513 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=440c702ce413861f8a030e728…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Nov 16 17:08:03 2009 -0800 crypt32: Implement CertIsRDNAttrsInCertificateName. --- dlls/crypt32/cert.c | 78 +++++++++++++++++++++++++++++++++++++++++++-- dlls/crypt32/tests/cert.c | 15 --------- 2 files changed, 75 insertions(+), 18 deletions(-) diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index 656c547..f91adc1 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -1832,12 +1832,84 @@ PCERT_RDN_ATTR WINAPI CertFindRDNAttr(LPCSTR pszObjId, PCERT_NAME_INFO pName) return ret; } +static BOOL find_matching_rdn_attr(DWORD dwFlags, const CERT_NAME_INFO *name, + const CERT_RDN_ATTR *attr) +{ + DWORD i, j; + BOOL match = FALSE; + + for (i = 0; !match && i < name->cRDN; i++) + { + for (j = 0; j < name->rgRDN[i].cRDNAttr; j++) + { + if (!strcmp(name->rgRDN[i].rgRDNAttr[j].pszObjId, + attr->pszObjId) && + name->rgRDN[i].rgRDNAttr[j].dwValueType == + attr->dwValueType) + { + if (dwFlags & CERT_UNICODE_IS_RDN_ATTRS_FLAG) + { + LPCWSTR nameStr = + (LPCWSTR)name->rgRDN[i].rgRDNAttr[j].Value.pbData; + LPCWSTR attrStr = (LPCWSTR)attr->Value.pbData; + + if (dwFlags & CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG) + match = !strncmpiW(nameStr, attrStr, + attr->Value.cbData / sizeof(WCHAR)); + else + match = !strncmpW(nameStr, attrStr, + attr->Value.cbData / sizeof(WCHAR)); + TRACE("%s : %s => %d\n", + debugstr_wn(nameStr, attr->Value.cbData / sizeof(WCHAR)), + debugstr_wn(attrStr, attr->Value.cbData / sizeof(WCHAR)), + match); + } + else + { + LPCSTR nameStr = + (LPCSTR)name->rgRDN[i].rgRDNAttr[j].Value.pbData; + LPCSTR attrStr = (LPCSTR)attr->Value.pbData; + + if (dwFlags & CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG) + match = !strncasecmp(nameStr, attrStr, + attr->Value.cbData); + else + match = !strncmp(nameStr, attrStr, attr->Value.cbData); + TRACE("%s : %s => %d\n", + debugstr_an(nameStr, attr->Value.cbData), + debugstr_an(attrStr, attr->Value.cbData), match); + } + } + } + } + return match; +} + BOOL WINAPI CertIsRDNAttrsInCertificateName(DWORD dwCertEncodingType, DWORD dwFlags, PCERT_NAME_BLOB pCertName, PCERT_RDN pRDN) { - FIXME("(%08x, %08x, %p, %p): stub\n", dwCertEncodingType, dwFlags, - pCertName, pRDN); - return FALSE; + CERT_NAME_INFO *name; + LPCSTR type; + DWORD size; + BOOL ret; + + TRACE("(%08x, %08x, %p, %p)\n", dwCertEncodingType, dwFlags, pCertName, + pRDN); + + type = dwFlags & CERT_UNICODE_IS_RDN_ATTRS_FLAG ? X509_UNICODE_NAME : + X509_NAME; + if ((ret = CryptDecodeObjectEx(dwCertEncodingType, type, pCertName->pbData, + pCertName->cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, &name, &size))) + { + DWORD i; + + for (i = 0; ret && i < pRDN->cRDNAttr; i++) + ret = find_matching_rdn_attr(dwFlags, name, &pRDN->rgRDNAttr[i]); + if (!ret) + SetLastError(CRYPT_E_NO_MATCH); + LocalFree(name); + } + return ret; } LONG WINAPI CertVerifyTimeValidity(LPFILETIME pTimeToVerify, diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index 186691f..4a1c449 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -2662,18 +2662,15 @@ static void testIsRDNAttrsInCertificateName(void) } SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(0, 0, &name, NULL); - todo_wine ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); attr[0].pszObjId = oid_1_2_3; rdn.rgRDNAttr = attr; rdn.cRDNAttr = 1; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); attr[0].pszObjId = oid_common_name; @@ -2681,28 +2678,24 @@ static void testIsRDNAttrsInCertificateName(void) attr[0].Value.cbData = strlen(juan); attr[0].Value.pbData = (BYTE *)juan; ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); /* Again, spaces are not removed for name comparison. */ attr[0].Value.cbData = strlen(juan_with_leading_space); attr[0].Value.pbData = (BYTE *)juan_with_leading_space; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); attr[0].Value.cbData = strlen(juan_with_intermediate_space); attr[0].Value.pbData = (BYTE *)juan_with_intermediate_space; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); attr[0].Value.cbData = strlen(juan_with_trailing_space); attr[0].Value.pbData = (BYTE *)juan_with_trailing_space; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); /* The lower case name isn't matched unless a case insensitive match is @@ -2712,12 +2705,10 @@ static void testIsRDNAttrsInCertificateName(void) attr[0].Value.pbData = (BYTE *)juan_lower_case; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG, &name, &rdn); - todo_wine ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); /* The values don't match unless they have the same RDN type */ attr[0].dwValueType = CERT_RDN_UNICODE_STRING; @@ -2725,13 +2716,11 @@ static void testIsRDNAttrsInCertificateName(void) attr[0].Value.pbData = (BYTE *)juanW; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, CERT_UNICODE_IS_RDN_ATTRS_FLAG, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); attr[0].dwValueType = CERT_RDN_IA5_STRING; @@ -2739,7 +2728,6 @@ static void testIsRDNAttrsInCertificateName(void) attr[0].Value.pbData = (BYTE *)juan; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); /* All attributes must be present */ @@ -2753,20 +2741,17 @@ static void testIsRDNAttrsInCertificateName(void) rdn.cRDNAttr = 2; SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); /* Order also matters */ name.pbData = cnThenO; name.cbData = sizeof(cnThenO); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(ret, "CertIsRDNAttrsInCertificateName failed: %08x\n", GetLastError()); name.pbData = oThenCN; name.cbData = sizeof(oThenCN); SetLastError(0xdeadbeef); ret = CertIsRDNAttrsInCertificateName(X509_ASN_ENCODING, 0, &name, &rdn); - todo_wine ok(!ret && GetLastError() == CRYPT_E_NO_MATCH, "expected CRYPT_E_NO_MATCH, got %08x\n", GetLastError()); }
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
91
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
Results per page:
10
25
50
100
200