winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2019
----- 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
1097 discussions
Start a n
N
ew thread
Zhiyi Zhang : riched20: Fix a use after free.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: ceea7138b4d1cec4006e09fc16f43157b144baa3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ceea7138b4d1cec4006e09fc…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Jan 2 00:03:29 2019 +0800 riched20: Fix a use after free. In ME_DestroyEditor(), the item list is being freed when calling get_total_width() in destroy_para(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46328
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 62d80cff6917d6809614885f833358baeb310f20) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/riched20/editor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index daafe80..617a618 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3126,13 +3126,13 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) void ME_DestroyEditor(ME_TextEditor *editor) { - ME_DisplayItem *pFirst = editor->pBuffer->pFirst; - ME_DisplayItem *p = pFirst, *pNext = NULL; + ME_DisplayItem *p = editor->pBuffer->pFirst, *pNext = NULL; ME_Style *s, *cursor2; int i; ME_ClearTempStyle(editor); ME_EmptyUndoStack(editor); + editor->pBuffer->pFirst = NULL; while(p) { pNext = p->next; ME_DestroyDisplayItem(p);
1
0
0
0
Alexandre Julliard : ntdll: Also store FPU registers in RtlRaiseException( ).
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 0dbeb9c8e94421381ae369e8f01facf0d88eefe7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0dbeb9c8e94421381ae369e8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jan 2 17:24:48 2019 +0100 ntdll: Also store FPU registers in RtlRaiseException(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=44485
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit dc80a0032927421d61b95659af570c21439e4a76) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/ntdll/signal_i386.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index b411749..d3470e0 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -2791,6 +2791,19 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL } +/******************************************************************* + * raise_exception_full_context + * + * Raise an exception with the full CPU context. + */ +void raise_exception_full_context( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance ) +{ + save_fpu( context ); + /* FIXME: extended registers, debug registers */ + RtlRaiseStatus( NtRaiseException( rec, context, first_chance )); +} + + /*********************************************************************** * RtlRaiseException (NTDLL.@) */ @@ -2812,9 +2825,7 @@ __ASM_STDCALL_FUNC( RtlRaiseException, 4, "pushl $1\n\t" "pushl %eax\n\t" "pushl %ecx\n\t" - "call " __ASM_NAME("NtRaiseException") __ASM_STDCALL(12) "\n\t" - "pushl %eax\n\t" - "call " __ASM_NAME("RtlRaiseStatus") __ASM_STDCALL(4) "\n\t" + "call " __ASM_NAME("raise_exception_full_context") "\n\t" "leave\n\t" __ASM_CFI(".cfi_def_cfa %esp,4\n\t") __ASM_CFI(".cfi_same_value %ebp\n\t")
1
0
0
0
Alexandre Julliard : commdlg: Add support for 16-bit file dialog hooks.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: ab37df3c3f2093a54b77bffc7111e05d76ceeac5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ab37df3c3f2093a54b77bffc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 13 13:39:39 2018 +0100 commdlg: Add support for 16-bit file dialog hooks. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 59df6651b88456b38ac816de0a07a544aae346e8) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/commdlg.dll16/filedlg.c | 408 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 404 insertions(+), 4 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=ab37df3c3f2093a54b77…
1
0
0
0
Alexandre Julliard : commdlg: Implement custom template support in 16-bit file dialogs.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 7b4be95809569d0b41880ec08bc91432cc6ad3ca URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7b4be95809569d0b41880ec0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 19 11:24:00 2018 +0100 commdlg: Implement custom template support in 16-bit file dialogs. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 0e9cb103400c58480778894cb0e4a3d2dec9a3b4) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/commdlg.dll16/filedlg.c | 136 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 134 insertions(+), 2 deletions(-) diff --git a/dlls/commdlg.dll16/filedlg.c b/dlls/commdlg.dll16/filedlg.c index 7e2fda7..1238dc9 100644 --- a/dlls/commdlg.dll16/filedlg.c +++ b/dlls/commdlg.dll16/filedlg.c @@ -18,18 +18,120 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#include <assert.h> #include <stdarg.h> #include "windef.h" #include "winbase.h" #include "wine/winbase16.h" #include "wingdi.h" #include "winuser.h" +#include "winternl.h" #include "commdlg.h" #include "cdlg16.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(commdlg); + +static inline WORD get_word( const char **ptr ) +{ + WORD ret = *(WORD *)*ptr; + *ptr += sizeof(WORD); + return ret; +} + +static inline void copy_string( WORD **out, const char **in, DWORD maxlen ) +{ + DWORD len = MultiByteToWideChar( CP_ACP, 0, *in, -1, *out, maxlen ); + *in += strlen(*in) + 1; + *out += len; +} + +static inline void copy_dword( WORD **out, const char **in ) +{ + *(DWORD *)*out = *(DWORD *)*in; + *in += sizeof(DWORD); + *out += sizeof(DWORD) / sizeof(WORD); +} + +static LPDLGTEMPLATEA convert_dialog( const char *p, DWORD size ) +{ + LPDLGTEMPLATEA dlg; + WORD len, count, *out, *end; + + if (!(dlg = HeapAlloc( GetProcessHeap(), 0, size * 2 ))) return NULL; + out = (WORD *)dlg; + end = out + size; + copy_dword( &out, &p ); /* style */ + *out++ = 0; *out++ = 0; /* exstyle */ + *out++ = count = (BYTE)*p++; /* count */ + *out++ = get_word( &p ); /* x */ + *out++ = get_word( &p ); /* y */ + *out++ = get_word( &p ); /* cx */ + *out++ = get_word( &p ); /* cy */ + + if ((BYTE)*p == 0xff) /* menu */ + { + p++; + *out++ = 0xffff; + *out++ = get_word( &p ); + } + else copy_string( &out, &p, end - out ); + + copy_string( &out, &p, end - out ); /* class */ + copy_string( &out, &p, end - out ); /* caption */ + + if (dlg->style & DS_SETFONT) + { + *out++ = get_word( &p ); /* point size */ + copy_string( &out, &p, end - out ); /* face name */ + } + + /* controls */ + while (count--) + { + WORD x = get_word( &p ); + WORD y = get_word( &p ); + WORD cx = get_word( &p ); + WORD cy = get_word( &p ); + WORD id = get_word( &p ); + + out = (WORD *)(((UINT_PTR)out + 3) & ~3); + + copy_dword( &out, &p ); /* style */ + *out++ = 0; *out++ = 0; /* exstyle */ + *out++ = x; + *out++ = y; + *out++ = cx; + *out++ = cy; + *out++ = id; + + if (*p & 0x80) /* class */ + { + *out++ = 0xffff; + *out++ = (BYTE)*p++; + } + else copy_string( &out, &p, end - out ); + + if (*p & 0x80) /* window */ + { + *out++ = 0xffff; + *out++ = get_word( &p ); + } + else copy_string( &out, &p, end - out ); + + len = (BYTE)*p++; /* data */ + *out++ = (len + 1) & ~1; + memcpy( out, p, len ); + p += len; + out += (len + 1) / sizeof(WORD); + } + + assert( out <= end ); + return dlg; +} + static UINT_PTR CALLBACK dummy_hook( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) { return FALSE; @@ -68,6 +170,7 @@ BOOL16 CALLBACK FileSaveDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam, L BOOL16 WINAPI GetOpenFileName16( SEGPTR ofn ) /* [in/out] address of structure with data*/ { LPOPENFILENAME16 lpofn = MapSL(ofn); + LPDLGTEMPLATEA template = NULL; OPENFILENAMEA ofn32; BOOL ret; @@ -93,7 +196,20 @@ BOOL16 WINAPI GetOpenFileName16( SEGPTR ofn ) /* [in/out] address of structure w ofn32.lpfnHook = dummy_hook; /* this is to force old 3.1 dialog style */ if (lpofn->Flags & OFN_ENABLETEMPLATE) - FIXME( "custom templates no longer supported, using default\n" ); + { + HRSRC16 res = FindResource16( lpofn->hInstance, MapSL(lpofn->lpTemplateName), (LPCSTR)RT_DIALOG ); + HGLOBAL16 handle = LoadResource16( lpofn->hInstance, res ); + DWORD size = SizeofResource16( lpofn->hInstance, res ); + void *ptr = LockResource16( handle ); + + if (ptr && (template = convert_dialog( ptr, size ))) + { + ofn32.hInstance = (HINSTANCE)template; + ofn32.Flags |= OFN_ENABLETEMPLATEHANDLE; + } + FreeResource16( handle ); + } + if (lpofn->Flags & OFN_ENABLEHOOK) FIXME( "custom hook %p no longer supported\n", lpofn->lpfnHook ); @@ -103,6 +219,7 @@ BOOL16 WINAPI GetOpenFileName16( SEGPTR ofn ) /* [in/out] address of structure w lpofn->nFileOffset = ofn32.nFileOffset; lpofn->nFileExtension = ofn32.nFileExtension; } + HeapFree( GetProcessHeap(), 0, template ); return ret; } @@ -121,6 +238,7 @@ BOOL16 WINAPI GetOpenFileName16( SEGPTR ofn ) /* [in/out] address of structure w BOOL16 WINAPI GetSaveFileName16( SEGPTR ofn ) /* [in/out] address of structure with data*/ { LPOPENFILENAME16 lpofn = MapSL(ofn); + LPDLGTEMPLATEA template = NULL; OPENFILENAMEA ofn32; BOOL ret; @@ -146,7 +264,20 @@ BOOL16 WINAPI GetSaveFileName16( SEGPTR ofn ) /* [in/out] address of structure w ofn32.lpfnHook = dummy_hook; /* this is to force old 3.1 dialog style */ if (lpofn->Flags & OFN_ENABLETEMPLATE) - FIXME( "custom templates no longer supported, using default\n" ); + { + HRSRC16 res = FindResource16( lpofn->hInstance, MapSL(lpofn->lpTemplateName), (LPCSTR)RT_DIALOG ); + HGLOBAL16 handle = LoadResource16( lpofn->hInstance, res ); + DWORD size = SizeofResource16( lpofn->hInstance, res ); + void *ptr = LockResource16( handle ); + + if (ptr && (template = convert_dialog( ptr, size ))) + { + ofn32.hInstance = (HINSTANCE)template; + ofn32.Flags |= OFN_ENABLETEMPLATEHANDLE; + } + FreeResource16( handle ); + } + if (lpofn->Flags & OFN_ENABLEHOOK) FIXME( "custom hook %p no longer supported\n", lpofn->lpfnHook ); @@ -156,6 +287,7 @@ BOOL16 WINAPI GetSaveFileName16( SEGPTR ofn ) /* [in/out] address of structure w lpofn->nFileOffset = ofn32.nFileOffset; lpofn->nFileExtension = ofn32.nFileExtension; } + HeapFree( GetProcessHeap(), 0, template ); return ret; }
1
0
0
0
Alexandre Julliard : server: Reset hardware breakpoint sizes before setting them.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 5ac340358ab9a1a89ec23595c270207aefc7e2c3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5ac340358ab9a1a89ec23595…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 18 17:18:09 2018 +0100 server: Reset hardware breakpoint sizes before setting them. Workaround for kernel bug 200965. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 53375be47c07c1aec7f97abaaea177b318f04e08) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- server/ptrace.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/ptrace.c b/server/ptrace.c index 808328e..6be1591 100644 --- a/server/ptrace.c +++ b/server/ptrace.c @@ -628,6 +628,9 @@ void set_thread_context( struct thread *thread, const context_t *context, unsign if (!suspend_for_ptrace( thread )) return; + /* force all breakpoint lengths to 1, workaround for kernel bug 200965 */ + ptrace( PTRACE_POKEUSER, pid, DR_OFFSET(7), 0x11110055 ); + switch (context->cpu) { case CPU_x86:
1
0
0
0
Frédéric Fauberteau : wineserver: Support debug registers on NetBSD.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 7e5541cb4776fea1b0e33f8262bf881821eab178 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7e5541cb4776fea1b0e33f82…
Author: Frédéric Fauberteau <triaxx(a)NetBSD.org> Date: Tue Dec 4 12:54:43 2018 +0100 wineserver: Support debug registers on NetBSD. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46229
Signed-off-by: Frédéric Fauberteau <triaxx(a)NetBSD.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 708a2c991f8efab99663adaa2bbb963b9dff4f17) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- server/ptrace.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/server/ptrace.c b/server/ptrace.c index 4eda8eb..808328e 100644 --- a/server/ptrace.c +++ b/server/ptrace.c @@ -720,6 +720,13 @@ void get_thread_context( struct thread *thread, context_t *context, unsigned int context->debug.i386_regs.dr3 = DBREG_DRX((&dbregs), 3); context->debug.i386_regs.dr6 = DBREG_DRX((&dbregs), 6); context->debug.i386_regs.dr7 = DBREG_DRX((&dbregs), 7); +#elif defined(__NetBSD__) + context->debug.i386_regs.dr0 = dbregs.dr[0]; + context->debug.i386_regs.dr1 = dbregs.dr[1]; + context->debug.i386_regs.dr2 = dbregs.dr[2]; + context->debug.i386_regs.dr3 = dbregs.dr[3]; + context->debug.i386_regs.dr6 = dbregs.dr[6]; + context->debug.i386_regs.dr7 = dbregs.dr[7]; #else context->debug.i386_regs.dr0 = dbregs.dr0; context->debug.i386_regs.dr1 = dbregs.dr1; @@ -754,6 +761,15 @@ void set_thread_context( struct thread *thread, const context_t *context, unsign DBREG_DRX((&dbregs), 5) = 0; DBREG_DRX((&dbregs), 6) = context->debug.i386_regs.dr6; DBREG_DRX((&dbregs), 7) = context->debug.i386_regs.dr7; +#elif defined(__NetBSD__) + dbregs.dr[0] = context->debug.i386_regs.dr0; + dbregs.dr[1] = context->debug.i386_regs.dr1; + dbregs.dr[2] = context->debug.i386_regs.dr2; + dbregs.dr[3] = context->debug.i386_regs.dr3; + dbregs.dr[4] = 0; + dbregs.dr[5] = 0; + dbregs.dr[6] = context->debug.i386_regs.dr6; + dbregs.dr[7] = context->debug.i386_regs.dr7; #else dbregs.dr0 = context->debug.i386_regs.dr0; dbregs.dr1 = context->debug.i386_regs.dr1;
1
0
0
0
Dmitry Timoshkov : user32: Add support for navigating a group of radio buttons using a keyboard.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: d771676872f23a0f26cdd0d27d3de2a52a3467e4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d771676872f23a0f26cdd0d2…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Nov 27 09:11:17 2018 +0300 user32: Add support for navigating a group of radio buttons using a keyboard. The patch approximates the behaviour observed in the message tests but still doesn't make the message tests pass without failures. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit b1b8fb77be5dd9a8754b04b2ef9f703bbe393d59) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/dialog.c | 12 ++++++++++-- dlls/user32/tests/msg.c | 7 ------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index ff1cc95..f6d4a86 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -1239,8 +1239,16 @@ BOOL WINAPI IsDialogMessageW( HWND hwndDlg, LPMSG msg ) if (!(dlgCode & DLGC_WANTARROWS)) { BOOL fPrevious = (msg->wParam == VK_LEFT || msg->wParam == VK_UP); - HWND hwndNext = GetNextDlgGroupItem (hwndDlg, GetFocus(), fPrevious ); - SendMessageW( hwndDlg, WM_NEXTDLGCTL, (WPARAM)hwndNext, 1 ); + HWND hwndNext = GetNextDlgGroupItem( hwndDlg, msg->hwnd, fPrevious ); + if (hwndNext && SendMessageW( hwndNext, WM_GETDLGCODE, msg->wParam, (LPARAM)msg ) == (DLGC_BUTTON | DLGC_RADIOBUTTON)) + { + SetFocus( hwndNext ); + if ((GetWindowLongW( hwndNext, GWL_STYLE ) & BS_TYPEMASK) == BS_AUTORADIOBUTTON && + SendMessageW( hwndNext, BM_GETCHECK, 0, 0 ) != BST_CHECKED) + SendMessageW( hwndNext, BM_CLICK, 1, 0 ); + } + else + SendMessageW( hwndDlg, WM_NEXTDLGCTL, (WPARAM)hwndNext, 1 ); return TRUE; } break; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 1dfc3d5..c28085c 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -6987,11 +6987,9 @@ if (0) /* actual message sequence is different on every run in some Windows setu while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); ok_sequence(auto_radio_button_VK_DOWN_dialog, "IsDialogMessage(VK_DOWN)", TRUE); -todo_wine test_radio(radio1, 1, radio2, 0, radio3, 0); hwnd = GetFocus(); -todo_wine ok(hwnd == radio1, "focus should be on radio1, not on %p\n", hwnd); GetWindowRect(radio1, &rc); @@ -7006,11 +7004,9 @@ todo_wine while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); ok_sequence(auto_radio_button_VK_DOWN_radio3, "down to radio3", TRUE); -todo_wine test_radio(radio1, 1, radio2, 0, radio3, 0); hwnd = GetFocus(); -todo_wine ok(hwnd == radio1, "focus should be on radio1, not on %p\n", hwnd); flush_events(); @@ -7027,11 +7023,9 @@ todo_wine while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); ok_sequence(auto_radio_button_VK_UP_radio1, "up to radio1", TRUE); -todo_wine test_radio(radio1, 1, radio2, 0, radio3, 0); hwnd = GetFocus(); -todo_wine ok(hwnd == radio1, "focus should be on radio1, not on %p\n", hwnd); flush_events(); @@ -7049,7 +7043,6 @@ todo_wine if (0) /* actual message sequence is different on every run in some Windows setups */ ok_sequence(auto_radio_button_VK_UP_dialog, "IsDialogMessage(VK_UP) #3", FALSE); /* what really matters is that nothing has changed */ -todo_wine test_radio(radio1, 1, radio2, 0, radio3, 0); log_all_parent_messages--;
1
0
0
0
Dmitry Timoshkov : user32/tests: Add a test for navigating a group of buttons using keyboard events.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 95d7597f117b507a5125ac814383ef43676d2cc2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=95d7597f117b507a5125ac81…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Nov 27 09:11:13 2018 +0300 user32/tests: Add a test for navigating a group of buttons using keyboard events. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit bf55f167b9c9714dcb03e90cc4cea3093e15ceb7) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/tests/msg.c | 316 ++++++++++++++++++++++++++++++++++++++++++ dlls/user32/tests/resource.rc | 11 ++ 2 files changed, 327 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=95d7597f117b507a5125…
1
0
0
0
Dmitry Timoshkov : user32/tests: Simplify the test for BM_CLICK on autoradio button by using a dialog.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: c441573625bb0b8b42896492d8a773ddc4dca609 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c441573625bb0b8b42896492…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Nov 27 09:11:04 2018 +0300 user32/tests: Simplify the test for BM_CLICK on autoradio button by using a dialog. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit d57fcb41135f8686f343c3b02da81cb9e44fd670) Conflicts: dlls/user32/tests/msg.c Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/tests/msg.c | 143 ++++++++++++++++++++++++++++++++++++++++++ dlls/user32/tests/resource.rc | 11 ++++ 2 files changed, 154 insertions(+) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index eb5d4c4..b2c953e 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -123,6 +123,8 @@ static DWORD cbt_hook_thread_id; static const WCHAR testWindowClassW[] = { 'T','e','s','t','W','i','n','d','o','w','C','l','a','s','s','W',0 }; +static LRESULT WINAPI ParentMsgCheckProcA(HWND, UINT, WPARAM, LPARAM); + /* FIXME: add tests for these Window Edge Styles (Win31/Win95/98 look), in order of precedence: @@ -6231,7 +6233,24 @@ static LRESULT CALLBACK button_hook_proc(HWND hwnd, UINT message, WPARAM wParam, case BM_SETSTATE: if (GetCapture()) ok(GetCapture() == hwnd, "GetCapture() = %p\n", GetCapture()); + + lParam = (ULONG_PTR)GetMenu(hwnd); + goto log_it; + + case WM_GETDLGCODE: + if (lParam) + { + MSG *msg = (MSG *)lParam; + lParam = MAKELPARAM(msg->message, msg->wParam); + } + wParam = (ULONG_PTR)GetMenu(hwnd); + goto log_it; + + case BM_SETCHECK: + case BM_GETCHECK: + lParam = (ULONG_PTR)GetMenu(hwnd); /* fall through */ +log_it: default: msg.hwnd = hwnd; msg.message = message; @@ -6600,6 +6619,129 @@ static void test_button_messages(void) DestroyWindow(parent); } +#define ID_RADIO1 501 +#define ID_RADIO2 502 +#define ID_RADIO3 503 +#define ID_TEXT 504 + +static const struct message auto_radio_button_BM_CLICK[] = +{ + { BM_CLICK, sent|wparam|lparam, 0, 0 }, + { WM_LBUTTONDOWN, sent|wparam|lparam|defwinproc, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, + { BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_CHECKED, ID_RADIO2 }, + { WM_CTLCOLORSTATIC, sent|parent }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_LBUTTONUP, sent|wparam|lparam|defwinproc, 0, 0 }, + { BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_UNCHECKED, ID_RADIO2 }, + { WM_CTLCOLORSTATIC, sent|parent }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_RADIO2, 0 }, + { BM_SETCHECK, sent|wparam|lparam|defwinproc, BST_CHECKED, ID_RADIO2 }, + { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_RADIO1, 0 }, + { BM_SETCHECK, sent|wparam|lparam|defwinproc, 0, ID_RADIO1 }, + { WM_CTLCOLORSTATIC, sent|parent }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_RADIO3, 0 }, + { BM_SETCHECK, sent|wparam|lparam|defwinproc, 0, ID_RADIO3 }, + { WM_CTLCOLORSTATIC, sent|parent }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_TEXT, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, + { WM_CAPTURECHANGED, sent|wparam|lparam|defwinproc, 0, 0 }, + { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO2, BN_CLICKED) }, + { WM_NCHITTEST, sent|optional, 0, 0 }, /* FIXME: Wine doesn't send it */ + { WM_SETCURSOR, sent|optional, 0, 0 }, /* FIXME: Wine doesn't send it */ + { WM_MOUSEMOVE, sent|optional, 0, 0 }, /* FIXME: Wine doesn't send it */ + { 0 } +}; + +static INT_PTR WINAPI radio_test_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) +{ + ParentMsgCheckProcA(hwnd, msg, wp, lp); + return 1; +} + +static void test_autoradio_BM_CLICK(void) +{ + HWND parent, radio1, radio2, radio3; + RECT rc; + MSG msg; + DWORD ret; + + subclass_button(); + + parent = CreateDialogParamA(0, "AUTORADIO_TEST_DIALOG_1", 0, radio_test_dlg_proc, 0); + ok(parent != 0, "failed to create parent window\n"); + + radio1 = GetDlgItem(parent, ID_RADIO1); + radio2 = GetDlgItem(parent, ID_RADIO2); + radio3 = GetDlgItem(parent, ID_RADIO3); + + /* this avoids focus messages in the generated sequence */ + SetFocus(radio2); + + flush_events(); + flush_sequence(); + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + + SendMessageA(radio1, BM_SETCHECK, BST_CHECKED, 0); + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + + SendMessageA(radio2, BM_SETCHECK, BST_CHECKED, 0); + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + + SendMessageA(radio3, BM_SETCHECK, BST_CHECKED, 0); + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + + GetWindowRect(radio2, &rc); + SetCursorPos(rc.left+1, rc.top+1); + + flush_events(); + flush_sequence(); + + log_all_parent_messages++; + + SendMessageA(radio2, BM_CLICK, 0, 0); + while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); + ok_sequence(auto_radio_button_BM_CLICK, "BM_CLICK on auto-radio button", FALSE); + + log_all_parent_messages--; + + ret = SendMessageA(radio1, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + ret = SendMessageA(radio2, BM_GETCHECK, 0, 0); + ok(ret == BST_CHECKED, "got %08x\n", ret); + ret = SendMessageA(radio3, BM_GETCHECK, 0, 0); + ok(ret == BST_UNCHECKED, "got %08x\n", ret); + + DestroyWindow(parent); +} + /****************** static message test *************************/ static const struct message WmSetFontStaticSeq2[] = { @@ -16924,6 +17066,7 @@ START_TEST(msg) invisible_parent_tests(); test_mdi_messages(); test_button_messages(); + test_autoradio_BM_CLICK(); test_static_messages(); test_listbox_messages(); test_combobox_messages(); diff --git a/dlls/user32/tests/resource.rc b/dlls/user32/tests/resource.rc index a9e45e9..1557291 100644 --- a/dlls/user32/tests/resource.rc +++ b/dlls/user32/tests/resource.rc @@ -75,6 +75,17 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL,109,20,50,14, WS_TABSTOP | WS_GROUP } +AUTORADIO_TEST_DIALOG_1 DIALOGEX 0, 0, 200, 200 +STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | WS_VISIBLE +CAPTION "Radio Button Test Dialog" +FONT 8, "MS Shell Dlg" +{ + CONTROL "Radio1",501,"my_button_class",WS_VISIBLE | WS_CHILD | WS_GROUP | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,10,70,18 + CONTROL "Radio3",503,"my_button_class",WS_VISIBLE | WS_CHILD | BS_RADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,35,70,18 + CONTROL "Text",504,"my_button_class",WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON | BS_NOTIFY | WS_TABSTOP,10,60,70,18 + CONTROL "Radio2",502,"my_button_class",WS_VISIBLE | WS_CHILD | BS_AUTORADIOBUTTON | BS_NOTIFY | WS_TABSTOP,10,85,70,18 +} + CLASS_TEST_DIALOG DIALOG 0, 0, 91, 28 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "CreateDialogParams Test"
1
0
0
0
Dmitry Timoshkov : user32: Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler.
by Alexandre Julliard
03 Mar '19
03 Mar '19
Module: wine Branch: oldstable Commit: 006186743f7d8420d73f6deda24741bed9fa7a40 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=006186743f7d8420d73f6ded…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Sun Nov 25 20:58:00 2018 +0300 user32: Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler. This patch also changes the logic to get the control style with WM_GETDLGCODE instead of GetWindowLong to make the message test pass. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 96d0af52eb0d14084397647b974c5efebb59d0f0) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/user32/button.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index e5cee12..2082295 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -334,7 +334,7 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, SendMessageW( hWnd, BM_SETCHECK, !(state & BST_CHECKED), 0 ); break; case BS_AUTORADIOBUTTON: - SendMessageW( hWnd, BM_SETCHECK, TRUE, 0 ); + BUTTON_CheckAutoRadioButton( hWnd ); break; case BS_AUTO3STATE: SendMessageW( hWnd, BM_SETCHECK, @@ -500,8 +500,6 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, set_button_state( hWnd, (state & ~3) | wParam ); paint_button( hWnd, btn_type, ODA_SELECT ); } - if ((btn_type == BS_AUTORADIOBUTTON) && (wParam == BST_CHECKED) && (style & WS_CHILD)) - BUTTON_CheckAutoRadioButton( hWnd ); break; case BM_GETSTATE: @@ -986,13 +984,12 @@ static void BUTTON_CheckAutoRadioButton( HWND hwnd ) parent = GetParent(hwnd); /* make sure that starting control is not disabled or invisible */ - start = sibling = GetNextDlgGroupItem( parent, hwnd, TRUE ); + start = sibling = hwnd; do { if (!sibling) break; - if ((hwnd != sibling) && - ((GetWindowLongW( sibling, GWL_STYLE) & BS_TYPEMASK) == BS_AUTORADIOBUTTON)) - SendMessageW( sibling, BM_SETCHECK, BST_UNCHECKED, 0 ); + if (SendMessageW( sibling, WM_GETDLGCODE, 0, 0 ) == (DLGC_BUTTON | DLGC_RADIOBUTTON)) + SendMessageW( sibling, BM_SETCHECK, sibling == hwnd ? BST_CHECKED : BST_UNCHECKED, 0 ); sibling = GetNextDlgGroupItem( parent, sibling, FALSE ); } while (sibling != start); }
1
0
0
0
← Newer
1
...
93
94
95
96
97
98
99
...
110
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
Results per page:
10
25
50
100
200