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
December 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
1233 discussions
Start a n
N
ew thread
Alexandre Julliard : user32: Remove the no longer needed WIN_ISDIALOG flag.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: 2ea73fd7092a87d818a51baa8b58d52879fe64b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ea73fd7092a87d818a51baa8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 20:25:04 2009 +0100 user32: Remove the no longer needed WIN_ISDIALOG flag. --- dlls/user32/defdlg.c | 1 - dlls/user32/dialog.c | 4 ++-- dlls/user32/win.c | 4 ++-- dlls/user32/win.h | 5 ++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dlls/user32/defdlg.c b/dlls/user32/defdlg.c index faf5026..373260a 100644 --- a/dlls/user32/defdlg.c +++ b/dlls/user32/defdlg.c @@ -342,7 +342,6 @@ DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create ) dlgInfo->idResult = 0; dlgInfo->flags = 0; wndPtr->dlgInfo = dlgInfo; - wndPtr->flags |= WIN_ISDIALOG; } out: diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index bce2684..2df58a7 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -1027,7 +1027,7 @@ static HWND DIALOG_FindMsgDestination( HWND hwndDlg ) pParent = WIN_GetPtr(hParent); if (!pParent || pParent == WND_OTHER_PROCESS || pParent == WND_DESKTOP) break; - if (!(pParent->flags & WIN_ISDIALOG)) + if (!pParent->dlgInfo) { WIN_ReleasePtr(pParent); break; @@ -1135,7 +1135,7 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg ) if (pWnd && pWnd != WND_OTHER_PROCESS) { - fIsDialog = (pWnd->flags & WIN_ISDIALOG) != 0; + fIsDialog = (pWnd->dlgInfo != NULL); WIN_ReleasePtr(pWnd); } diff --git a/dlls/user32/win.c b/dlls/user32/win.c index f37f8f4..acf70a3 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -1986,7 +1986,7 @@ static LONG_PTR WIN_GetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicod retvalue = get_win_data( (char *)wndPtr->wExtra + offset, size ); /* Special case for dialog window procedure */ - if ((offset == DWLP_DLGPROC) && (size == sizeof(LONG_PTR)) && (wndPtr->flags & WIN_ISDIALOG)) + if ((offset == DWLP_DLGPROC) && (size == sizeof(LONG_PTR)) && wndPtr->dlgInfo) retvalue = (LONG_PTR)WINPROC_GetProc( (WNDPROC)retvalue, unicode ); WIN_ReleasePtr( wndPtr ); return retvalue; @@ -2115,7 +2115,7 @@ LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, B break; case DWLP_DLGPROC: if ((wndPtr->cbWndExtra - sizeof(LONG_PTR) >= DWLP_DLGPROC) && - (size == sizeof(LONG_PTR)) && (wndPtr->flags & WIN_ISDIALOG)) + (size == sizeof(LONG_PTR)) && wndPtr->dlgInfo) { WNDPROC *ptr = (WNDPROC *)((char *)wndPtr->wExtra + DWLP_DLGPROC); retval = (ULONG_PTR)WINPROC_GetProc( *ptr, unicode ); diff --git a/dlls/user32/win.h b/dlls/user32/win.h index bd8381e..58d5972 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -70,9 +70,8 @@ typedef struct tagWND #define WIN_NEED_SIZE 0x0002 /* Internal WM_SIZE is needed */ #define WIN_NCACTIVATED 0x0004 /* last WM_NCACTIVATE was positive */ #define WIN_ISMDICLIENT 0x0008 /* Window is an MDIClient */ -#define WIN_ISDIALOG 0x0010 /* Window is a dialog */ -#define WIN_ISUNICODE 0x0040 /* Window is Unicode */ -#define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0080 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */ +#define WIN_ISUNICODE 0x0010 /* Window is Unicode */ +#define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0020 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */ /* Window functions */ extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : user32: Remove the no longer used WIN_ISWIN32 flag.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: 5e640271f2d36a19912a164673d6774ccccc8c8c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e640271f2d36a19912a16467…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 20:19:43 2009 +0100 user32: Remove the no longer used WIN_ISWIN32 flag. --- dlls/user32/controls.h | 6 +++--- dlls/user32/msg16.c | 4 ++-- dlls/user32/win.c | 10 ++++------ dlls/user32/win.h | 3 +-- dlls/user32/wnd16.c | 4 ++-- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index ae964b8..e8c7bdb 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -96,7 +96,7 @@ struct wow_handlers16 LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); - HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT); + HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL); LRESULT (*call_window_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*); LRESULT (*call_dialog_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*); HICON (*alloc_icon_handle)(UINT); @@ -114,7 +114,7 @@ struct wow_handlers32 LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); - HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT); + HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL); HWND (*get_win_handle)(HWND); WNDPROC (*alloc_winproc)(WNDPROC,BOOL); struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL); @@ -133,7 +133,7 @@ extern LRESULT StaticWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDE /* 16-bit support */ extern struct wow_handlers32 wow_handlers32 DECLSPEC_HIDDEN; -extern HWND create_window16(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT) DECLSPEC_HIDDEN; +extern HWND create_window16(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL) DECLSPEC_HIDDEN; extern void free_module_classes(HINSTANCE16) DECLSPEC_HIDDEN; extern void register_wow_handlers(void) DECLSPEC_HIDDEN; extern void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new, diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c index 698fb61..cbaab4b 100644 --- a/dlls/user32/msg16.c +++ b/dlls/user32/msg16.c @@ -2571,13 +2571,13 @@ static LRESULT static_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, /*********************************************************************** * create_window16 */ -HWND create_window16( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE instance, UINT flags ) +HWND create_window16( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE instance, BOOL unicode ) { /* map to module handle */ if (instance && !((ULONG_PTR)instance >> 16)) instance = HINSTANCE_32( GetExePtr( HINSTANCE_16(instance) )); - return wow_handlers32.create_window( cs, className, instance, flags ); + return wow_handlers32.create_window( cs, className, instance, unicode ); } diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 6ce524c..f37f8f4 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -1069,14 +1069,13 @@ static void dump_window_styles( DWORD style, DWORD exstyle ) * * Implementation of CreateWindowEx(). */ -HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, UINT flags ) +HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, BOOL unicode ) { INT cx, cy, style, sw = SW_SHOW; LRESULT result; RECT rect; WND *wndPtr; HWND hwnd, parent, owner, top_child = 0; - BOOL unicode = (flags & WIN_ISUNICODE) != 0; MDICREATESTRUCTW mdi_cs; CBT_CREATEWNDW cbtc; CREATESTRUCTW cbcs; @@ -1217,7 +1216,6 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, wndPtr->hIcon = 0; wndPtr->hIconSmall = 0; wndPtr->hSysMenu = 0; - wndPtr->flags |= (flags & WIN_ISWIN32); wndPtr->min_pos.x = wndPtr->min_pos.y = -1; wndPtr->max_pos.x = wndPtr->max_pos.y = -1; @@ -1465,11 +1463,11 @@ HWND WINAPI CreateWindowExA( DWORD exStyle, LPCSTR className, WCHAR bufferW[256]; if (!MultiByteToWideChar( CP_ACP, 0, className, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) )) return 0; - return wow_handlers.create_window( (CREATESTRUCTW *)&cs, bufferW, instance, WIN_ISWIN32 ); + return wow_handlers.create_window( (CREATESTRUCTW *)&cs, bufferW, instance, FALSE ); } /* Note: we rely on the fact that CREATESTRUCTA and */ /* CREATESTRUCTW have the same layout. */ - return wow_handlers.create_window( (CREATESTRUCTW *)&cs, (LPCWSTR)className, instance, WIN_ISWIN32 ); + return wow_handlers.create_window( (CREATESTRUCTW *)&cs, (LPCWSTR)className, instance, FALSE ); } @@ -1497,7 +1495,7 @@ HWND WINAPI CreateWindowExW( DWORD exStyle, LPCWSTR className, cs.lpszClass = className; cs.dwExStyle = exStyle; - return wow_handlers.create_window( &cs, className, instance, WIN_ISWIN32 | WIN_ISUNICODE ); + return wow_handlers.create_window( &cs, className, instance, TRUE ); } diff --git a/dlls/user32/win.h b/dlls/user32/win.h index f764d89..bd8381e 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -71,7 +71,6 @@ typedef struct tagWND #define WIN_NCACTIVATED 0x0004 /* last WM_NCACTIVATE was positive */ #define WIN_ISMDICLIENT 0x0008 /* Window is an MDIClient */ #define WIN_ISDIALOG 0x0010 /* Window is a dialog */ -#define WIN_ISWIN32 0x0020 /* Understands Win32 messages */ #define WIN_ISUNICODE 0x0040 /* Window is Unicode */ #define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0080 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */ @@ -87,7 +86,7 @@ extern ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits ) DECLSPE extern BOOL WIN_GetRectangles( HWND hwnd, RECT *rectWindow, RECT *rectClient ) DECLSPEC_HIDDEN; extern LRESULT WIN_DestroyWindow( HWND hwnd ) DECLSPEC_HIDDEN; extern void WIN_DestroyThreadWindows( HWND hwnd ) DECLSPEC_HIDDEN; -extern HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, UINT flags ) DECLSPEC_HIDDEN; +extern HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, BOOL unicode ) DECLSPEC_HIDDEN; extern BOOL WIN_IsWindowDrawable( HWND hwnd, BOOL ) DECLSPEC_HIDDEN; extern HWND *WIN_ListChildren( HWND hwnd ) DECLSPEC_HIDDEN; extern LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, UINT size, LONG_PTR newval, BOOL unicode ) DECLSPEC_HIDDEN; diff --git a/dlls/user32/wnd16.c b/dlls/user32/wnd16.c index 9509bd0..7cca331 100644 --- a/dlls/user32/wnd16.c +++ b/dlls/user32/wnd16.c @@ -1892,13 +1892,13 @@ HWND16 WINAPI CreateWindowEx16( DWORD exStyle, LPCSTR className, if (!MultiByteToWideChar( CP_ACP, 0, className, -1, bufferW, sizeof(bufferW)/sizeof(WCHAR) )) return 0; - hwnd = create_window16( (CREATESTRUCTW *)&cs, bufferW, HINSTANCE_32(instance), 0 ); + hwnd = create_window16( (CREATESTRUCTW *)&cs, bufferW, HINSTANCE_32(instance), FALSE ); } else { if (!GlobalGetAtomNameA( LOWORD(className), buffer, sizeof(buffer) )) return 0; cs.lpszClass = buffer; - hwnd = create_window16( (CREATESTRUCTW *)&cs, (LPCWSTR)className, HINSTANCE_32(instance), 0 ); + hwnd = create_window16( (CREATESTRUCTW *)&cs, (LPCWSTR)className, HINSTANCE_32(instance), FALSE ); } return HWND_16( hwnd ); }
1
0
0
0
Alexandre Julliard : user32: Move a few 16-bit stubs to user16.c.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: da57abcb02598dae7a121d8d4a3db0043dc3901b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da57abcb02598dae7a121d8d4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 19:49:27 2009 +0100 user32: Move a few 16-bit stubs to user16.c. --- dlls/user32/misc.c | 20 -------------------- dlls/user32/user16.c | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index 8e7f48f..1dc2cb8 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -627,26 +627,6 @@ VOID WINAPI LoadLocalFonts(VOID) /*********************************************************************** - * USER_489 (USER.489) - */ -LONG WINAPI stub_USER_489(void) { FIXME("stub\n"); return 0; } - -/*********************************************************************** - * USER_490 (USER.490) - */ -LONG WINAPI stub_USER_490(void) { FIXME("stub\n"); return 0; } - -/*********************************************************************** - * USER_492 (USER.492) - */ -LONG WINAPI stub_USER_492(void) { FIXME("stub\n"); return 0; } - -/*********************************************************************** - * USER_496 (USER.496) - */ -LONG WINAPI stub_USER_496(void) { FIXME("stub\n"); return 0; } - -/*********************************************************************** * User32InitializeImmEntryTable */ BOOL WINAPI User32InitializeImmEntryTable(LPVOID ptr) diff --git a/dlls/user32/user16.c b/dlls/user32/user16.c index 51240a1..299b16e 100644 --- a/dlls/user32/user16.c +++ b/dlls/user32/user16.c @@ -2876,6 +2876,46 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam, /*********************************************************************** + * USER_489 (USER.489) + */ +LONG WINAPI stub_USER_489(void) +{ + FIXME("stub\n"); + return 0; +} + + +/*********************************************************************** + * USER_490 (USER.490) + */ +LONG WINAPI stub_USER_490(void) +{ + FIXME("stub\n"); + return 0; +} + + +/*********************************************************************** + * USER_492 (USER.492) + */ +LONG WINAPI stub_USER_492(void) +{ + FIXME("stub\n"); + return 0; +} + + +/*********************************************************************** + * USER_496 (USER.496) + */ +LONG WINAPI stub_USER_496(void) +{ + FIXME("stub\n"); + return 0; +} + + +/*********************************************************************** * FormatMessage (USER.606) */ DWORD WINAPI FormatMessage16(
1
0
0
0
Alexandre Julliard : user32: Remove remaining calls to internal 32-bit functions from msg16.c.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: cf81d0f0f9bec8fed38c66851c756b387b384072 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf81d0f0f9bec8fed38c66851…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 19:45:41 2009 +0100 user32: Remove remaining calls to internal 32-bit functions from msg16.c. --- dlls/user32/msg16.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c index 085510c..698fb61 100644 --- a/dlls/user32/msg16.c +++ b/dlls/user32/msg16.c @@ -258,8 +258,6 @@ static LRESULT call_window_proc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPA } u; } args; - USER_CheckNotLock(); - if (index >= MAX_WINPROCS32) func = winproc16_array[index - MAX_WINPROCS32]; /* Window procedures want ax = hInstance, ds = es = ss */ @@ -1489,7 +1487,8 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM LRESULT result; HWND hwnd = WIN_Handle32( hwnd16 ); - if (hwnd != HWND_BROADCAST && WIN_IsCurrentThread(hwnd)) + if (hwnd != HWND_BROADCAST && + GetWindowThreadProcessId( hwnd, NULL ) == GetCurrentThreadId()) { /* call 16-bit window proc directly */ WNDPROC16 winproc; @@ -2495,12 +2494,8 @@ static LRESULT mdiclient_proc16( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar if (msg == WM_CREATE) { LPCREATESTRUCTA cs = (LPCREATESTRUCTA)lParam; - WND *win; - BOOL is_win32; - - if (!(win = WIN_GetPtr( hwnd ))) return 0; - is_win32 = (win == WND_OTHER_PROCESS || win == WND_DESKTOP || (win->flags & WIN_ISWIN32)); - WIN_ReleasePtr( win ); + HINSTANCE instance = (HINSTANCE)GetWindowLongPtrW( hwnd, GWLP_HINSTANCE ); + BOOL is_win32 = !instance || ((ULONG_PTR)instance >> 16); /* Translation layer doesn't know what's in the cs->lpCreateParams * so we have to keep track of what environment we're in. */
1
0
0
0
Alexandre Julliard : user32: Replace spy functions by a simple trace in 16-bit code.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: b63d0e19eda129ea1cd0a42450911f5cb9ff1cc9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b63d0e19eda129ea1cd0a4245…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 19:45:03 2009 +0100 user32: Replace spy functions by a simple trace in 16-bit code. --- dlls/user32/msg16.c | 15 ++++++++------- dlls/user32/spy.c | 32 ++++++-------------------------- dlls/user32/user_private.h | 9 +++------ 3 files changed, 17 insertions(+), 39 deletions(-) diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c index 407f0ad..085510c 100644 --- a/dlls/user32/msg16.c +++ b/dlls/user32/msg16.c @@ -35,6 +35,7 @@ #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(msg); +WINE_DECLARE_DEBUG_CHANNEL(message); DWORD USER16_AlertableWait = 0; @@ -1498,9 +1499,10 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM if (!(winproc = (WNDPROC16)GetWindowLong16( hwnd16, GWLP_WNDPROC ))) return 0; - SPY_EnterMessage( SPY_SENDMESSAGE16, hwnd, msg, wparam, lparam ); + TRACE_(message)("(0x%04x) [%04x] wp=%04x lp=%08lx\n", hwnd16, msg, wparam, lparam ); result = CallWindowProc16( winproc, hwnd16, msg, wparam, lparam ); - SPY_ExitMessage( SPY_RESULT_OK16, hwnd, msg, result, wparam, lparam ); + TRACE_(message)("(0x%04x) [%04x] wp=%04x lp=%08lx returned %08lx\n", + hwnd16, msg, wparam, lparam, result ); } else /* map to 32-bit unicode for inter-thread/process message */ { @@ -1779,8 +1781,7 @@ BOOL16 WINAPI TranslateMessage16( const MSG16 *msg ) LONG WINAPI DispatchMessage16( const MSG16* msg ) { WNDPROC16 winproc; - LONG retval; - HWND hwnd = WIN_Handle32( msg->hwnd ); + LRESULT retval; /* Process timer messages */ if ((msg->message == WM_TIMER) || (msg->message == WM_SYSTIMER)) @@ -1795,10 +1796,10 @@ LONG WINAPI DispatchMessage16( const MSG16* msg ) SetLastError( ERROR_INVALID_WINDOW_HANDLE ); return 0; } - SPY_EnterMessage( SPY_DISPATCHMESSAGE16, hwnd, msg->message, msg->wParam, msg->lParam ); + TRACE_(message)("(0x%04x) [%04x] wp=%04x lp=%08lx\n", msg->hwnd, msg->message, msg->wParam, msg->lParam ); retval = CallWindowProc16( winproc, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - SPY_ExitMessage( SPY_RESULT_OK16, hwnd, msg->message, retval, msg->wParam, msg->lParam ); - + TRACE_(message)("(0x%04x) [%04x] wp=%04x lp=%08lx returned %08lx\n", + msg->hwnd, msg->message, msg->wParam, msg->lParam, retval ); return retval; } diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c index ea6c3d7..a3c7b3c 100644 --- a/dlls/user32/spy.c +++ b/dlls/user32/spy.c @@ -27,7 +27,6 @@ #include "winbase.h" #include "wingdi.h" #include "winreg.h" -#include "wownt32.h" #include "wine/unicode.h" #include "win.h" #include "user_private.h" @@ -1993,8 +1992,8 @@ static const SPY_NOTIFY *end_spnfy_array; /* ptr to last good entry in array #undef SPNFY -static BOOL16 SPY_Exclude[SPY_MAX_MSGNUM+1]; -static BOOL16 SPY_ExcludeDWP = 0; +static unsigned char SPY_Exclude[SPY_MAX_MSGNUM+1]; +static unsigned char SPY_ExcludeDWP = 0; #define SPY_EXCLUDE(msg) \ (SPY_Exclude[(msg) > SPY_MAX_MSGNUM ? SPY_MAX_MSGNUM : (msg)]) @@ -2574,19 +2573,12 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg, /* each SPY_SENDMESSAGE must be complemented by call to SPY_ExitMessage */ switch(iFlag) { - case SPY_DISPATCHMESSAGE16: - TRACE("%*s(%04x) %-16s [%04x] %s dispatched wp=%04lx lp=%08lx\n", - indent, "", HWND_16(hWnd), - debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, wParam, lParam); - break; - case SPY_DISPATCHMESSAGE: TRACE("%*s(%p) %-16s [%04x] %s dispatched wp=%08lx lp=%08lx\n", indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, wParam, lParam); break; - case SPY_SENDMESSAGE16: case SPY_SENDMESSAGE: { char taskName[20]; @@ -2595,16 +2587,10 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg, if (tid == GetCurrentThreadId()) strcpy( taskName, "self" ); else sprintf( taskName, "tid %04x", GetCurrentThreadId() ); - if (iFlag == SPY_SENDMESSAGE16) - TRACE("%*s(%04x) %-16s [%04x] %s sent from %s wp=%04lx lp=%08lx\n", - indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg, - sp_e.msg_name, taskName, wParam, lParam ); - else - { TRACE("%*s(%p) %-16s [%04x] %s sent from %s wp=%08lx lp=%08lx\n", - indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg, - sp_e.msg_name, taskName, wParam, lParam ); - SPY_DumpStructure(&sp_e, TRUE); - } + TRACE("%*s(%p) %-16s [%04x] %s sent from %s wp=%08lx lp=%08lx\n", + indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg, + sp_e.msg_name, taskName, wParam, lParam ); + SPY_DumpStructure(&sp_e, TRUE); } break; @@ -2653,12 +2639,6 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn, indent, "", hWnd, msg, sp_e.msg_name, lReturn ); break; - case SPY_RESULT_OK16: - TRACE(" %*s(%04x) %-16s [%04x] %s returned %08lx\n", - indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg, - sp_e.msg_name, lReturn ); - break; - case SPY_RESULT_OK: TRACE(" %*s(%p) %-16s [%04x] %s returned %08lx\n", indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg, diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index a54f272..10a03db 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -255,13 +255,10 @@ extern BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar /* message spy definitions */ -#define SPY_DISPATCHMESSAGE16 0x0100 -#define SPY_DISPATCHMESSAGE 0x0101 -#define SPY_SENDMESSAGE16 0x0102 -#define SPY_SENDMESSAGE 0x0103 -#define SPY_DEFWNDPROC 0x0104 +#define SPY_DISPATCHMESSAGE 0x0100 +#define SPY_SENDMESSAGE 0x0101 +#define SPY_DEFWNDPROC 0x0102 -#define SPY_RESULT_OK16 0x0000 #define SPY_RESULT_OK 0x0001 #define SPY_RESULT_DEFWND 0x0002
1
0
0
0
Alexandre Julliard : user32: Remove some redundant 16-bit message traces.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: a0f9da117a6ae95f8d241a6f219defb35122bd03 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0f9da117a6ae95f8d241a6f2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 22 14:50:58 2009 +0100 user32: Remove some redundant 16-bit message traces. --- dlls/user32/msg16.c | 28 ++++---------------------- dlls/user32/spy.c | 45 ++++++++++--------------------------------- dlls/user32/user_private.h | 8 +----- 3 files changed, 18 insertions(+), 63 deletions(-) diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c index aef453d..407f0ad 100644 --- a/dlls/user32/msg16.c +++ b/dlls/user32/msg16.c @@ -614,9 +614,6 @@ LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT1 LRESULT ret = 0; HWND hwnd32 = WIN_Handle32( hwnd ); - TRACE_(msg)("(hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n", - hwnd32, SPY_GetMsgName(msg, hwnd32), wParam, lParam); - switch(msg) { case WM_NCCREATE: @@ -938,9 +935,6 @@ LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT { LRESULT ret = 0; - TRACE_(msg)("(hwnd=%p,msg=%s,wp=%08lx,lp=%08lx)\n", - hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam); - switch(msg) { case WM_NCCREATE: @@ -1625,8 +1619,6 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam, LPAR LRESULT result; HWND hwnd = WIN_Handle32( hwnd16 ); - SPY_EnterMessage( SPY_DEFWNDPROC16, hwnd, msg, wParam, lParam ); - switch(msg) { case WM_NCCREATE: @@ -1646,10 +1638,8 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam, LPAR cs32.dwExStyle = cs16->dwExStyle; cs32.lpszName = MapSL(cs16->lpszName); cs32.lpszClass = MapSL(cs16->lpszClass); - result = DefWindowProcA( hwnd, msg, wParam, (LPARAM)&cs32 ); + return DefWindowProcA( hwnd, msg, wParam, (LPARAM)&cs32 ); } - break; - case WM_NCCALCSIZE: { RECT16 *rect16 = MapSL(lParam); @@ -1666,9 +1656,8 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam, LPAR rect16->top = rect32.top; rect16->right = rect32.right; rect16->bottom = rect32.bottom; + return result; } - break; - case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGED: { @@ -1692,21 +1681,14 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam, LPAR pos16->cx = pos32.cx; pos16->cy = pos32.cy; pos16->flags = pos32.flags; + return result; } - break; - case WM_GETTEXT: case WM_SETTEXT: - result = DefWindowProcA( hwnd, msg, wParam, (LPARAM)MapSL(lParam) ); - break; - + return DefWindowProcA( hwnd, msg, wParam, (LPARAM)MapSL(lParam) ); default: - result = DefWindowProcA( hwnd, msg, wParam, lParam ); - break; + return DefWindowProcA( hwnd, msg, wParam, lParam ); } - - SPY_ExitMessage( SPY_RESULT_DEFWND16, hwnd, msg, result, wParam, lParam ); - return result; } diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c index eb126e3..ea6c3d7 100644 --- a/dlls/user32/spy.c +++ b/dlls/user32/spy.c @@ -2575,13 +2575,13 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg, switch(iFlag) { case SPY_DISPATCHMESSAGE16: - TRACE("%*s(%04x) %-16s message [%04x] %s dispatched wp=%04lx lp=%08lx\n", + TRACE("%*s(%04x) %-16s [%04x] %s dispatched wp=%04lx lp=%08lx\n", indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, wParam, lParam); break; case SPY_DISPATCHMESSAGE: - TRACE("%*s(%p) %-16s message [%04x] %s dispatched wp=%08lx lp=%08lx\n", + TRACE("%*s(%p) %-16s [%04x] %s dispatched wp=%08lx lp=%08lx\n", indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, wParam, lParam); break; @@ -2596,11 +2596,11 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg, else sprintf( taskName, "tid %04x", GetCurrentThreadId() ); if (iFlag == SPY_SENDMESSAGE16) - TRACE("%*s(%04x) %-16s message [%04x] %s sent from %s wp=%04lx lp=%08lx\n", + TRACE("%*s(%04x) %-16s [%04x] %s sent from %s wp=%04lx lp=%08lx\n", indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, taskName, wParam, lParam ); else - { TRACE("%*s(%p) %-16s message [%04x] %s sent from %s wp=%08lx lp=%08lx\n", + { TRACE("%*s(%p) %-16s [%04x] %s sent from %s wp=%08lx lp=%08lx\n", indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, taskName, wParam, lParam ); SPY_DumpStructure(&sp_e, TRUE); @@ -2608,17 +2608,10 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg, } break; - case SPY_DEFWNDPROC16: - if( SPY_ExcludeDWP ) return; - TRACE("%*s(%04x) DefWindowProc16: %s [%04x] wp=%04lx lp=%08lx\n", - indent, "", HWND_16(hWnd), sp_e.msg_name, msg, wParam, lParam ); - break; - case SPY_DEFWNDPROC: if( SPY_ExcludeDWP ) return; - TRACE("%*s(%p) DefWindowProc32: %s [%04x] wp=%08lx lp=%08lx\n", - indent, "", hWnd, sp_e.msg_name, - msg, wParam, lParam ); + TRACE("%*s(%p) DefWindowProc:[%04x] %s wp=%08lx lp=%08lx\n", + indent, "", hWnd, msg, sp_e.msg_name, wParam, lParam ); break; } set_indent_level( indent + SPY_INDENT_UNIT ); @@ -2637,7 +2630,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn, DWORD save_error = GetLastError(); if (!TRACE_ON(message) || SPY_EXCLUDE(msg) || - (SPY_ExcludeDWP && (iFlag == SPY_RESULT_DEFWND16 || iFlag == SPY_RESULT_DEFWND)) ) + (SPY_ExcludeDWP && iFlag == SPY_RESULT_DEFWND)) return; sp_e.msgnum = msg; @@ -2655,39 +2648,23 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn, switch(iFlag) { - case SPY_RESULT_DEFWND16: - TRACE(" %*s(%04x) DefWindowProc16: %s [%04x] returned %08lx\n", - indent, "", HWND_16(hWnd), sp_e.msg_name, msg, lReturn ); - break; - case SPY_RESULT_DEFWND: - TRACE(" %*s(%p) DefWindowProc32: %s [%04x] returned %08lx\n", - indent, "", hWnd, sp_e.msg_name, msg, lReturn ); + TRACE(" %*s(%p) DefWindowProc: [%04x] %s returned %08lx\n", + indent, "", hWnd, msg, sp_e.msg_name, lReturn ); break; case SPY_RESULT_OK16: - TRACE(" %*s(%04x) %-16s message [%04x] %s returned %08lx\n", + TRACE(" %*s(%04x) %-16s [%04x] %s returned %08lx\n", indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, lReturn ); break; case SPY_RESULT_OK: - TRACE(" %*s(%p) %-16s message [%04x] %s returned %08lx\n", + TRACE(" %*s(%p) %-16s [%04x] %s returned %08lx\n", indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name, lReturn ); SPY_DumpStructure(&sp_e, FALSE); break; - - case SPY_RESULT_INVALIDHWND16: - WARN(" %*s(%04x) %-16s message [%04x] %s HAS INVALID HWND\n", - indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg, sp_e.msg_name ); - break; - - case SPY_RESULT_INVALIDHWND: - WARN(" %*s(%p) %-16s message [%04x] %s HAS INVALID HWND\n", - indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg, - sp_e.msg_name ); - break; } SetLastError( save_error ); } diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 7ca39ff..a54f272 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -259,15 +259,11 @@ extern BOOL WINPROC_call_window( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar #define SPY_DISPATCHMESSAGE 0x0101 #define SPY_SENDMESSAGE16 0x0102 #define SPY_SENDMESSAGE 0x0103 -#define SPY_DEFWNDPROC16 0x0104 -#define SPY_DEFWNDPROC 0x0105 +#define SPY_DEFWNDPROC 0x0104 #define SPY_RESULT_OK16 0x0000 #define SPY_RESULT_OK 0x0001 -#define SPY_RESULT_INVALIDHWND16 0x0002 -#define SPY_RESULT_INVALIDHWND 0x0003 -#define SPY_RESULT_DEFWND16 0x0004 -#define SPY_RESULT_DEFWND 0x0005 +#define SPY_RESULT_DEFWND 0x0002 extern const char *SPY_GetClassLongOffsetName( INT offset ) DECLSPEC_HIDDEN; extern const char *SPY_GetMsgName( UINT msg, HWND hWnd ) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : user32: Export the WIN_GetFullHandle function through the WoW handlers.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: b201a41edf29386074f6b1c410d00254344994b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b201a41edf29386074f6b1c41…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 22 18:09:30 2009 +0100 user32: Export the WIN_GetFullHandle function through the WoW handlers. --- dlls/user32/comm16.c | 2 +- dlls/user32/controls.h | 6 ++++++ dlls/user32/hook16.c | 2 +- dlls/user32/win.c | 12 ++++++------ dlls/user32/win.h | 8 +------- dlls/user32/winproc.c | 1 + 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/dlls/user32/comm16.c b/dlls/user32/comm16.c index 46f72c6..072b8bd 100644 --- a/dlls/user32/comm16.c +++ b/dlls/user32/comm16.c @@ -63,7 +63,7 @@ #include "windef.h" #include "winbase.h" #include "wine/winuser16.h" -#include "win.h" +#include "controls.h" #include "user_private.h" #include "wine/debug.h" diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 65269c5..ae964b8 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -115,6 +115,7 @@ struct wow_handlers32 LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT); + HWND (*get_win_handle)(HWND); WNDPROC (*alloc_winproc)(WNDPROC,BOOL); struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL); INT (*dialog_box_loop)(HWND,HWND); @@ -137,6 +138,11 @@ extern void free_module_classes(HINSTANCE16) DECLSPEC_HIDDEN; extern void register_wow_handlers(void) DECLSPEC_HIDDEN; extern void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new, struct wow_handlers32 *orig ); +static inline HWND WIN_Handle32( HWND16 hwnd16 ) +{ + return wow_handlers32.get_win_handle( (HWND)(ULONG_PTR)hwnd16 ); +} + /* Class functions */ struct tagCLASS; /* opaque structure */ diff --git a/dlls/user32/hook16.c b/dlls/user32/hook16.c index 17d187d..cdea60f 100644 --- a/dlls/user32/hook16.c +++ b/dlls/user32/hook16.c @@ -28,7 +28,7 @@ #include "winuser.h" #include "wownt32.h" #include "wine/winuser16.h" -#include "win.h" +#include "controls.h" #include "user_private.h" #include "wine/debug.h" diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 393c562..6ce524c 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -524,18 +524,18 @@ HWND WIN_IsCurrentThread( HWND hwnd ) /*********************************************************************** - * WIN_Handle32 + * WIN_GetFullHandle * - * Convert a 16-bit window handle to a full 32-bit handle. + * Convert a possibly truncated window handle to a full 32-bit handle. */ -HWND WIN_Handle32( HWND16 hwnd16 ) +HWND WIN_GetFullHandle( HWND hwnd ) { WND *ptr; - HWND hwnd = (HWND)(ULONG_PTR)hwnd16; - if (hwnd16 <= 1 || hwnd16 == 0xffff) return hwnd; + if (!hwnd || (ULONG_PTR)hwnd >> 16) return hwnd; + if (LOWORD(hwnd) <= 1 || LOWORD(hwnd) == 0xffff) return hwnd; /* do sign extension for -2 and -3 */ - if (hwnd16 >= (HWND16)-3) return (HWND)(LONG_PTR)(INT16)hwnd16; + if (LOWORD(hwnd) >= (WORD)-3) return (HWND)(LONG_PTR)(INT16)LOWORD(hwnd); if (!(ptr = WIN_GetPtr( hwnd ))) return hwnd; diff --git a/dlls/user32/win.h b/dlls/user32/win.h index ab37e3e..f764d89 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -79,7 +79,7 @@ typedef struct tagWND extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN; extern BOOL is_desktop_window( HWND hwnd ) DECLSPEC_HIDDEN; extern WND *WIN_GetPtr( HWND hwnd ) DECLSPEC_HIDDEN; -extern HWND WIN_Handle32( HWND16 hwnd16 ) DECLSPEC_HIDDEN; +extern HWND WIN_GetFullHandle( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_IsCurrentProcess( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_IsCurrentThread( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND WIN_SetOwner( HWND hwnd, HWND owner ) DECLSPEC_HIDDEN; @@ -98,12 +98,6 @@ extern HDESK open_winstation_desktop( HWINSTA hwinsta, LPCWSTR name, DWORD flags extern void USER_Lock(void) DECLSPEC_HIDDEN; extern void USER_Unlock(void) DECLSPEC_HIDDEN; -static inline HWND WIN_GetFullHandle( HWND hwnd ) -{ - if (!HIWORD(hwnd) && hwnd) hwnd = WIN_Handle32( LOWORD(hwnd) ); - return hwnd; -} - /* to release pointers retrieved by WIN_GetPtr */ static inline void WIN_ReleasePtr( WND *ptr ) { diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index c38c087..b84abb5 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -1168,6 +1168,7 @@ void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new, struct wo orig->scrollbar_proc = ScrollBarWndProc_common; orig->static_proc = StaticWndProc_common; orig->create_window = WIN_CreateWindowEx; + orig->get_win_handle = WIN_GetFullHandle; orig->alloc_winproc = WINPROC_AllocProc; orig->get_dialog_info = DIALOG_get_info; orig->dialog_box_loop = DIALOG_DoDialogBox;
1
0
0
0
Alexandre Julliard : user32: Export DIALOG_get_info and DIALOG_DoDialogBox through the WoW handlers.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: eb36bb2e47c77dd12f098d62f471b94c7695c103 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eb36bb2e47c77dd12f098d62f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 22 17:57:42 2009 +0100 user32: Export DIALOG_get_info and DIALOG_DoDialogBox through the WoW handlers. --- dlls/user32/controls.h | 3 +++ dlls/user32/dialog16.c | 8 ++++---- dlls/user32/msg16.c | 2 +- dlls/user32/winproc.c | 20 +++++++++++--------- dlls/user32/wnd16.c | 6 ++++-- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 279dc4c..65269c5 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -116,6 +116,8 @@ struct wow_handlers32 LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL); HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT); WNDPROC (*alloc_winproc)(WNDPROC,BOOL); + struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL); + INT (*dialog_box_loop)(HWND,HWND); }; extern struct wow_handlers16 wow_handlers DECLSPEC_HIDDEN; @@ -129,6 +131,7 @@ extern LRESULT ScrollBarWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HI extern LRESULT StaticWndProc_common(HWND,UINT,WPARAM,LPARAM,BOOL) DECLSPEC_HIDDEN; /* 16-bit support */ +extern struct wow_handlers32 wow_handlers32 DECLSPEC_HIDDEN; extern HWND create_window16(CREATESTRUCTW*,LPCWSTR,HINSTANCE,UINT) DECLSPEC_HIDDEN; extern void free_module_classes(HINSTANCE16) DECLSPEC_HIDDEN; extern void register_wow_handlers(void) DECLSPEC_HIDDEN; diff --git a/dlls/user32/dialog16.c b/dlls/user32/dialog16.c index 95f009f..0e86a73 100644 --- a/dlls/user32/dialog16.c +++ b/dlls/user32/dialog16.c @@ -177,7 +177,7 @@ static LPCSTR DIALOG_GetControl16( LPCSTR p, DLG_CONTROL_INFO *info ) static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template, const DLG_TEMPLATE *dlgTemplate, HINSTANCE16 hInst ) { - DIALOGINFO *dlgInfo = DIALOG_get_info( hwnd, TRUE ); + DIALOGINFO *dlgInfo = wow_handlers32.get_dialog_info( hwnd, TRUE ); DLG_CONTROL_INFO info; HWND hwndCtrl, hwndDefButton = 0; INT items = dlgTemplate->nbItems; @@ -441,7 +441,7 @@ static HWND DIALOG_CreateIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate, if (modal && (flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner); return 0; } - dlgInfo = DIALOG_get_info( hwnd, TRUE ); + dlgInfo = wow_handlers32.get_dialog_info( hwnd, TRUE ); dlgInfo->hwndFocus = 0; dlgInfo->hUserFont = hUserFont; dlgInfo->hMenu = HMENU_32( hMenu ); @@ -745,7 +745,7 @@ INT16 WINAPI DialogBoxParam16( HINSTANCE16 hInst, LPCSTR template, { HWND owner = WIN_Handle32(owner16); hwnd = DIALOG_CreateIndirect16( hInst, data, owner, dlgProc, param, TRUE ); - if (hwnd) ret = DIALOG_DoDialogBox( hwnd, owner ); + if (hwnd) ret = wow_handlers32.dialog_box_loop( hwnd, owner ); GlobalUnlock16( hmem ); } FreeResource16( hmem ); @@ -765,7 +765,7 @@ INT16 WINAPI DialogBoxIndirectParam16( HINSTANCE16 hInst, HANDLE16 dlgTemplate, if (!(ptr = GlobalLock16( dlgTemplate ))) return -1; hwnd = DIALOG_CreateIndirect16( hInst, ptr, owner, dlgProc, param, TRUE ); GlobalUnlock16( dlgTemplate ); - if (hwnd) return DIALOG_DoDialogBox( hwnd, owner ); + if (hwnd) return wow_handlers32.dialog_box_loop( hwnd, owner ); return -1; } diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c index 1d96738..aef453d 100644 --- a/dlls/user32/msg16.c +++ b/dlls/user32/msg16.c @@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msg); DWORD USER16_AlertableWait = 0; -static struct wow_handlers32 wow_handlers32; +struct wow_handlers32 wow_handlers32; static LRESULT cwp_hook_callback( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, LRESULT *result, void *arg ) diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 354efe0..c38c087 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -1160,15 +1160,17 @@ static int free_icon_handle( HICON handle ) */ void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new, struct wow_handlers32 *orig ) { - orig->button_proc = ButtonWndProc_common; - orig->combo_proc = ComboWndProc_common; - orig->edit_proc = EditWndProc_common; - orig->listbox_proc = ListBoxWndProc_common; - orig->mdiclient_proc = MDIClientWndProc_common; - orig->scrollbar_proc = ScrollBarWndProc_common; - orig->static_proc = StaticWndProc_common; - orig->create_window = WIN_CreateWindowEx; - orig->alloc_winproc = WINPROC_AllocProc; + orig->button_proc = ButtonWndProc_common; + orig->combo_proc = ComboWndProc_common; + orig->edit_proc = EditWndProc_common; + orig->listbox_proc = ListBoxWndProc_common; + orig->mdiclient_proc = MDIClientWndProc_common; + orig->scrollbar_proc = ScrollBarWndProc_common; + orig->static_proc = StaticWndProc_common; + orig->create_window = WIN_CreateWindowEx; + orig->alloc_winproc = WINPROC_AllocProc; + orig->get_dialog_info = DIALOG_get_info; + orig->dialog_box_loop = DIALOG_DoDialogBox; wow_handlers = *new; } diff --git a/dlls/user32/wnd16.c b/dlls/user32/wnd16.c index b4741ff..9509bd0 100644 --- a/dlls/user32/wnd16.c +++ b/dlls/user32/wnd16.c @@ -848,7 +848,8 @@ LONG WINAPI GetWindowLong16( HWND16 hwnd16, INT16 offset ) return 0; } } - else if (offset == DWLP_DLGPROC) is_winproc = (DIALOG_get_info( hwnd, FALSE ) != NULL); + else if (offset == DWLP_DLGPROC) + is_winproc = (wow_handlers32.get_dialog_info( hwnd, FALSE ) != NULL); } retvalue = GetWindowLongA( hwnd, offset ); if (is_winproc) retvalue = (LONG_PTR)WINPROC_GetProc16( (WNDPROC)retvalue, FALSE ); @@ -864,7 +865,8 @@ LONG WINAPI SetWindowLong16( HWND16 hwnd16, INT16 offset, LONG newval ) HWND hwnd = WIN_Handle32( hwnd16 ); BOOL is_winproc = (offset == GWLP_WNDPROC); - if (offset == DWLP_DLGPROC) is_winproc = (DIALOG_get_info( hwnd, FALSE ) != NULL); + if (offset == DWLP_DLGPROC) + is_winproc = (wow_handlers32.get_dialog_info( hwnd, FALSE ) != NULL); if (is_winproc) {
1
0
0
0
Alexandre Julliard : user32: Duplicate DIALOG_Enable/ DisableOwner implementation on the 16-bit side.
by Alexandre Julliard
24 Dec '09
24 Dec '09
Module: wine Branch: master Commit: 7f11441af9ed6b6bfba188a333e10775f6c63fc6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f11441af9ed6b6bfba188a33…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 22 17:46:25 2009 +0100 user32: Duplicate DIALOG_Enable/DisableOwner implementation on the 16-bit side. --- dlls/user32/controls.h | 2 -- dlls/user32/dialog.c | 4 ++-- dlls/user32/dialog16.c | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index 8d1869e..279dc4c 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -240,8 +240,6 @@ typedef struct tagDIALOGINFO #define DF_OWNERENABLED 0x0002 extern DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create ) DECLSPEC_HIDDEN; -extern void DIALOG_EnableOwner( HWND hOwner ) DECLSPEC_HIDDEN; -extern BOOL DIALOG_DisableOwner( HWND hOwner ) DECLSPEC_HIDDEN; extern INT DIALOG_DoDialogBox( HWND hwnd, HWND owner ) DECLSPEC_HIDDEN; #endif /* __WINE_CONTROLS_H */ diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index f0d194d..bce2684 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -109,7 +109,7 @@ const struct builtin_class_descr DIALOG_builtin_class = * Helper function for modal dialogs to enable again the * owner of the dialog box. */ -void DIALOG_EnableOwner( HWND hOwner ) +static void DIALOG_EnableOwner( HWND hOwner ) { /* Owner must be a top-level window */ if (hOwner) @@ -125,7 +125,7 @@ void DIALOG_EnableOwner( HWND hOwner ) * Helper function for modal dialogs to disable the * owner of the dialog box. Returns TRUE if owner was enabled. */ -BOOL DIALOG_DisableOwner( HWND hOwner ) +static BOOL DIALOG_DisableOwner( HWND hOwner ) { /* Owner must be a top-level window */ if (hOwner) diff --git a/dlls/user32/dialog16.c b/dlls/user32/dialog16.c index fc6ad1e..95f009f 100644 --- a/dlls/user32/dialog16.c +++ b/dlls/user32/dialog16.c @@ -66,6 +66,44 @@ typedef struct /*********************************************************************** + * DIALOG_EnableOwner + * + * Helper function for modal dialogs to enable again the + * owner of the dialog box. + */ +static void DIALOG_EnableOwner( HWND hOwner ) +{ + /* Owner must be a top-level window */ + if (hOwner) + hOwner = GetAncestor( hOwner, GA_ROOT ); + if (!hOwner) return; + EnableWindow( hOwner, TRUE ); +} + + +/*********************************************************************** + * DIALOG_DisableOwner + * + * Helper function for modal dialogs to disable the + * owner of the dialog box. Returns TRUE if owner was enabled. + */ +static BOOL DIALOG_DisableOwner( HWND hOwner ) +{ + /* Owner must be a top-level window */ + if (hOwner) + hOwner = GetAncestor( hOwner, GA_ROOT ); + if (!hOwner) return FALSE; + if (IsWindowEnabled( hOwner )) + { + EnableWindow( hOwner, FALSE ); + return TRUE; + } + else + return FALSE; +} + + +/*********************************************************************** * DIALOG_GetControl16 * * Return the class and text of the control pointed to by ptr,
1
0
0
0
Paul Vriens : imagehlp/tests: Fix a test failure on Win95.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: 780ae3a6e428b14fb26c2393f6ed4127b092d66e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=780ae3a6e428b14fb26c2393f…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Wed Dec 23 13:46:43 2009 +0100 imagehlp/tests: Fix a test failure on Win95. --- dlls/imagehlp/tests/integrity.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/imagehlp/tests/integrity.c b/dlls/imagehlp/tests/integrity.c index a551d1f..6f297dc 100644 --- a/dlls/imagehlp/tests/integrity.c +++ b/dlls/imagehlp/tests/integrity.c @@ -250,6 +250,15 @@ START_TEST(integrity) } file_size_orig = get_file_size(); + /* + * Align file_size_orig to an 8-byte boundary. This avoids tests failures where + * the original dll is not correctly aligned (but when written to it will be). + */ + if (file_size_orig % 8 != 0) + { + skip("We need to align to an 8-byte boundary\n"); + file_size_orig = (file_size_orig + 7) & ~7; + } pImageAddCertificate = (void *) GetProcAddress(hImageHlp, "ImageAddCertificate"); pImageEnumerateCertificates = (void *) GetProcAddress(hImageHlp, "ImageEnumerateCertificates");
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
124
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200