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
March
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
September 2009
----- 2025 -----
March 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
866 discussions
Start a n
N
ew thread
Eric Pouech : ntdll: Implement basic support for processor power information.
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: 3794c6b9368bc791f98d11680ca3f9da9e89b51c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3794c6b9368bc791f98d11680…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Tue Sep 15 21:38:15 2009 +0200 ntdll: Implement basic support for processor power information. --- dlls/ntdll/nt.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 54cb133..632d966 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -773,7 +773,7 @@ NTSTATUS WINAPI NtSetIntervalProfile( } static SYSTEM_CPU_INFORMATION cached_sci; -static DWORD cpuHz; +static ULONGLONG cpuHz = 1000000000; /* default to a 1GHz */ #define AUTH 0x68747541 /* "Auth" */ #define ENTI 0x69746e65 /* "enti" */ @@ -1798,6 +1798,20 @@ NTSTATUS WINAPI NtPowerInformation( *ExecutionState = ES_USER_PRESENT; return STATUS_SUCCESS; } + case ProcessorInformation: { + PPROCESSOR_POWER_INFORMATION cpu_power = lpOutputBuffer; + + WARN("semi-stub: ProcessorInformation\n"); + if (nOutputBufferSize < sizeof(PROCESSOR_POWER_INFORMATION)) + return STATUS_BUFFER_TOO_SMALL; + cpu_power->Number = NtCurrentTeb()->Peb->NumberOfProcessors; + cpu_power->MaxMhz = cpuHz / 1000000; + cpu_power->CurrentMhz = cpuHz / 1000000; + cpu_power->MhzLimit = cpuHz / 1000000; + cpu_power->MaxIdleState = 0; /* FIXME */ + cpu_power->CurrentIdleState = 0; /* FIXME */ + return STATUS_SUCCESS; + } default: /* FIXME: Needed by .NET Framework */ WARN("Unimplemented NtPowerInformation action: %d\n", InformationLevel);
1
0
0
0
Eric Pouech : ntdll: Reuse kernel32' s cpu info to implement NtQuerySystemInformation(SystemProcessInformation).
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: 57f714f3eb74f8d7a2a93d53803381de5855827b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=57f714f3eb74f8d7a2a93d538…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Tue Sep 15 21:38:07 2009 +0200 ntdll: Reuse kernel32's cpu info to implement NtQuerySystemInformation(SystemProcessInformation). --- dlls/ntdll/nt.c | 511 ++++++++++++++++++++++++++++++++++++++++++++--- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/thread.c | 2 +- 3 files changed, 488 insertions(+), 26 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=57f714f3eb74f8d7a2a93…
1
0
0
0
Eric Pouech : kernel32: Store the process features flag in the KUSER_SHARED_DATA structure.
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: 0bf33d6ac2a397667b2da41b366a5a1896bbb1c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0bf33d6ac2a397667b2da41b3…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Tue Sep 15 21:38:01 2009 +0200 kernel32: Store the process features flag in the KUSER_SHARED_DATA structure. --- dlls/kernel32/cpu.c | 76 +++++++++++++++++++++++++++------------------------ 1 files changed, 40 insertions(+), 36 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0bf33d6ac2a397667b2da…
1
0
0
0
Eric Pouech : ntdll: In SYSTEM_BASIC_INFORMATION, the active processors field refers to the affinity mask.
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: f6ceedf6dd17d2255072bc3bef0b210ccdf11725 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6ceedf6dd17d2255072bc3be…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Tue Sep 15 21:37:55 2009 +0200 ntdll: In SYSTEM_BASIC_INFORMATION, the active processors field refers to the affinity mask. --- dlls/kernel32/cpu.c | 2 +- dlls/ntdll/virtual.c | 2 +- include/winternl.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 6648dc4..800828a 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -382,7 +382,7 @@ VOID WINAPI GetSystemInfo( cachedsi.dwPageSize = sbi.PageSize; cachedsi.lpMinimumApplicationAddress = sbi.LowestUserAddress; cachedsi.lpMaximumApplicationAddress = sbi.HighestUserAddress; - cachedsi.dwNumberOfProcessors = sbi.ActiveProcessors; + cachedsi.dwNumberOfProcessors = sbi.NumberOfProcessors; cachedsi.dwAllocationGranularity = sbi.AllocationGranularity; /* choose sensible defaults ... diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index dc9559e..fe2ef26 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1380,7 +1380,7 @@ void virtual_get_system_info( SYSTEM_BASIC_INFORMATION *info ) info->AllocationGranularity = get_mask(0) + 1; info->LowestUserAddress = (void *)0x10000; info->HighestUserAddress = (char *)user_space_limit - 1; - info->ActiveProcessors = NtCurrentTeb()->Peb->NumberOfProcessors; + info->ActiveProcessorsAffinityMask = (1 << NtCurrentTeb()->Peb->NumberOfProcessors) - 1; info->NumberOfProcessors = NtCurrentTeb()->Peb->NumberOfProcessors; } diff --git a/include/winternl.h b/include/winternl.h index 07c778c..d35adea 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1196,7 +1196,7 @@ typedef struct _SYSTEM_BASIC_INFORMATION { ULONG_PTR AllocationGranularity; PVOID LowestUserAddress; PVOID HighestUserAddress; - ULONG_PTR ActiveProcessors; + ULONG_PTR ActiveProcessorsAffinityMask; BYTE NumberOfProcessors; #else BYTE Reserved1[24];
1
0
0
0
Nikolay Sivov : comctl32/updown: Update buddy on base change.
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: f684bbaef7744baad3a113245b355e8304473975 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f684bbaef7744baad3a113245…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Sep 20 14:05:18 2009 +0400 comctl32/updown: Update buddy on base change. --- dlls/comctl32/tests/updown.c | 2 +- dlls/comctl32/updown.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 6d0e679..104d3c8 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -525,7 +525,7 @@ static void test_updown_base(void) GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); /* FIXME: currently hex output isn't properly formatted, but for this test only change from initial text matters */ - todo_wine ok(lstrcmpA(text, "10") != 0, "Expected '0x000A', got '%s'\n", text); + ok(lstrcmpA(text, "10") != 0, "Expected '0x000A', got '%s'\n", text); DestroyWindow(updown); } diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c index 46a1971..bb78903 100644 --- a/dlls/comctl32/updown.c +++ b/dlls/comctl32/updown.c @@ -1037,9 +1037,13 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L case UDM_SETBASE: TRACE("UpDown Ctrl new base(%ld), hwnd=%p\n", wParam, hwnd); if (wParam==10 || wParam==16) { - WPARAM temp = infoPtr->Base; + WPARAM old_base = infoPtr->Base; infoPtr->Base = wParam; - return temp; + + if (old_base != infoPtr->Base) + UPDOWN_SetBuddyInt(infoPtr); + + return old_base; } break;
1
0
0
0
Nikolay Sivov : comctl32/updown: Additional test for display base.
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: 7ebca40912697d3d41cc039a7f1b735db035b33a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ebca40912697d3d41cc039a7…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Sep 20 13:58:12 2009 +0400 comctl32/updown: Additional test for display base. --- dlls/comctl32/tests/updown.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 5cb5705..6d0e679 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -472,6 +472,7 @@ static void test_updown_base(void) { HWND updown; int r; + CHAR text[10]; updown = create_updown_control(0); @@ -508,6 +509,25 @@ static void test_updown_base(void) ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_base_seq, "test updown base", FALSE); DestroyWindow(updown); + + /* switch base with buddy attached */ + updown = create_updown_control(UDS_SETBUDDYINT); + + r = SendMessage(updown, UDM_SETPOS32, 0, 10); + expect(50, r); + + GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); + ok(lstrcmpA(text, "10") == 0, "Expected '10', got '%s'\n", text); + + r = SendMessage(updown, UDM_SETBASE, 16, 0); + expect(10, r); + + GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); + /* FIXME: currently hex output isn't properly formatted, but for this + test only change from initial text matters */ + todo_wine ok(lstrcmpA(text, "10") != 0, "Expected '0x000A', got '%s'\n", text); + + DestroyWindow(updown); } static void test_updown_unicode(void) @@ -569,6 +589,10 @@ static void test_UDS_SETBUDDYINT(void) CHAR text[10]; BOOL b; + /* cleanup buddy */ + text[0] = '\0'; + SetWindowTextA(edit, text); + /* creating without UDS_SETBUDDYINT */ updown = create_updown_control(0); /* try to set UDS_SETBUDDYINT after creation */
1
0
0
0
Nikolay Sivov : comctl32/updown: Fix control behaviour for UDS_SETBUDDYINT style.
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: 4efa9f5e4323f34deb07b7f5174f509a1809cb11 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4efa9f5e4323f34deb07b7f51…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Sep 20 03:57:09 2009 +0400 comctl32/updown: Fix control behaviour for UDS_SETBUDDYINT style. --- dlls/comctl32/tests/updown.c | 20 +++++++++++++++++--- dlls/comctl32/updown.c | 40 ++++++++++++++++++++++++---------------- 2 files changed, 41 insertions(+), 19 deletions(-) diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 1e1a46e..5cb5705 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -567,6 +567,7 @@ static void test_UDS_SETBUDDYINT(void) HWND updown; DWORD style, ret; CHAR text[10]; + BOOL b; /* creating without UDS_SETBUDDYINT */ updown = create_updown_control(0); @@ -577,24 +578,37 @@ static void test_UDS_SETBUDDYINT(void) ok(style & UDS_SETBUDDYINT, "Expected UDS_SETBUDDY to be set\n"); SendMessage(updown, UDM_SETPOS, 0, 20); GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); - todo_wine ok(lstrlenA(text) == 0, "Expected empty string\n"); + ok(lstrlenA(text) == 0, "Expected empty string\n"); DestroyWindow(updown); /* creating with UDS_SETBUDDYINT */ updown = create_updown_control(UDS_SETBUDDYINT); GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); + /* 50 is initial value here */ ok(lstrcmpA(text, "50") == 0, "Expected '50', got '%s'\n", text); /* now remove style flag */ style = GetWindowLongA(updown, GWL_STYLE); SetWindowLongA(updown, GWL_STYLE, style & ~UDS_SETBUDDYINT); SendMessage(updown, UDM_SETPOS, 0, 20); GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); - todo_wine ok(lstrcmpA(text, "20") == 0, "Expected '20', got '%s'\n", text); + ok(lstrcmpA(text, "20") == 0, "Expected '20', got '%s'\n", text); /* set edit text directly, check position */ strcpy(text, "10"); SetWindowTextA(edit, text); ret = SendMessageA(updown, UDM_GETPOS32, 0, 0); - todo_wine expect(10, ret); + expect(10, ret); + strcpy(text, "11"); + SetWindowTextA(edit, text); + ret = SendMessageA(updown, UDM_GETPOS, 0, 0); + expect(11, LOWORD(ret)); + expect(0, HIWORD(ret)); + /* set to invalid value */ + strcpy(text, "21st"); + SetWindowTextA(edit, text); + b = FALSE; + ret = SendMessageA(updown, UDM_GETPOS32, 0, (LPARAM)&b); + expect(11, ret); + expect(TRUE, b); /* set style back */ style = GetWindowLongA(updown, GWL_STYLE); SetWindowLongA(updown, GWL_STYLE, style | UDS_SETBUDDYINT); diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c index 149de29..46a1971 100644 --- a/dlls/comctl32/updown.c +++ b/dlls/comctl32/updown.c @@ -86,6 +86,7 @@ typedef struct #define FLAG_DECR 0x02 #define FLAG_MOUSEIN 0x04 #define FLAG_PRESSED 0x08 +#define FLAG_BUDDYINT 0x10 /* UDS_SETBUDDYINT was set on creation */ #define FLAG_ARROW (FLAG_INCR | FLAG_DECR) #define BUDDY_TYPE_UNKNOWN 0 @@ -267,7 +268,7 @@ static BOOL UPDOWN_GetBuddyInt (UPDOWN_INFO *infoPtr) WCHAR txt[20], sep, *src, *dst; int newVal; - if (!((infoPtr->dwStyle & UDS_SETBUDDYINT) && IsWindow(infoPtr->Buddy))) + if (!((infoPtr->Flags & FLAG_BUDDYINT) && IsWindow(infoPtr->Buddy))) return FALSE; /*if the buddy is a list window, we must set curr index */ @@ -312,7 +313,7 @@ static BOOL UPDOWN_SetBuddyInt (const UPDOWN_INFO *infoPtr) WCHAR txt[20]; int len; - if (!((infoPtr->dwStyle & UDS_SETBUDDYINT) && IsWindow(infoPtr->Buddy))) + if (!((infoPtr->Flags & FLAG_BUDDYINT) && IsWindow(infoPtr->Buddy))) return FALSE; TRACE("set new value(%d) to buddy.\n", infoPtr->CurVal); @@ -520,20 +521,25 @@ static LRESULT CALLBACK UPDOWN_Buddy_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { WNDPROC superClassWndProc = (WNDPROC)GetPropW(hwnd, BUDDY_SUPERCLASS_WNDPROC); + HWND upDownHwnd = GetPropW(hwnd, BUDDY_UPDOWN_HWND); + UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr(upDownHwnd); TRACE("hwnd=%p, wndProc=%p, uMsg=%04x, wParam=%08lx, lParam=%08lx\n", hwnd, superClassWndProc, uMsg, wParam, lParam); - if (uMsg == WM_KEYDOWN) { - HWND upDownHwnd = GetPropW(hwnd, BUDDY_UPDOWN_HWND); - - UPDOWN_KeyPressed(UPDOWN_GetInfoPtr(upDownHwnd), (int)wParam); + switch(uMsg) + { + case WM_KEYDOWN: + UPDOWN_KeyPressed(infoPtr, (int)wParam); if ((wParam == VK_UP) || (wParam == VK_DOWN)) return 0; - } - else if (uMsg == WM_MOUSEWHEEL) { - HWND upDownHwnd = GetPropW(hwnd, BUDDY_UPDOWN_HWND); + break; + + case WM_MOUSEWHEEL: + UPDOWN_MouseWheel(infoPtr, (int)wParam); + break; - UPDOWN_MouseWheel(UPDOWN_GetInfoPtr(upDownHwnd), (int)wParam); + default: + break; } return CallWindowProcW( superClassWndProc, hwnd, uMsg, wParam, lParam); @@ -586,7 +592,7 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud) infoPtr->BuddyType = BUDDY_TYPE_LISTBOX; } - if(infoPtr->dwStyle & UDS_ARROWKEYS){ + if (infoPtr->dwStyle & UDS_ARROWKEYS) { /* Note that I don't clear the BUDDY_SUPERCLASS_WNDPROC property when we reset the upDown ctrl buddy to another buddy because it is not good to break the window proc chain. */ @@ -865,7 +871,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L infoPtr->MaxVal = 0; infoPtr->Base = 10; /* Default to base 10 */ infoPtr->Buddy = 0; /* No buddy window yet */ - infoPtr->Flags = 0; /* And no flags */ + infoPtr->Flags = (infoPtr->dwStyle & UDS_SETBUDDYINT) ? FLAG_BUDDYINT : 0; SetWindowLongW (hwnd, GWL_STYLE, infoPtr->dwStyle & ~WS_BORDER); @@ -1045,8 +1051,8 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L case UDM_GETPOS: { - int temp = UPDOWN_GetBuddyInt (infoPtr); - return MAKELONG(infoPtr->CurVal, temp ? 0 : 1); + BOOL ret = UPDOWN_GetBuddyInt (infoPtr); + return MAKELONG(infoPtr->CurVal, ret ? 0 : 1); } case UDM_SETPOS: { @@ -1083,9 +1089,11 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L break; case UDM_GETPOS32: - if ((LPBOOL)lParam != NULL) *((LPBOOL)lParam) = TRUE; + { + BOOL ret = UPDOWN_GetBuddyInt (infoPtr); + if ((LPBOOL)lParam) *((LPBOOL)lParam) = !ret; return infoPtr->CurVal; - + } case UDM_SETPOS32: { int temp;
1
0
0
0
Nikolay Sivov : comctl32/updown: Show that UDS_SETBUDDYINT switching doesn' t affect behaviour for already created control.
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: 2f9d29b42bdf3f2b56e4628cf9f04e3647fa439b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f9d29b42bdf3f2b56e4628cf…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Sep 20 02:52:39 2009 +0400 comctl32/updown: Show that UDS_SETBUDDYINT switching doesn't affect behaviour for already created control. --- dlls/comctl32/tests/updown.c | 59 ++++++++++++++++++++++++++++++++++++----- 1 files changed, 51 insertions(+), 8 deletions(-) diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 1747371..1e1a46e 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -293,7 +293,7 @@ static LRESULT WINAPI updown_subclass_proc(HWND hwnd, UINT message, WPARAM wPara return ret; } -static HWND create_updown_control(void) +static HWND create_updown_control(DWORD style) { struct subclass_info *info; HWND updown; @@ -304,7 +304,7 @@ static HWND create_updown_control(void) return NULL; GetClientRect(parent_wnd, &rect); - updown = CreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE | UDS_ALIGNRIGHT, + updown = CreateUpDownControl(WS_CHILD | WS_BORDER | WS_VISIBLE | UDS_ALIGNRIGHT | style, 0, 0, rect.right, rect.bottom, parent_wnd, 1, GetModuleHandleA(NULL), edit, 100, 0, 50); if (!updown) @@ -325,7 +325,7 @@ static void test_updown_pos(void) HWND updown; int r; - updown = create_updown_control(); + updown = create_updown_control(0); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -386,7 +386,7 @@ static void test_updown_pos32(void) int r; int low, high; - updown = create_updown_control(); + updown = create_updown_control(0); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -449,7 +449,7 @@ static void test_updown_buddy(void) { HWND updown, buddyReturn; - updown = create_updown_control(); + updown = create_updown_control(0); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -473,7 +473,7 @@ static void test_updown_base(void) HWND updown; int r; - updown = create_updown_control(); + updown = create_updown_control(0); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -515,7 +515,7 @@ static void test_updown_unicode(void) HWND updown; int r; - updown = create_updown_control(); + updown = create_updown_control(0); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -548,7 +548,7 @@ static void test_updown_create(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); - updown = create_updown_control(); + updown = create_updown_control(0); ok(updown != NULL, "Failed to create updown control\n"); ok_sequence(sequences, PARENT_SEQ_INDEX, add_updown_to_parent_seq, "add updown control to parent", TRUE); ok_sequence(sequences, EDIT_SEQ_INDEX, add_updown_with_edit_seq, "add updown control with edit", FALSE); @@ -562,6 +562,48 @@ static void test_updown_create(void) DestroyWindow(updown); } +static void test_UDS_SETBUDDYINT(void) +{ + HWND updown; + DWORD style, ret; + CHAR text[10]; + + /* creating without UDS_SETBUDDYINT */ + updown = create_updown_control(0); + /* try to set UDS_SETBUDDYINT after creation */ + style = GetWindowLongA(updown, GWL_STYLE); + SetWindowLongA(updown, GWL_STYLE, style | UDS_SETBUDDYINT); + style = GetWindowLongA(updown, GWL_STYLE); + ok(style & UDS_SETBUDDYINT, "Expected UDS_SETBUDDY to be set\n"); + SendMessage(updown, UDM_SETPOS, 0, 20); + GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); + todo_wine ok(lstrlenA(text) == 0, "Expected empty string\n"); + DestroyWindow(updown); + + /* creating with UDS_SETBUDDYINT */ + updown = create_updown_control(UDS_SETBUDDYINT); + GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); + ok(lstrcmpA(text, "50") == 0, "Expected '50', got '%s'\n", text); + /* now remove style flag */ + style = GetWindowLongA(updown, GWL_STYLE); + SetWindowLongA(updown, GWL_STYLE, style & ~UDS_SETBUDDYINT); + SendMessage(updown, UDM_SETPOS, 0, 20); + GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); + todo_wine ok(lstrcmpA(text, "20") == 0, "Expected '20', got '%s'\n", text); + /* set edit text directly, check position */ + strcpy(text, "10"); + SetWindowTextA(edit, text); + ret = SendMessageA(updown, UDM_GETPOS32, 0, 0); + todo_wine expect(10, ret); + /* set style back */ + style = GetWindowLongA(updown, GWL_STYLE); + SetWindowLongA(updown, GWL_STYLE, style | UDS_SETBUDDYINT); + SendMessage(updown, UDM_SETPOS, 0, 30); + GetWindowTextA(edit, text, sizeof(text)/sizeof(CHAR)); + ok(lstrcmpA(text, "30") == 0, "Expected '30', got '%s'\n", text); + DestroyWindow(updown); +} + START_TEST(updown) { InitCommonControls(); @@ -578,6 +620,7 @@ START_TEST(updown) test_updown_buddy(); test_updown_base(); test_updown_unicode(); + test_UDS_SETBUDDYINT(); DestroyWindow(edit); DestroyWindow(parent_wnd);
1
0
0
0
Nikolay Sivov : comctl32/updown: Make tests independent, drop unrelated tests.
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: 6be1bade1af336a0a18b10d1403b143cbcd26801 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6be1bade1af336a0a18b10d14…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sun Sep 20 01:26:10 2009 +0400 comctl32/updown: Make tests independent, drop unrelated tests. --- dlls/comctl32/tests/updown.c | 104 ++++++++++++++++++------------------------ 1 files changed, 44 insertions(+), 60 deletions(-) diff --git a/dlls/comctl32/tests/updown.c b/dlls/comctl32/tests/updown.c index 40c9607..1747371 100644 --- a/dlls/comctl32/tests/updown.c +++ b/dlls/comctl32/tests/updown.c @@ -59,38 +59,10 @@ #define EDIT_SEQ_INDEX 1 #define UPDOWN_SEQ_INDEX 2 -static HWND parent_wnd, edit, updown; +static HWND parent_wnd, edit; static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; -static const struct message create_parent_wnd_seq[] = { - { WM_GETMINMAXINFO, sent }, - { WM_NCCREATE, sent }, - { WM_NCCALCSIZE, sent|wparam, 0 }, - { WM_CREATE, sent }, - { WM_SHOWWINDOW, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_QUERYNEWPALETTE, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam, 0 }, - { WM_ACTIVATEAPP, sent|wparam, 1 }, - { WM_NCACTIVATE, sent }, - { WM_ACTIVATE, sent|wparam, 1 }, - { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { WM_IME_NOTIFY, sent|defwinproc|optional }, - { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, - /* Win9x adds SWP_NOZORDER below */ - { WM_WINDOWPOSCHANGED, sent, /*|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE*/ }, - { WM_NCCALCSIZE, sent|wparam|optional, 1 }, - { WM_SIZE, sent }, - { WM_MOVE, sent }, - { 0 } -}; - -static const struct message add_edit_to_parent_seq[] = { - { WM_PARENTNOTIFY, sent|wparam, WM_CREATE }, - { 0 } -}; - static const struct message add_updown_with_edit_seq[] = { { WM_WINDOWPOSCHANGING, sent }, { WM_NCCALCSIZE, sent|wparam, TRUE }, @@ -182,15 +154,6 @@ static const struct message test_updown_unicode_seq[] = { { 0 } }; -static const struct message test_updown_destroy_seq[] = { - { WM_SHOWWINDOW, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent}, - { WM_WINDOWPOSCHANGED, sent}, - { WM_DESTROY, sent}, - { WM_NCDESTROY, sent}, - { 0 } -}; - static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static LONG defwndproc_counter = 0; @@ -359,8 +322,11 @@ static HWND create_updown_control(void) static void test_updown_pos(void) { + HWND updown; int r; + updown = create_updown_control(); + flush_sequences(sequences, NUM_MSG_SEQUENCES); /* Set Range from 0 to 100 */ @@ -410,13 +376,18 @@ static void test_updown_pos(void) expect(1,HIWORD(r)); ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_pos_seq , "test updown pos", FALSE); + + DestroyWindow(updown); } static void test_updown_pos32(void) { + HWND updown; int r; int low, high; + updown = create_updown_control(); + flush_sequences(sequences, NUM_MSG_SEQUENCES); /* Set the position to 0 to 1000 */ @@ -433,7 +404,7 @@ static void test_updown_pos32(void) win_skip("UDM_SETPOS32 and UDM_GETPOS32 need 5.80\n"); return; } - expect(100,r); /* As set by test_updown_pos() */ + expect(50,r); /* Since UDM_SETBUDDYINT was not set at creation bRet will always be true as a return from UDM_GETPOS32 */ @@ -470,11 +441,15 @@ static void test_updown_pos32(void) expect(1,high); ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_pos32_seq, "test updown pos32", FALSE); + + DestroyWindow(updown); } static void test_updown_buddy(void) { - HWND buddyReturn; + HWND updown, buddyReturn; + + updown = create_updown_control(); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -489,12 +464,17 @@ static void test_updown_buddy(void) ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_buddy_seq, "test updown buddy", TRUE); ok_sequence(sequences, EDIT_SEQ_INDEX, add_updown_with_edit_seq, "test updown buddy_edit", FALSE); + + DestroyWindow(updown); } static void test_updown_base(void) { + HWND updown; int r; + updown = create_updown_control(); + flush_sequences(sequences, NUM_MSG_SEQUENCES); SendMessage(updown, UDM_SETBASE, 10 , 0); @@ -526,12 +506,17 @@ static void test_updown_base(void) expect(10,r); ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_base_seq, "test updown base", FALSE); + + DestroyWindow(updown); } static void test_updown_unicode(void) { + HWND updown; int r; + updown = create_updown_control(); + flush_sequences(sequences, NUM_MSG_SEQUENCES); /* Set it to ANSI, don't check return as we don't know previous state */ @@ -552,22 +537,14 @@ static void test_updown_unicode(void) expect(0,r); ok_sequence(sequences, UPDOWN_SEQ_INDEX, test_updown_unicode_seq, "test updown unicode", FALSE); -} + DestroyWindow(updown); +} -static void test_create_updown_control(void) +static void test_updown_create(void) { CHAR text[MAX_PATH]; - - parent_wnd = create_parent_window(); - ok(parent_wnd != NULL, "Failed to create parent window!\n"); - ok_sequence(sequences, PARENT_SEQ_INDEX, create_parent_wnd_seq, "create parent window", TRUE); - - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - edit = create_edit_control(); - ok(edit != NULL, "Failed to create edit control\n"); - ok_sequence(sequences, PARENT_SEQ_INDEX, add_edit_to_parent_seq, "add edit control to parent", FALSE); + HWND updown; flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -582,13 +559,7 @@ static void test_create_updown_control(void) ok(lstrlenA(text) == 0, "Expected empty string\n"); ok_sequence(sequences, EDIT_SEQ_INDEX, get_edit_text_seq, "get edit text", FALSE); - flush_sequences(sequences, NUM_MSG_SEQUENCES); - - test_updown_pos(); - test_updown_pos32(); - test_updown_buddy(); - test_updown_base(); - test_updown_unicode(); + DestroyWindow(updown); } START_TEST(updown) @@ -596,5 +567,18 @@ START_TEST(updown) InitCommonControls(); init_msg_sequences(sequences, NUM_MSG_SEQUENCES); - test_create_updown_control(); + parent_wnd = create_parent_window(); + ok(parent_wnd != NULL, "Failed to create parent window!\n"); + edit = create_edit_control(); + ok(edit != NULL, "Failed to create edit control\n"); + + test_updown_create(); + test_updown_pos(); + test_updown_pos32(); + test_updown_buddy(); + test_updown_base(); + test_updown_unicode(); + + DestroyWindow(edit); + DestroyWindow(parent_wnd); }
1
0
0
0
Nikolay Sivov : user32/edit: Invalidate if style changed after EM_SETREADONLY.
by Alexandre Julliard
22 Sep '09
22 Sep '09
Module: wine Branch: master Commit: 0209b02f47a13274ca4f26efff2842466b43e673 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0209b02f47a13274ca4f26eff…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Sat Sep 19 22:32:04 2009 +0400 user32/edit: Invalidate if style changed after EM_SETREADONLY. --- dlls/user32/edit.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 5a62bc2..8ad945b 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -5011,6 +5011,9 @@ static LRESULT EditWndProc_common( HWND hwnd, UINT msg, case EM_SETREADONLY16: case EM_SETREADONLY: + { + DWORD old_style = es->style; + if (wParam) { SetWindowLongW( hwnd, GWL_STYLE, GetWindowLongW( hwnd, GWL_STYLE ) | ES_READONLY ); @@ -5020,8 +5023,13 @@ static LRESULT EditWndProc_common( HWND hwnd, UINT msg, GetWindowLongW( hwnd, GWL_STYLE ) & ~ES_READONLY ); es->style &= ~ES_READONLY; } - result = 1; + + if (old_style ^ es->style) + InvalidateRect(es->hwndSelf, NULL, TRUE); + + result = 1; break; + } case EM_SETWORDBREAKPROC16: EDIT_EM_SetWordBreakProc16(es, (EDITWORDBREAKPROC16)lParam);
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
87
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
Results per page:
10
25
50
100
200