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
February 2013
----- 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
459 discussions
Start a n
N
ew thread
Alexandre Julliard : wintab32: Retrieve the graphics driver module from gdi32.
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: 0e5f84a148a33f60567bc29a8ae371ac572adc81 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e5f84a148a33f60567bc29a8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 6 13:19:43 2013 +0100 wintab32: Retrieve the graphics driver module from gdi32. --- dlls/wintab32/Makefile.in | 2 +- dlls/wintab32/wintab32.c | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/dlls/wintab32/Makefile.in b/dlls/wintab32/Makefile.in index 7425c7d..ab71e45 100644 --- a/dlls/wintab32/Makefile.in +++ b/dlls/wintab32/Makefile.in @@ -1,6 +1,6 @@ MODULE = wintab32.dll IMPORTLIB = wintab32 -IMPORTS = user32 +IMPORTS = user32 gdi32 C_SRCS = \ context.c \ diff --git a/dlls/wintab32/wintab32.c b/dlls/wintab32/wintab32.c index 50daebd..51cba6a 100644 --- a/dlls/wintab32/wintab32.c +++ b/dlls/wintab32/wintab32.c @@ -25,8 +25,10 @@ #include "wingdi.h" #include "winuser.h" #include "winerror.h" +#define NOFIX32 #include "wintab.h" #include "wintab_internal.h" +#include "wine/gdi_driver.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wintab32); @@ -72,7 +74,6 @@ static VOID TABLET_Unregister(void) BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved) { static const WCHAR name[] = {'T','a','b','l','e','t',0}; - HMODULE hx11drv; TRACE("%p, %x, %p\n",hInstDLL,fdwReason,lpReserved); switch (fdwReason) @@ -80,16 +81,19 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved) case DLL_PROCESS_ATTACH: TRACE("Initialization\n"); DisableThreadLibraryCalls(hInstDLL); - hx11drv = GetModuleHandleA("winex11.drv"); - if (hx11drv) + TABLET_Register(); + hwndDefault = CreateWindowW(WC_TABLETCLASSNAME, name, + WS_POPUPWINDOW,0,0,0,0,0,0,hInstDLL,0); + if (hwndDefault) { - pLoadTabletInfo = (void *)GetProcAddress(hx11drv, "LoadTabletInfo"); - pAttachEventQueueToTablet = (void *)GetProcAddress(hx11drv, "AttachEventQueueToTablet"); - pGetCurrentPacket = (void *)GetProcAddress(hx11drv, "GetCurrentPacket"); - pWTInfoW = (void *)GetProcAddress(hx11drv, "WTInfoW"); - TABLET_Register(); - hwndDefault = CreateWindowW(WC_TABLETCLASSNAME, name, - WS_POPUPWINDOW,0,0,0,0,0,0,hInstDLL,0); + HDC hdc = GetDC( hwndDefault ); + HMODULE module = __wine_get_driver_module( hdc ); + + pLoadTabletInfo = (void *)GetProcAddress(module, "LoadTabletInfo"); + pAttachEventQueueToTablet = (void *)GetProcAddress(module, "AttachEventQueueToTablet"); + pGetCurrentPacket = (void *)GetProcAddress(module, "GetCurrentPacket"); + pWTInfoW = (void *)GetProcAddress(module, "WTInfoW"); + ReleaseDC( hwndDefault, hdc ); } else return FALSE;
1
0
0
0
Alexandre Julliard : explorer: Return a simple boolean instead of a window in the wine_create_desktop entry point .
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: a73c5d5c8134ee87a98fc0ea7b7401a3518e08b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a73c5d5c8134ee87a98fc0ea7…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 6 12:49:41 2013 +0100 explorer: Return a simple boolean instead of a window in the wine_create_desktop entry point. --- dlls/winex11.drv/desktop.c | 10 ++++++---- programs/explorer/desktop.c | 17 +++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 8d9de20..5fbb860 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -130,7 +130,7 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height ) * * Create the X11 desktop window for the desktop mode. */ -Window CDECL X11DRV_create_desktop( UINT width, UINT height ) +BOOL CDECL X11DRV_create_desktop( UINT width, UINT height ) { XSetWindowAttributes win_attr; Window win; @@ -152,7 +152,9 @@ Window CDECL X11DRV_create_desktop( UINT width, UINT height ) win = XCreateWindow( display, DefaultRootWindow(display), 0, 0, width, height, 0, default_visual.depth, InputOutput, default_visual.visual, CWEventMask | CWCursor | CWColormap, &win_attr ); - if (win != None && width == screen_width && height == screen_height) + if (!win) return FALSE; + + if (width == screen_width && height == screen_height) { TRACE("setting desktop to fullscreen\n"); XChangeProperty( display, win, x11drv_atom(_NET_WM_STATE), XA_ATOM, 32, @@ -160,8 +162,8 @@ Window CDECL X11DRV_create_desktop( UINT width, UINT height ) 1); } XFlush( display ); - if (win != None) X11DRV_init_desktop( win, width, height ); - return win; + X11DRV_init_desktop( win, width, height ); + return TRUE; } diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index a4f21bf..3e01f9f 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -106,13 +106,13 @@ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPAR } } -/* create the desktop and the associated X11 window, and make it the current desktop */ -static unsigned long create_desktop( const WCHAR *name, unsigned int width, unsigned int height ) +/* create the desktop and the associated driver window, and make it the current desktop */ +static BOOL create_desktop( const WCHAR *name, unsigned int width, unsigned int height ) { static const WCHAR rootW[] = {'r','o','o','t',0}; HDESK desktop; - unsigned long xwin = 0; - unsigned long (CDECL *create_desktop_func)(unsigned int, unsigned int); + BOOL ret = FALSE; + BOOL (CDECL *create_desktop_func)(unsigned int, unsigned int); desktop = CreateDesktopW( name, NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); if (!desktop) @@ -124,10 +124,10 @@ static unsigned long create_desktop( const WCHAR *name, unsigned int width, unsi if (graphics_driver && strcmpiW( name, rootW )) { create_desktop_func = (void *)GetProcAddress( graphics_driver, "wine_create_desktop" ); - if (create_desktop_func) xwin = create_desktop_func( width, height ); + if (create_desktop_func) ret = create_desktop_func( width, height ); } SetThreadDesktop( desktop ); - return xwin; + return ret; } /* parse the desktop size specification */ @@ -266,7 +266,6 @@ void manage_desktop( WCHAR *arg ) MSG msg; HDC hdc; HWND hwnd, msg_hwnd; - unsigned long xwin = 0; unsigned int width, height; WCHAR *cmdline = NULL; WCHAR *p = arg; @@ -299,9 +298,7 @@ void manage_desktop( WCHAR *arg ) hdc = CreateDCW( displayW, NULL, NULL, NULL ); graphics_driver = __wine_get_driver_module( hdc ); - if (name && width && height) xwin = create_desktop( name, width, height ); - - if (!xwin) using_root = TRUE; /* using the root window */ + if (name && width && height) using_root = !create_desktop( name, width, height ); /* create the desktop window */ hwnd = CreateWindowExW( 0, DESKTOP_CLASS_ATOM, NULL,
1
0
0
0
Alexandre Julliard : explorer: Retrieve the graphics driver module from gdi32.
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: 3e24a17c030d28c4e57376266b8c170fbb9f7570 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e24a17c030d28c4e57376266…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 6 12:46:14 2013 +0100 explorer: Retrieve the graphics driver module from gdi32. --- programs/explorer/desktop.c | 24 ++++++++++++++++-------- programs/explorer/explorer_private.h | 2 +- programs/explorer/systray.c | 8 +++----- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 12888d8..a4f21bf 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -21,13 +21,14 @@ #include "config.h" #include "wine/port.h" #include <stdio.h> -#include "wine/unicode.h" #define OEMRESOURCE - #include <windows.h> #include <rpc.h> -#include <wine/debug.h> + +#include "wine/gdi_driver.h" +#include "wine/unicode.h" +#include "wine/debug.h" #include "explorer_private.h" WINE_DEFAULT_DEBUG_CHANNEL(explorer); @@ -35,6 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(explorer); #define DESKTOP_CLASS_ATOM ((LPCWSTR)MAKEINTATOM(32769)) #define DESKTOP_ALL_ACCESS 0x01ff +static HMODULE graphics_driver; static BOOL using_root; /* screen saver handler */ @@ -108,7 +110,6 @@ static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPAR static unsigned long create_desktop( const WCHAR *name, unsigned int width, unsigned int height ) { static const WCHAR rootW[] = {'r','o','o','t',0}; - HMODULE x11drv = GetModuleHandleA( "winex11.drv" ); HDESK desktop; unsigned long xwin = 0; unsigned long (CDECL *create_desktop_func)(unsigned int, unsigned int); @@ -119,10 +120,10 @@ static unsigned long create_desktop( const WCHAR *name, unsigned int width, unsi WINE_ERR( "failed to create desktop %s error %d\n", wine_dbgstr_w(name), GetLastError() ); ExitProcess( 1 ); } - /* magic: desktop "root" means use the X11 root window */ - if (x11drv && strcmpiW( name, rootW )) + /* magic: desktop "root" means use the root window */ + if (graphics_driver && strcmpiW( name, rootW )) { - create_desktop_func = (void *)GetProcAddress( x11drv, "wine_create_desktop" ); + create_desktop_func = (void *)GetProcAddress( graphics_driver, "wine_create_desktop" ); if (create_desktop_func) xwin = create_desktop_func( width, height ); } SetThreadDesktop( desktop ); @@ -260,8 +261,10 @@ static void set_desktop_window_title( HWND hwnd, const WCHAR *name ) /* main desktop management function */ void manage_desktop( WCHAR *arg ) { + static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0}; static const WCHAR messageW[] = {'M','e','s','s','a','g','e',0}; MSG msg; + HDC hdc; HWND hwnd, msg_hwnd; unsigned long xwin = 0; unsigned int width, height; @@ -293,6 +296,9 @@ void manage_desktop( WCHAR *arg ) if (!get_default_desktop_size( name, &width, &height )) width = height = 0; } + hdc = CreateDCW( displayW, NULL, NULL, NULL ); + graphics_driver = __wine_get_driver_module( hdc ); + if (name && width && height) xwin = create_desktop( name, width, height ); if (!xwin) using_root = TRUE; /* using the root window */ @@ -308,6 +314,8 @@ void manage_desktop( WCHAR *arg ) msg_hwnd = CreateWindowExW( 0, messageW, NULL, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 100, 100, 0, 0, 0, NULL ); + DeleteDC( hdc ); + if (hwnd == GetDesktopWindow()) { HMODULE shell32; @@ -320,7 +328,7 @@ void manage_desktop( WCHAR *arg ) ClipCursor( NULL ); initialize_display_settings( hwnd ); initialize_appbar(); - initialize_systray( using_root ); + initialize_systray( graphics_driver, using_root ); if ((shell32 = LoadLibraryA( "shell32.dll" )) && (pShellDDEInit = (void *)GetProcAddress( shell32, (LPCSTR)188))) diff --git a/programs/explorer/explorer_private.h b/programs/explorer/explorer_private.h index 44e0e39..74ca7f0 100644 --- a/programs/explorer/explorer_private.h +++ b/programs/explorer/explorer_private.h @@ -22,7 +22,7 @@ #define __WINE_EXPLORER_PRIVATE_H extern void manage_desktop( WCHAR *arg ); -extern void initialize_systray( BOOL using_root ); +extern void initialize_systray( HMODULE graphics_driver, BOOL using_root ); extern void initialize_appbar(void); #endif /* __WINE_EXPLORER_PRIVATE_H */ diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 716335c..c15fbf0 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -629,14 +629,12 @@ static LRESULT WINAPI tray_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l } /* this function creates the listener window */ -void initialize_systray( BOOL using_root ) +void initialize_systray( HMODULE graphics_driver, BOOL using_root ) { - HMODULE x11drv; WNDCLASSEXW class; static const WCHAR classname[] = {'S','h','e','l','l','_','T','r','a','y','W','n','d',0}; - if ((x11drv = GetModuleHandleA( "winex11.drv" ))) - wine_notify_icon = (void *)GetProcAddress( x11drv, "wine_notify_icon" ); + wine_notify_icon = (void *)GetProcAddress( graphics_driver, "wine_notify_icon" ); icon_cx = GetSystemMetrics( SM_CXSMICON ) + 2*ICON_BORDER; icon_cy = GetSystemMetrics( SM_CYSMICON ) + 2*ICON_BORDER; @@ -651,7 +649,7 @@ void initialize_systray( BOOL using_root ) class.hIcon = LoadIconW(0, (LPCWSTR)IDI_WINLOGO); class.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW); class.hbrBackground = (HBRUSH) COLOR_WINDOW; - class.lpszClassName = (WCHAR *) &classname; + class.lpszClassName = classname; if (!RegisterClassExW(&class)) {
1
0
0
0
Alexandre Julliard : gdi32: Return the correct module handle for the initial display driver load.
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: 0d7108c6299588c047edb93b69ee9ad43f441a93 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d7108c6299588c047edb93b6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 6 12:21:33 2013 +0100 gdi32: Return the correct module handle for the initial display driver load. --- dlls/gdi32/driver.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 82706c3..70208fb 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -100,11 +100,7 @@ static const struct gdi_dc_funcs *get_display_driver( HMODULE *module_ret ) HMODULE module = 0; HKEY hkey; - if (display_driver) - { - *module_ret = display_driver->module; - return display_driver->funcs; /* already loaded */ - } + if (display_driver) goto done; strcpy( buffer, "x11" ); /* default value */ /* @@ Wine registry key: HKCU\Software\Wine\Drivers */ @@ -140,6 +136,8 @@ static const struct gdi_dc_funcs *get_display_driver( HMODULE *module_ret ) FreeLibrary( driver->module ); HeapFree( GetProcessHeap(), 0, driver ); } +done: + *module_ret = display_driver->module; return display_driver->funcs; }
1
0
0
0
Daniel Jelinski : comctl32/listview: Always use large icon size when calculating icon spacing.
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: aeefa821858a1db188a59646345197b20a3e38f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aeefa821858a1db188a596463…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Mon Feb 4 20:46:30 2013 +0100 comctl32/listview: Always use large icon size when calculating icon spacing. --- dlls/comctl32/listview.c | 35 ++++++++--------------------------- dlls/comctl32/tests/listview.c | 10 ++++++++++ 2 files changed, 18 insertions(+), 27 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index cee1154..96863f9 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -8586,18 +8586,18 @@ static DWORD LISTVIEW_SetHoverTime(LISTVIEW_INFO *infoPtr, DWORD dwHoverTime) */ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy) { + INT iconWidth = 0, iconHeight = 0; DWORD oldspacing = MAKELONG(infoPtr->iconSpacing.cx, infoPtr->iconSpacing.cy); TRACE("requested=(%d,%d)\n", cx, cy); - - /* this is supported only for LVS_ICON style */ - if (infoPtr->uView != LV_VIEW_ICON) return oldspacing; - + /* set to defaults, if instructed to */ if (cx == -1 && cy == -1) { - cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON) + infoPtr->iconSize.cx; - cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON) + infoPtr->iconSize.cy; + if (infoPtr->himlNormal) + ImageList_GetIconSize(infoPtr->himlNormal, &iconWidth, &iconHeight); + cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON) + iconWidth; + cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON) + iconHeight; } /* if 0 then keep width */ if (cx != 0) @@ -9054,7 +9054,6 @@ static BOOL LISTVIEW_SetUnicodeFormat( LISTVIEW_INFO *infoPtr, BOOL unicode) */ static INT LISTVIEW_SetView(LISTVIEW_INFO *infoPtr, DWORD nView) { - SIZE oldIconSize = infoPtr->iconSize; HIMAGELIST himl; if (infoPtr->uView == nView) return 1; @@ -9080,14 +9079,6 @@ static INT LISTVIEW_SetView(LISTVIEW_INFO *infoPtr, DWORD nView) switch (nView) { case LV_VIEW_ICON: - if ((infoPtr->iconSize.cx != oldIconSize.cx) || (infoPtr->iconSize.cy != oldIconSize.cy)) - { - TRACE("icon old size=(%d,%d), new size=(%d,%d)\n", - oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy); - LISTVIEW_SetIconSpacing(infoPtr, -1, -1); - } - LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); - break; case LV_VIEW_SMALLICON: LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); break; @@ -11016,7 +11007,6 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, if (uNewView != uOldView) { - SIZE oldIconSize = infoPtr->iconSize; HIMAGELIST himl; SendMessageW(infoPtr->hwndEdit, WM_KILLFOCUS, 0, 0); @@ -11027,17 +11017,8 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, himl = (uNewView == LVS_ICON ? infoPtr->himlNormal : infoPtr->himlSmall); set_icon_size(&infoPtr->iconSize, himl, uNewView != LVS_ICON); - - if (uNewView == LVS_ICON) - { - if ((infoPtr->iconSize.cx != oldIconSize.cx) || (infoPtr->iconSize.cy != oldIconSize.cy)) - { - TRACE("icon old size=(%d,%d), new size=(%d,%d)\n", - oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy); - LISTVIEW_SetIconSpacing(infoPtr, -1, -1); - } - } - else if (uNewView == LVS_REPORT) + + if (uNewView == LVS_REPORT) { HDLAYOUT hl; WINDOWPOS wp; diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 2347bfa..c46fe42 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -4656,6 +4656,16 @@ static void test_getitemspacing(void) expect(cx, LOWORD(ret)); expect(cy, HIWORD(ret)); + /* spacing does not depend on selected view type */ + ret = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)himl40); + expect(0, ret); + + ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); + /* spacing + icon size returned */ + expect(cx + 40, LOWORD(ret)); + expect(cy + 40, HIWORD(ret)); + + SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_NORMAL, 0); ImageList_Destroy(himl40); DestroyWindow(hwnd); /* LVS_REPORT */
1
0
0
0
Daniel Jelinski : comctl32/listview: Correct icon spacing calculation when set to 0 or -1.
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: cb77ab1a004be9092590414212fb7bd109d9236a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cb77ab1a004be909259041421…
Author: Daniel Jelinski <djelinski1(a)gmail.com> Date: Mon Feb 4 20:42:44 2013 +0100 comctl32/listview: Correct icon spacing calculation when set to 0 or -1. --- dlls/comctl32/listview.c | 40 ++++++++++-------------- dlls/comctl32/tests/listview.c | 65 ++++++++++++++++++++++++---------------- 2 files changed, 56 insertions(+), 49 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 8031d37..cee1154 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -8,6 +8,7 @@ * Copyright 2002 Dimitrie O. Paun * Copyright 2009-2013 Nikolay Sivov * Copyright 2009 Owen Rudge for CodeWeavers + * Copyright 2012-2013 Daniel Jelinski * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -8593,28 +8594,21 @@ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy) if (infoPtr->uView != LV_VIEW_ICON) return oldspacing; /* set to defaults, if instructed to */ - if (cx == -1) cx = GetSystemMetrics(SM_CXICONSPACING); - if (cy == -1) cy = GetSystemMetrics(SM_CYICONSPACING); - - /* if 0 then compute width - * FIXME: computed cx and cy is not matching native behaviour */ - if (cx == 0) { - cx = GetSystemMetrics(SM_CXICONSPACING); - if (infoPtr->iconSize.cx + ICON_LR_PADDING > cx) - cx = infoPtr->iconSize.cx + ICON_LR_PADDING; + if (cx == -1 && cy == -1) + { + cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON) + infoPtr->iconSize.cx; + cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON) + infoPtr->iconSize.cy; } + /* if 0 then keep width */ + if (cx != 0) + infoPtr->iconSpacing.cx = cx; - /* if 0 then compute height */ - if (cy == 0) - cy = infoPtr->iconSize.cy + 2 * infoPtr->ntmHeight + - ICON_BOTTOM_PADDING + ICON_TOP_PADDING + LABEL_VERT_PADDING; - - - infoPtr->iconSpacing.cx = cx; - infoPtr->iconSpacing.cy = cy; + /* if 0 then keep height */ + if (cy != 0) + infoPtr->iconSpacing.cy = cy; TRACE("old=(%d,%d), new=(%d,%d), iconSize=(%d,%d), ntmH=%d\n", - LOWORD(oldspacing), HIWORD(oldspacing), cx, cy, + LOWORD(oldspacing), HIWORD(oldspacing), infoPtr->iconSpacing.cx, infoPtr->iconSpacing.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy, infoPtr->ntmHeight); @@ -8666,7 +8660,7 @@ static HIMAGELIST LISTVIEW_SetImageList(LISTVIEW_INFO *infoPtr, INT nType, HIMAG himlOld = infoPtr->himlNormal; infoPtr->himlNormal = himl; if (infoPtr->uView == LV_VIEW_ICON) set_icon_size(&infoPtr->iconSize, himl, FALSE); - LISTVIEW_SetIconSpacing(infoPtr, 0, 0); + LISTVIEW_SetIconSpacing(infoPtr, -1, -1); break; case LVSIL_SMALL: @@ -9090,7 +9084,7 @@ static INT LISTVIEW_SetView(LISTVIEW_INFO *infoPtr, DWORD nView) { TRACE("icon old size=(%d,%d), new size=(%d,%d)\n", oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy); - LISTVIEW_SetIconSpacing(infoPtr, 0, 0); + LISTVIEW_SetIconSpacing(infoPtr, -1, -1); } LISTVIEW_Arrange(infoPtr, LVA_DEFAULT); break; @@ -9389,8 +9383,8 @@ static LRESULT LISTVIEW_NCCreate(HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->bRedraw = TRUE; infoPtr->bNoItemMetrics = TRUE; infoPtr->bDoChangeNotify = TRUE; - infoPtr->iconSpacing.cx = GetSystemMetrics(SM_CXICONSPACING); - infoPtr->iconSpacing.cy = GetSystemMetrics(SM_CYICONSPACING); + infoPtr->iconSpacing.cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON); + infoPtr->iconSpacing.cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON); infoPtr->nEditLabelItem = -1; infoPtr->nLButtonDownItem = -1; infoPtr->dwHoverTime = HOVER_DEFAULT; /* default system hover time */ @@ -11040,7 +11034,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, { TRACE("icon old size=(%d,%d), new size=(%d,%d)\n", oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy); - LISTVIEW_SetIconSpacing(infoPtr, 0, 0); + LISTVIEW_SetIconSpacing(infoPtr, -1, -1); } } else if (uNewView == LVS_REPORT) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 2fb7cb5..2347bfa 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -4598,9 +4598,7 @@ static void test_getitemspacing(void) HWND hwnd; DWORD ret; INT cx, cy; - HIMAGELIST himl; - HBITMAP hbmp; - LVITEMA itema; + HIMAGELIST himl40, himl80; cx = GetSystemMetrics(SM_CXICONSPACING) - GetSystemMetrics(SM_CXICON); cy = GetSystemMetrics(SM_CYICONSPACING) - GetSystemMetrics(SM_CYICON); @@ -4608,56 +4606,71 @@ static void test_getitemspacing(void) /* LVS_ICON */ hwnd = create_listview_control(LVS_ICON); ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { expect(cx, LOWORD(ret)); expect(cy, HIWORD(ret)); -} + /* now try with icons */ - himl = ImageList_Create(40, 40, 0, 4, 4); - ok(himl != NULL, "failed to create imagelist\n"); - hbmp = CreateBitmap(40, 40, 1, 1, NULL); - ok(hbmp != NULL, "failed to create bitmap\n"); - ret = ImageList_Add(himl, hbmp, 0); - expect(0, ret); - ret = SendMessage(hwnd, LVM_SETIMAGELIST, 0, (LPARAM)himl); + himl40 = ImageList_Create(40, 40, 0, 4, 4); + ok(himl40 != NULL, "failed to create imagelist\n"); + himl80 = ImageList_Create(80, 80, 0, 4, 4); + ok(himl80 != NULL, "failed to create imagelist\n"); + ret = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)himl40); expect(0, ret); - itema.mask = LVIF_IMAGE; - itema.iImage = 0; - itema.iItem = 0; - itema.iSubItem = 0; - ret = SendMessage(hwnd, LVM_INSERTITEM, 0, (LPARAM)&itema); - expect(0, ret); ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { /* spacing + icon size returned */ expect(cx + 40, LOWORD(ret)); expect(cy + 40, HIWORD(ret)); -} + /* try changing icon size */ + SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)himl80); + + ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); + /* spacing + icon size returned */ + expect(cx + 80, LOWORD(ret)); + expect(cy + 80, HIWORD(ret)); + + /* set own icon spacing */ + ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, MAKELPARAM(100, 100)); + expect(cx + 80, LOWORD(ret)); + expect(cy + 80, HIWORD(ret)); + + ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); + /* set size returned */ + expect(100, LOWORD(ret)); + expect(100, HIWORD(ret)); + + /* now change image list - icon spacing should be unaffected */ + SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_NORMAL, (LPARAM)himl40); + + ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); + /* spacing + icon size returned */ + expect(cx + 40, LOWORD(ret)); + expect(cy + 40, HIWORD(ret)); + + SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_NORMAL, 0); + ImageList_Destroy(himl80); DestroyWindow(hwnd); /* LVS_SMALLICON */ hwnd = create_listview_control(LVS_SMALLICON); ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { expect(cx, LOWORD(ret)); expect(cy, HIWORD(ret)); -} + + ImageList_Destroy(himl40); DestroyWindow(hwnd); /* LVS_REPORT */ hwnd = create_listview_control(LVS_REPORT); ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { expect(cx, LOWORD(ret)); expect(cy, HIWORD(ret)); -} + DestroyWindow(hwnd); /* LVS_LIST */ hwnd = create_listview_control(LVS_LIST); ret = SendMessage(hwnd, LVM_GETITEMSPACING, FALSE, 0); -todo_wine { expect(cx, LOWORD(ret)); expect(cy, HIWORD(ret)); -} + DestroyWindow(hwnd); }
1
0
0
0
Frédéric Delanoy : msi: Fix memory leak (coverity ).
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: 72989b5b0335d203aa0afc478982acf9e0466b07 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72989b5b0335d203aa0afc478…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Sat Feb 2 09:56:53 2013 +0100 msi: Fix memory leak (coverity). --- dlls/msi/msi.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 6a623e7..c1f4fcc 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -3178,7 +3178,11 @@ static UINT get_file_version( const WCHAR *path, WCHAR *verbuf, DWORD *verlen, msi_free( version ); return GetLastError(); } - if (!verbuf && !verlen && !langbuf && !langlen) return ERROR_SUCCESS; + if (!verbuf && !verlen && !langbuf && !langlen) + { + msi_free( version ); + return ERROR_SUCCESS; + } if (verlen) { if (VerQueryValueW( version, szVersionResource, (LPVOID *)&ffi, &len ) && len > 0)
1
0
0
0
Marcus Meissner : comdlg32: Free files on errorpath (Coverity).
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: fd9becb9073026107346e042908dfc4a906a8739 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd9becb9073026107346e0429…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Thu Jan 31 18:26:47 2013 +0100 comdlg32: Free files on errorpath (Coverity). --- dlls/comdlg32/itemdlg.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 96ee5dc..33398b5 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -407,7 +407,7 @@ static HRESULT on_default_action(FileDialogImpl *This) IShellFolder *psf_parent, *psf_desktop; LPITEMIDLIST *pidla; LPITEMIDLIST current_folder; - LPWSTR fn_iter, files, tmp_files; + LPWSTR fn_iter, files = NULL, tmp_files; UINT file_count = 0, len, i; int open_action; HRESULT hr, ret = E_FAIL; @@ -425,6 +425,7 @@ static HRESULT on_default_action(FileDialogImpl *This) if(FAILED(hr)) { ERR("Failed to get pidl for current directory.\n"); + HeapFree(GetProcessHeap(), 0, files); return hr; }
1
0
0
0
Ludger Sprenker : windowscodecs: Add enum type WICTiffCompressionOption.
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: 5c1e82ce54f9c0dbce47a11d9b3dd066cc95ac91 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c1e82ce54f9c0dbce47a11d9…
Author: Ludger Sprenker <ludger(a)sprenker.net> Date: Mon Feb 4 20:39:23 2013 +0100 windowscodecs: Add enum type WICTiffCompressionOption. --- include/wincodec.idl | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/include/wincodec.idl b/include/wincodec.idl index 9a2d377..4e1d039 100644 --- a/include/wincodec.idl +++ b/include/wincodec.idl @@ -156,6 +156,18 @@ typedef enum WICPixelFormatNumericRepresentation { WICPIXELFORMATNUMERICREPRESENTATION_FORCE_DWORD = CODEC_FORCE_DWORD } WICPixelFormatNumericRepresentation; +typedef enum WICTiffCompressionOption { + WICTiffCompressionDontCare = 0x00000000, + WICTiffCompressionNone = 0x00000001, + WICTiffCompressionCCITT3 = 0x00000002, + WICTiffCompressionCCITT4 = 0x00000003, + WICTiffCompressionLZW = 0x00000004, + WICTiffCompressionRLE = 0x00000005, + WICTiffCompressionZIP = 0x00000006, + WICTiffCompressionLZWHDifferencing = 0x00000007, + WICTIFFCOMPRESSIONOPTION_FORCE_DWORD = CODEC_FORCE_DWORD +} WICTiffCompressionOption; + typedef GUID WICPixelFormatGUID; typedef REFGUID REFWICPixelFormatGUID;
1
0
0
0
Alistair Leslie-Hughes : fusion: Return correct error for null public token .
by Alexandre Julliard
06 Feb '13
06 Feb '13
Module: wine Branch: master Commit: 575571c9fcd64a0f5276aff6b6401a659eafef72 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=575571c9fcd64a0f5276aff6b…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Jan 31 16:08:38 2013 +1100 fusion: Return correct error for null public token. --- dlls/fusion/asmname.c | 4 ++++ dlls/fusion/tests/asmcache.c | 19 +++++++++++++++++++ include/corerror.h | 1 + 3 files changed, 24 insertions(+), 0 deletions(-) diff --git a/dlls/fusion/asmname.c b/dlls/fusion/asmname.c index 162a76b..fa84e53 100644 --- a/dlls/fusion/asmname.c +++ b/dlls/fusion/asmname.c @@ -561,6 +561,10 @@ static HRESULT parse_pubkey(IAssemblyNameImpl *name, LPCWSTR pubkey) { int i; BYTE val; + static const WCHAR nullstr[] = {'n','u','l','l',0}; + + if(lstrcmpiW(pubkey, nullstr) == 0) + return FUSION_E_PRIVATE_ASM_DISALLOWED; if (lstrlenW(pubkey) < CHARS_PER_PUBKEY) return FUSION_E_INVALID_NAME; diff --git a/dlls/fusion/tests/asmcache.c b/dlls/fusion/tests/asmcache.c index e97cfbe..320a938 100644 --- a/dlls/fusion/tests/asmcache.c +++ b/dlls/fusion/tests/asmcache.c @@ -1016,6 +1016,13 @@ static void test_QueryAssemblyInfo(void) 'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=', '2','d','0','3','6','1','7','b','1','c','3','1','e','2','f','5',',', 'c','u','l','t','u','r','e','=','n','e','u','t','r','a','l',0}; + static const WCHAR nullpublickey[] = { + 'm','s','c','o','r','l','i','b','.','d','l','l',',','v','e','r','s','i','o','n','=','0','.','0','.', + '0','.','0',',','c','u','l','t','u','r','e','=','n','e','u','t','r','a','l',',', + 'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=','n','u','l','l',0}; + static const WCHAR nullpublickey1[] = { + 'm','s','c','o','r','l','i','b','.','d','l','l',',', + 'p','u','b','l','i','c','K','e','y','T','o','k','e','n','=','n','u','L','l',0}; size = MAX_PATH; hr = pGetCachePath(ASM_CACHE_GAC, asmpath, &size); @@ -1386,6 +1393,18 @@ static void test_QueryAssemblyInfo(void) "Assembly path was changed\n"); ok(info.cchBuf == MAX_PATH, "Expected MAX_PATH, got %d\n", info.cchBuf); + /* display name is "mscorlib.dll,version=0.0.0.0,culture=neutral,publicKeyToken=null" */ + INIT_ASM_INFO(); + lstrcpyW(name, nullpublickey); + hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info); + ok(hr == FUSION_E_PRIVATE_ASM_DISALLOWED, "got %08x\n", hr); + + /* display name is "mscorlib.dll,publicKeyToken=nuLl" */ + INIT_ASM_INFO(); + lstrcpyW(name, nullpublickey1); + hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info); + ok(hr == FUSION_E_PRIVATE_ASM_DISALLOWED, "got %08x\n", hr); + /* display name is "wine, Culture=neutral" */ INIT_ASM_INFO(); lstrcpyW(name, wine); diff --git a/include/corerror.h b/include/corerror.h index 1537f93..3ddfe47 100644 --- a/include/corerror.h +++ b/include/corerror.h @@ -119,6 +119,7 @@ #define COR_E_HOSTPROTECTION EMAKEHR(0x1640) #define COR_E_ILLEGAL_REENTRANCY EMAKEHR(0x1641) +#define FUSION_E_PRIVATE_ASM_DISALLOWED EMAKEHR(0x1044) #define FUSION_E_INVALID_NAME EMAKEHR(0x1047) #define CLDB_E_FILE_OLDVER EMAKEHR(0x1107)
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
46
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
Results per page:
10
25
50
100
200