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 2006
----- 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
792 discussions
Start a n
N
ew thread
Francois Gouget : user32/include: Don' t define the window and control styles if NOWINSTYLES is set.
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: b1602267f01d1280af042abe9553e9219313458e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1602267f01d1280af042abe9…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Nov 8 01:05:20 2006 +0100 user32/include: Don't define the window and control styles if NOWINSTYLES is set. --- include/winuser.h | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include/winuser.h b/include/winuser.h index 8d68802..bb0ca0a 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -654,6 +654,7 @@ #define ODS_NOFOCUSRECT 0x0200 /* No fo #define ODS_COMBOBOXEDIT 0x1000 /* Edit of a combo box */ /* Edit control styles */ +#ifndef NOWINSTYLES #define ES_LEFT 0x00000000 #define ES_CENTER 0x00000001 #define ES_RIGHT 0x00000002 @@ -669,6 +670,7 @@ #define ES_OEMCONVERT 0x00000400 #define ES_READONLY 0x00000800 #define ES_WANTRETURN 0x00001000 #define ES_NUMBER 0x00002000 +#endif /* NOWINSTYLES */ /* OEM Resource Ordinal Numbers */ #ifdef OEMRESOURCE @@ -1623,7 +1625,7 @@ #define SC_SEPARATOR 0xf00f #define SC_ICON SC_MINIMIZE #define SC_ZOOM SC_MAXIMIZE - +#ifndef NOWINSTYLES #define CS_VREDRAW 0x00000001 #define CS_HREDRAW 0x00000002 #define CS_KEYCVTWINDOW 0x00000004 @@ -1639,6 +1641,7 @@ #define CS_BYTEALIGNWINDOW 0x00002000 #define CS_GLOBALCLASS 0x00004000 #define CS_IME 0x00010000 #define CS_DROPSHADOW 0x00020000 +#endif /* NOWINSTYLES */ #define PRF_CHECKVISIBLE 0x00000001L #define PRF_NONCLIENT 0x00000002L @@ -2142,6 +2145,7 @@ #define SB_CTL 2 #define SB_BOTH 3 /* Scrollbar styles */ +#ifndef NOWINSTYLES #define SBS_HORZ 0x0000L #define SBS_VERT 0x0001L #define SBS_TOPALIGN 0x0002L @@ -2152,6 +2156,7 @@ #define SBS_SIZEBOXTOPLEFTALIGN 0x00 #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L #define SBS_SIZEBOX 0x0008L #define SBS_SIZEGRIP 0x0010L +#endif /* NOWINSTYLES */ /* EnableScrollBar() flags */ #define ESB_ENABLE_BOTH 0x0000 @@ -2291,6 +2296,7 @@ #define SIF_TRACKPOS 0x0010 #define SIF_ALL (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS) /* Listbox styles */ +#ifndef NOWINSTYLES #define LBS_NOTIFY 0x0001 #define LBS_SORT 0x0002 #define LBS_NOREDRAW 0x0004 @@ -2308,6 +2314,7 @@ #define LBS_NODATA 0x2000 #define LBS_NOSEL 0x4000 #define LBS_COMBOBOX 0x8000 #define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER) +#endif /* NOWINSTYLES */ /* Listbox messages */ #define LB_ADDSTRING 0x0180 @@ -2371,6 +2378,7 @@ #define LB_ERRSPACE (-2) #define LB_CTLCODE 0L /* Combo box styles */ +#ifndef NOWINSTYLES #define CBS_SIMPLE 0x0001L #define CBS_DROPDOWN 0x0002L #define CBS_DROPDOWNLIST 0x0003L @@ -2385,7 +2393,7 @@ #define CBS_DISABLENOSCROLL 0x0800L #define CBS_UPPERCASE 0x2000L #define CBS_LOWERCASE 0x4000L - +#endif /* NOWINSTYLES */ /* Combo box messages */ #define CB_GETEDITSEL 0x0140 @@ -3021,6 +3029,8 @@ typedef struct tagMINIMIZEDMETRICS { int iArrange; } MINIMIZEDMETRICS, *PMINIMIZEDMETRICS, *LPMINIMIZEDMETRICS; +#ifndef NOWINSTYLES + /* Window Styles */ #define WS_OVERLAPPED 0x00000000L #define WS_POPUP 0x80000000L @@ -3083,6 +3093,8 @@ #define WS_EX_PALETTEWINDOW (WS_EX_WI /* WINE internal... */ #define WS_EX_TRAYWINDOW 0x80000000L +#endif /* NOWINSTYLES */ + /* Window scrolling */ #define SW_SCROLLCHILDREN 0x0001 #define SW_INVALIDATE 0x0002
1
0
0
0
Dmitry Timoshkov : winex11.drv: Call SetWindowPos with SWP_FRAMECHANGED set when switching from minimized state in X11DRV_MapNotify .
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: ffd80ba7b159e138665fa436907fe6ffed53c9c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ffd80ba7b159e138665fa4369…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Nov 8 16:17:19 2006 +0800 winex11.drv: Call SetWindowPos with SWP_FRAMECHANGED set when switching from minimized state in X11DRV_MapNotify. --- dlls/winex11.drv/winpos.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 4ebcda8..b3e70f5 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -1183,7 +1183,7 @@ void X11DRV_MapNotify( HWND hwnd, XEvent SendMessageW( hwnd, WM_SHOWWINDOW, SW_RESTORE, 0 ); data->lock_changes++; SetWindowPos( hwnd, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, - SWP_NOZORDER ); + SWP_NOZORDER | SWP_FRAMECHANGED ); data->lock_changes--; } else WIN_ReleasePtr( win );
1
0
0
0
Dmitry Timoshkov : winex11.drv: Map VK codes for arrow keys to an X11 keycode manually as we do for other keypad keys .
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: d949867dedb41e8673decb72e1ff219cf84a2f52 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d949867dedb41e8673decb72e…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Nov 8 14:45:08 2006 +0800 winex11.drv: Map VK codes for arrow keys to an X11 keycode manually as we do for other keypad keys. --- dlls/winex11.drv/keyboard.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 7b31203..f4fc7fa 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -2393,6 +2393,9 @@ INT X11DRV_ToUnicodeEx(UINT virtKey, UIN } } + if (virtKey >= VK_LEFT && virtKey <= VK_DOWN) + e.keycode = XKeysymToKeycode(e.display, virtKey - VK_LEFT + XK_Left); + if ((virtKey>=VK_NUMPAD0) && (virtKey<=VK_NUMPAD9)) e.keycode = XKeysymToKeycode(e.display, virtKey-VK_NUMPAD0+XK_KP_0);
1
0
0
0
Mike McCormack : msi: Fix a memory leak.
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: 063c42cfa6e990e4a27084c333f209f3960c90a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=063c42cfa6e990e4a27084c33…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Wed Nov 8 14:55:31 2006 +0900 msi: Fix a memory leak. --- dlls/msi/action.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index ae4400c..ffaa216 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -624,6 +624,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *pac check = msi_dup_property( package, cszSourceDir ); if (!check) MSI_SetPropertyW(package, cszSourceDir, path); + msi_free(check); check = msi_dup_property( package, cszSOURCEDIR ); if (!check)
1
0
0
0
Mike McCormack : comctl32: Remove Nx1 assumptions in ImageList_Read.
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: e74b0ee9102470d1b866e94c54527b34806cf876 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e74b0ee9102470d1b866e94c5…
Author: Mike McCormack <mike(a)codeweavers.com> Date: Wed Nov 8 15:01:04 2006 +0900 comctl32: Remove Nx1 assumptions in ImageList_Read. --- dlls/comctl32/imagelist.c | 172 ++++++++++++++++++--------------------------- 1 files changed, 68 insertions(+), 104 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 843654a..1cc886e 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -1884,97 +1884,80 @@ static int may_use_dibsection(HDC hdc) { #endif /* helper for ImageList_Read, see comments below */ -static HBITMAP _read_bitmap(LPSTREAM pstm,int ilcFlag,int cx,int cy) { - HDC xdc = 0, hBitmapDC =0; +static BOOL _read_bitmap(HIMAGELIST himl, HDC hdcIml, LPSTREAM pstm, int ilcFlag) +{ + HDC xdc = 0; BITMAPFILEHEADER bmfh; BITMAPINFOHEADER bmih; int bitsperpixel,palspace,longsperline,width,height; - LPBITMAPINFOHEADER bmihc = NULL; - int result = 0; - HBITMAP hbitmap = 0, hDIB = 0; + LPBITMAPINFO bmi = NULL; + int result = FALSE; + HBITMAP hDIB = 0; LPBYTE bits = NULL; + int i, j, nheight, nRows, nCols; + POINT pt; + int cy = himl->cy; + + if (!SUCCEEDED(IStream_Read ( pstm, &bmfh, sizeof(bmfh), NULL))) + return result; + + if (bmfh.bfType != (('M'<<8)|'B')) + return result; - if (!SUCCEEDED(IStream_Read ( pstm, &bmfh, sizeof(bmfh), NULL)) || - (bmfh.bfType != (('M'<<8)|'B')) || - !SUCCEEDED(IStream_Read ( pstm, &bmih, sizeof(bmih), NULL)) || - (bmih.biSize != sizeof(bmih)) - ) + if (!SUCCEEDED(IStream_Read ( pstm, &bmih, sizeof(bmih), NULL))) + return result; + + if ((bmih.biSize != sizeof(bmih))) return 0; bitsperpixel = bmih.biPlanes * bmih.biBitCount; if (bitsperpixel<=8) - palspace = (1<<bitsperpixel)*sizeof(RGBQUAD); + palspace = (1<<bitsperpixel)*sizeof(RGBQUAD); else - palspace = 0; + palspace = 0; width = bmih.biWidth; height = bmih.biHeight; - bmihc = (LPBITMAPINFOHEADER)LocalAlloc(LMEM_ZEROINIT,sizeof(bmih)+palspace); - if (!bmihc) goto ret1; - memcpy(bmihc,&bmih,sizeof(bmih)); - longsperline = ((width*bitsperpixel+31)&~0x1f)>>5; - bmihc->biSizeImage = (longsperline*height)<<2; + bmi = Alloc(sizeof(bmih)+palspace); + if (!bmi) + return result; + + memcpy(bmi, &bmih, sizeof(bmih)); + longsperline = ((width*bitsperpixel+31)&~0x1f)>>5; + bmi->bmiHeader.biSizeImage = (longsperline*height)<<2; /* read the palette right after the end of the bitmapinfoheader */ - if (palspace) - if (!SUCCEEDED(IStream_Read ( pstm, bmihc+1, palspace, NULL))) - goto ret1; + if (palspace && !SUCCEEDED(IStream_Read(pstm, bmi->bmiColors, palspace, NULL))) + goto error; xdc = GetDC(0); -#if 0 /* Magic for NxM -> 1x(N*M) not implemented for DIB Sections */ - if ((bitsperpixel>1) && - ((ilcFlag!=ILC_COLORDDB) && (!ilcFlag || may_use_dibsection(xdc))) - ) { - hbitmap = CreateDIBSection(xdc,(BITMAPINFO*)bmihc,0,(LPVOID*)&bits,0,0); - if (!hbitmap) - goto ret1; - if (!SUCCEEDED(IStream_Read( pstm, bits, bmihc->biSizeImage, NULL))) - goto ret1; - result = 1; - } else -#endif - { - int i,nwidth,nheight,nRows; - - nwidth = width*(height/cy); - nheight = cy; - nRows = (height/cy); - if (bitsperpixel==1) - hbitmap = CreateBitmap(nwidth,nheight,1,1,NULL); - else - hbitmap = CreateCompatibleBitmap(xdc,nwidth,nheight); - - hDIB = CreateDIBSection(xdc,(BITMAPINFO*)bmihc,0,(LPVOID*)&bits,0,0); - if (!hDIB) - goto ret1; - if (!SUCCEEDED(IStream_Read( pstm, bits, bmihc->biSizeImage, NULL))) - goto ret1; - - hBitmapDC = CreateCompatibleDC(0); - SelectObject(hBitmapDC, hbitmap); - - /* Copy the NxM bitmap into a 1x(N*M) bitmap we need, linewise */ - /* Do not forget that windows bitmaps are bottom->top */ - TRACE("nRows=%d\n", nRows); - for (i=0; i < nRows; i++){ - StretchDIBits(hBitmapDC, width*i, 0, width, cy, 0, cy*(nRows-1-i), width, cy, bits, - (BITMAPINFO*)bmihc, DIB_RGB_COLORS, SRCCOPY); + nheight = cy; + nRows = height/cy; + nCols = width/himl->cx; + + hDIB = CreateDIBSection(xdc, bmi, 0, (LPVOID*) &bits, 0, 0); + if (!hDIB) + goto error; + if (!SUCCEEDED(IStream_Read(pstm, bits, bmi->bmiHeader.biSizeImage, NULL))) + goto error; + + /* Copy the NxM bitmap into a 1x(N*M) bitmap we need, linewise */ + /* Do not forget that windows bitmaps are bottom->top */ + for (i=0; i < nRows; i++) { + for (j=0; j < nCols; j++) { + imagelist_point_from_index(himl, i*nCols + j, &pt); + StretchDIBits(hdcIml, pt.x, pt.y, himl->cx, cy, + j*himl->cx, (nRows - 1 - i)*himl->cy, himl->cx, cy, bits, + bmi, DIB_RGB_COLORS, SRCCOPY); } - - result = 1; } -ret1: + + result = TRUE; +error: if (xdc) ReleaseDC(0,xdc); - if (bmihc) LocalFree((HLOCAL)bmihc); + Free(bmi); if (hDIB) DeleteObject(hDIB); - if (hBitmapDC) DeleteDC(hBitmapDC); - if (!result) { - if (hbitmap) { - DeleteObject(hbitmap); - hbitmap = 0; - } - } - return hbitmap; + return result; } /************************************************************************* @@ -1990,11 +1973,11 @@ ret1: * Failure: NULL * * The format is like this: - * ILHEAD ilheadstruct; + * ILHEAD ilheadstruct; * * for the color image part: - * BITMAPFILEHEADER bmfh; - * BITMAPINFOHEADER bmih; + * BITMAPFILEHEADER bmfh; + * BITMAPINFOHEADER bmih; * only if it has a palette: * RGBQUAD rgbs[nr_of_paletted_colors]; * @@ -2018,51 +2001,32 @@ HIMAGELIST WINAPI ImageList_Read (LPSTRE HBITMAP hbmColor=0,hbmMask=0; int i; + TRACE("%p\n", pstm); + if (!SUCCEEDED(IStream_Read (pstm, &ilHead, sizeof(ILHEAD), NULL))) - return NULL; + return NULL; if (ilHead.usMagic != (('L' << 8) | 'I')) return NULL; if (ilHead.usVersion != 0x101) /* probably version? */ return NULL; -#if 0 - FIXME(" ilHead.cCurImage = %d\n",ilHead.cCurImage); - FIXME(" ilHead.cMaxImage = %d\n",ilHead.cMaxImage); - FIXME(" ilHead.cGrow = %d\n",ilHead.cGrow); - FIXME(" ilHead.cx = %d\n",ilHead.cx); - FIXME(" ilHead.cy = %d\n",ilHead.cy); - FIXME(" ilHead.flags = %x\n",ilHead.flags); - FIXME(" ilHead.ovls[0] = %d\n",ilHead.ovls[0]); - FIXME(" ilHead.ovls[1] = %d\n",ilHead.ovls[1]); - FIXME(" ilHead.ovls[2] = %d\n",ilHead.ovls[2]); - FIXME(" ilHead.ovls[3] = %d\n",ilHead.ovls[3]); -#endif - - hbmColor = _read_bitmap(pstm,ilHead.flags & ~ILC_MASK,ilHead.cx,ilHead.cy); - if (!hbmColor) { + himl = ImageList_Create(ilHead.cx, ilHead.cy, ilHead.flags, ilHead.cCurImage, ilHead.cMaxImage); + if (!himl) { + DeleteObject(hbmColor); + DeleteObject(hbmMask); + return NULL; + } + if (!_read_bitmap(himl, himl->hdcImage, pstm, ilHead.flags & ~ILC_MASK)) { WARN("failed to read bitmap from stream\n"); return NULL; } if (ilHead.flags & ILC_MASK) { - hbmMask = _read_bitmap(pstm,0,ilHead.cx,ilHead.cy); - if (!hbmMask) { + if (!_read_bitmap(himl, himl->hdcMask, pstm, 0)) { DeleteObject(hbmColor); return NULL; } } - himl = ImageList_Create ( - ilHead.cx, - ilHead.cy, - ilHead.flags, - 1, /* initial */ - ilHead.cGrow - ); - if (!himl) { - DeleteObject(hbmColor); - DeleteObject(hbmMask); - return NULL; - } SelectObject(himl->hdcImage, hbmColor); DeleteObject(himl->hbmImage); himl->hbmImage = hbmColor; @@ -2076,7 +2040,7 @@ #endif ImageList_SetBkColor(himl,ilHead.bkcolor); for (i=0;i<4;i++) - ImageList_SetOverlayImage(himl,ilHead.ovls[i],i+1); + ImageList_SetOverlayImage(himl,ilHead.ovls[i],i+1); return himl; }
1
0
0
0
Markus Amsler : wined3d: Fix regression in surface conversion.
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: fc179532f4da15a38b347542ed2840c1612711c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc179532f4da15a38b347542e…
Author: Markus Amsler <markus.amsler(a)oribi.org> Date: Wed Nov 8 02:22:29 2006 +0100 wined3d: Fix regression in surface conversion. --- dlls/wined3d/surface.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 1741585..84a838f 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1672,7 +1672,7 @@ HRESULT d3dfmt_convert_surface(BYTE *src for (y = 0; y < height; y++) { Source = (WORD *) (src + y * pitch); Dest = (WORD *) (dst + y * outpitch); - for (x = 0; x < width / 2; x++ ) { + for (x = 0; x < width; x++ ) { WORD color = *Source++; *Dest = ((color & 0xFFC0) | ((color & 0x1F) << 1)); if ((color < surf->SrcBltCKey.dwColorSpaceLowValue) ||
1
0
0
0
Huw Davies : winspool.drv: Associate a printer driver with each printer, rather than share a common one between all printers.
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: d510bdc71be630eb82862b951540fcd3e546e28e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d510bdc71be630eb82862b951…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 7 17:19:06 2006 +0000 winspool.drv: Associate a printer driver with each printer, rather than share a common one between all printers. --- dlls/winspool.drv/info.c | 70 +++++++++++++++++++++++++++------------------- 1 files changed, 41 insertions(+), 29 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 8235fd7..cb2a818 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -365,6 +365,37 @@ WINSPOOL_SetDefaultPrinter(const char *d } } +BOOL add_printer_driver(const char *name) +{ + DRIVER_INFO_3A di3a; + + static char driver_path[] = "wineps16", + data_file[] = "<datafile?>", + config_file[] = "wineps16", + help_file[] = "<helpfile?>", + dep_file[] = "<dependent files?>\0", + monitor_name[] = "<monitor name?>", + default_data_type[] = "RAW"; + + di3a.cVersion = (GetVersion() & 0x80000000) ? 0 : 3; /* FIXME: add 1, 2 */ + di3a.pName = (char *)name; + di3a.pEnvironment = NULL; /* NULL means auto */ + di3a.pDriverPath = driver_path; + di3a.pDataFile = data_file; + di3a.pConfigFile = config_file; + di3a.pHelpFile = help_file; + di3a.pDependentFiles = dep_file; + di3a.pMonitorName = monitor_name; + di3a.pDefaultDataType = default_data_type; + + if (!AddPrinterDriverA(NULL, 3, (LPBYTE)&di3a)) + { + ERR("Failed adding driver (%d)\n", GetLastError()); + return FALSE; + } + return TRUE; +} + #ifdef HAVE_CUPS_CUPS_H static typeof(cupsGetDests) *pcupsGetDests; static typeof(cupsGetPPD) *pcupsGetPPD; @@ -424,18 +455,19 @@ #undef DYNCUPS } else { static CHAR data_type[] = "RAW", print_proc[] = "WinPrint", - driver_name[] = "PS Driver", comment[] = "WINEPS Printer using CUPS", location[] = "<physical location of printer>", params[] = "<parameters?>", share_name[] = "<share name?>", sep_file[] = "<sep file?>"; + add_printer_driver(dests[i].name); + memset(&pinfo2a,0,sizeof(pinfo2a)); pinfo2a.pPrinterName = dests[i].name; pinfo2a.pDatatype = data_type; pinfo2a.pPrintProcessor = print_proc; - pinfo2a.pDriverName = driver_name; + pinfo2a.pDriverName = dests[i].name; pinfo2a.pComment = comment; pinfo2a.pLocation = location; pinfo2a.pPortName = port; @@ -547,17 +579,18 @@ PRINTCAP_ParseEntry(const char *pent, BO } else { static CHAR data_type[] = "RAW", print_proc[] = "WinPrint", - driver_name[] = "PS Driver", comment[] = "WINEPS Printer using LPR", params[] = "<parameters?>", share_name[] = "<share name?>", sep_file[] = "<sep file?>"; + add_printer_driver(devname); + memset(&pinfo2a,0,sizeof(pinfo2a)); pinfo2a.pPrinterName = devname; pinfo2a.pDatatype = data_type; pinfo2a.pPrintProcessor = print_proc; - pinfo2a.pDriverName = driver_name; + pinfo2a.pDriverName = devname; pinfo2a.pComment = comment; pinfo2a.pLocation = prettyname; pinfo2a.pPortName = port; @@ -645,35 +678,10 @@ static inline DWORD set_reg_szW(HKEY hke void WINSPOOL_LoadSystemPrinters(void) { HKEY hkey, hkeyPrinters; - DRIVER_INFO_3A di3a; HANDLE hprn; DWORD needed, num, i; WCHAR PrinterName[256]; BOOL done = FALSE; - static CHAR name[] = "PS Driver", - driver_path[] = "wineps16", - data_file[] = "<datafile?>", - config_file[] = "wineps16", - help_file[] = "<helpfile?>", - dep_file[] = "<dependent files?>\0", - monitor_name[] = "<monitor name?>", - default_data_type[] = "RAW"; - - di3a.cVersion = (GetVersion() & 0x80000000) ? 0 : 3; /* FIXME: add 1, 2 */ - di3a.pName = name; - di3a.pEnvironment = NULL; /* NULL means auto */ - di3a.pDriverPath = driver_path; - di3a.pDataFile = data_file; - di3a.pConfigFile = config_file; - di3a.pHelpFile = help_file; - di3a.pDependentFiles = dep_file; - di3a.pMonitorName = monitor_name; - di3a.pDefaultDataType = default_data_type; - - if (!AddPrinterDriverA(NULL,3,(LPBYTE)&di3a)) { - ERR("Failed adding PS Driver (%d)\n",GetLastError()); - return; - } /* This ensures that all printer entries have a valid Name value. If causes problems later if they don't. If one is found to be missed we create one @@ -744,15 +752,19 @@ #endif for(i = 0; i < num; i++) { if(pi[i].pPortName == NULL || !strncmp(pi[i].pPortName,"CUPS:", 5) || !strncmp(pi[i].pPortName, "LPR:", 4)) { if(OpenPrinterA(pi[i].pPrinterName, &hprn, NULL)) { + BOOL delete_driver = FALSE; if(WINSPOOL_GetOpenedPrinterRegKey(hprn, &hkey) == ERROR_SUCCESS) { DWORD dw, type, size = sizeof(dw); if(RegQueryValueExW(hkey, May_Delete_Value, NULL, &type, (LPBYTE)&dw, &size) == ERROR_SUCCESS) { TRACE("Deleting old printer %s\n", pi[i].pPrinterName); DeletePrinter(hprn); + delete_driver = TRUE; } RegCloseKey(hkey); } ClosePrinter(hprn); + if(delete_driver) + DeletePrinterDriverExA(NULL, NULL, pi[i].pPrinterName, 0, 0); } } }
1
0
0
0
Huw Davies : winspool.drv: Fix AddPrinterDriverA so that the strings actually get written.
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: 1ad05ac7015c8bd49c311c925f00b0ceb9e97171 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ad05ac7015c8bd49c311c925…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 7 17:16:29 2006 +0000 winspool.drv: Fix AddPrinterDriverA so that the strings actually get written. Include the size of the terminating zero in set_reg_szW. --- dlls/winspool.drv/info.c | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 180361d..8235fd7 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -325,6 +325,20 @@ static LPWSTR strdupW(LPCWSTR p) return ret; } +/* Returns the number of bytes in an ansi \0\0 terminated string (multi_sz). + The result includes all \0s (specifically the last two). */ +static int multi_sz_lenA(const char *str) +{ + const char *ptr = str; + if(!str) return 0; + do + { + ptr += lstrlenA(ptr) + 1; + } while(*ptr); + + return ptr - str + 1; +} + static void WINSPOOL_SetDefaultPrinter(const char *devname, const char *name,BOOL force) { char qbuf[200]; @@ -623,7 +637,7 @@ static inline DWORD set_reg_szW(HKEY hke { if (value) return RegSetValueExW(hkey, keyname, 0, REG_SZ, (const BYTE*)value, - lstrlenW(value) * sizeof(WCHAR)); + (lstrlenW(value) + 1) * sizeof(WCHAR)); else return ERROR_FILE_NOT_FOUND; } @@ -641,7 +655,7 @@ void WINSPOOL_LoadSystemPrinters(void) data_file[] = "<datafile?>", config_file[] = "wineps16", help_file[] = "<helpfile?>", - dep_file[] = "<dependend files?>", + dep_file[] = "<dependent files?>\0", monitor_name[] = "<monitor name?>", default_data_type[] = "RAW"; @@ -4369,16 +4383,16 @@ BOOL WINAPI AddPrinterDriverA(LPSTR pNam return FALSE; } RegSetValueExA(hkeyName, "Configuration File", 0, REG_SZ, (LPBYTE) di3.pConfigFile, - 0); - RegSetValueExA(hkeyName, "Data File", 0, REG_SZ, (LPBYTE) di3.pDataFile, 0); - RegSetValueExA(hkeyName, "Driver", 0, REG_SZ, (LPBYTE) di3.pDriverPath, 0); + lstrlenA(di3.pConfigFile) + 1); + RegSetValueExA(hkeyName, "Data File", 0, REG_SZ, (LPBYTE) di3.pDataFile, lstrlenA(di3.pDataFile) + 1); + RegSetValueExA(hkeyName, "Driver", 0, REG_SZ, (LPBYTE) di3.pDriverPath, lstrlenA(di3.pDriverPath) + 1); RegSetValueExA(hkeyName, "Version", 0, REG_DWORD, (LPBYTE) &di3.cVersion, sizeof(DWORD)); - RegSetValueExA(hkeyName, "Datatype", 0, REG_SZ, (LPBYTE) di3.pDefaultDataType, 0); + RegSetValueExA(hkeyName, "Datatype", 0, REG_SZ, (LPBYTE) di3.pDefaultDataType, lstrlenA(di3.pDefaultDataType)); RegSetValueExA(hkeyName, "Dependent Files", 0, REG_MULTI_SZ, - (LPBYTE) di3.pDependentFiles, 0); - RegSetValueExA(hkeyName, "Help File", 0, REG_SZ, (LPBYTE) di3.pHelpFile, 0); - RegSetValueExA(hkeyName, "Monitor", 0, REG_SZ, (LPBYTE) di3.pMonitorName, 0); + (LPBYTE) di3.pDependentFiles, multi_sz_lenA(di3.pDependentFiles)); + RegSetValueExA(hkeyName, "Help File", 0, REG_SZ, (LPBYTE) di3.pHelpFile, lstrlenA(di3.pHelpFile) + 1); + RegSetValueExA(hkeyName, "Monitor", 0, REG_SZ, (LPBYTE) di3.pMonitorName, lstrlenA(di3.pMonitorName) + 1); RegCloseKey(hkeyName); RegCloseKey(hkeyDrivers);
1
0
0
0
Huw Davies : winspool.drv: Implement DeletePrinterDriverExW.
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: 388fd47ce2c64c5029b51414701c064d2262eebb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=388fd47ce2c64c5029b514147…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 7 12:27:09 2006 +0000 winspool.drv: Implement DeletePrinterDriverExW. --- dlls/winspool.drv/info.c | 35 +++++++++++++++++++++++++++++++++-- 1 files changed, 33 insertions(+), 2 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 5757ff8..180361d 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -5756,9 +5756,40 @@ BOOL WINAPI DeletePrinterConnectionW( LP BOOL WINAPI DeletePrinterDriverExW( LPWSTR pName, LPWSTR pEnvironment, LPWSTR pDriverName, DWORD dwDeleteFlag, DWORD dwVersionFlag) { - FIXME("%s %s %s %x %x\n", debugstr_w(pName), debugstr_w(pEnvironment), + HKEY hkey_drivers; + BOOL ret = FALSE; + + TRACE("%s %s %s %x %x\n", debugstr_w(pName), debugstr_w(pEnvironment), debugstr_w(pDriverName), dwDeleteFlag, dwVersionFlag); - return TRUE; + + if(pName && pName[0]) + { + FIXME("pName = %s - unsupported\n", debugstr_w(pName)); + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if(dwDeleteFlag) + { + FIXME("dwDeleteFlag = %x - unsupported\n", dwDeleteFlag); + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + hkey_drivers = WINSPOOL_OpenDriverReg(pEnvironment, TRUE); + + if(!hkey_drivers) + { + ERR("Can't open drivers key\n"); + return FALSE; + } + + if(WINSPOOL_SHDeleteKeyW(hkey_drivers, pDriverName) == ERROR_SUCCESS) + ret = TRUE; + + RegCloseKey(hkey_drivers); + + return ret; } /******************************************************************************
1
0
0
0
Huw Davies : winspool.drv: Forward DeletePrinterDriverExA -> DeletePrinterDriverExW.
by Alexandre Julliard
08 Nov '06
08 Nov '06
Module: wine Branch: master Commit: 7ce85a8d6054b9e2e83f14a1b7e30dd1759087bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ce85a8d6054b9e2e83f14a1b…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Nov 7 12:06:04 2006 +0000 winspool.drv: Forward DeletePrinterDriverExA -> DeletePrinterDriverExW. --- dlls/winspool.drv/info.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index e6149fc..5757ff8 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -5767,9 +5767,20 @@ BOOL WINAPI DeletePrinterDriverExW( LPWS BOOL WINAPI DeletePrinterDriverExA( LPSTR pName, LPSTR pEnvironment, LPSTR pDriverName, DWORD dwDeleteFlag, DWORD dwVersionFlag) { - FIXME("%s %s %s %x %x\n", debugstr_a(pName), debugstr_a(pEnvironment), - debugstr_a(pDriverName), dwDeleteFlag, dwVersionFlag); - return TRUE; + UNICODE_STRING NameW, EnvW, DriverW; + BOOL ret; + + asciitounicode(&NameW, pName); + asciitounicode(&EnvW, pEnvironment); + asciitounicode(&DriverW, pDriverName); + + ret = DeletePrinterDriverExW(NameW.Buffer, EnvW.Buffer, DriverW.Buffer, dwDeleteFlag, dwVersionFlag); + + RtlFreeUnicodeString(&DriverW); + RtlFreeUnicodeString(&EnvW); + RtlFreeUnicodeString(&NameW); + + return ret; } /******************************************************************************
1
0
0
0
← Newer
1
...
60
61
62
63
64
65
66
...
80
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
Results per page:
10
25
50
100
200