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
April 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
2 participants
664 discussions
Start a n
N
ew thread
Francois Gouget : dinput: Add a trailing '\n' to ERR() messages.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: 14e03d770a9991a208cfb3ea683f7f145d5b9938 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14e03d770a9991a208cfb3ea6…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Apr 20 15:10:22 2009 +0200 dinput: Add a trailing '\n' to ERR() messages. --- dlls/dinput/joystick_osx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index 8d7f209..57a8559 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -205,7 +205,7 @@ static int find_osx_devices(void) tIOReturn = IOHIDManagerOpen( gIOHIDManagerRef, 0L); if ( kIOReturnSuccess != tIOReturn ) { - ERR("Couldn't open IOHIDManager."); + ERR("Couldn't open IOHIDManager.\n"); return 0; }
1
0
0
0
Francois Gouget : wineesd.drv: Add a trailing '\n' to a WARN() trace.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: 8e18524ad365d7c80bc383b605f0e0b0ef4e2df4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e18524ad365d7c80bc383b60…
Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Apr 20 14:49:15 2009 +0200 wineesd.drv: Add a trailing '\n' to a WARN() trace. --- dlls/wineesd.drv/audio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wineesd.drv/audio.c b/dlls/wineesd.drv/audio.c index 9fde808..02446e3 100644 --- a/dlls/wineesd.drv/audio.c +++ b/dlls/wineesd.drv/audio.c @@ -1192,7 +1192,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) } else { - WARN("esd_open_sound() failed"); + WARN("esd_open_sound() failed\n"); /* just do a rough guess at the latency and continue anyway */ wwo->dwLatency = 1000 * (2 * ESD_BUF_SIZE) / out_rate; }
1
0
0
0
Nikolay Sivov : comctl32/listview: Some tests for LVS_SINGLESEL switchover.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: 3ce8e20896a72de2022c62964744d1660011656d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3ce8e20896a72de2022c62964…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Apr 20 08:05:45 2009 -0400 comctl32/listview: Some tests for LVS_SINGLESEL switchover. --- dlls/comctl32/listview.c | 1 - dlls/comctl32/tests/listview.c | 55 ++++++++++++++++++++++++++++++++++++++++ include/commctrl.h | 2 +- 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index d249cff..3c294f2 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9566,7 +9566,6 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, if (wStyleType != GWL_STYLE) return 0; /* FIXME: if LVS_NOSORTHEADER changed, update header */ - /* or LVS_SINGLESEL */ /* or LVS_SORT{AS,DES}CENDING */ infoPtr->dwStyle = lpss->styleNew; diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 5733668..6b68c56 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1351,6 +1351,7 @@ static void test_multiselect(void) static const int items=5; BYTE kstate[256]; select_task task; + LONG_PTR style; static struct t_select_task task_list[] = { { "using VK_DOWN", 0, VK_DOWN, -1, -1 }, @@ -1407,6 +1408,60 @@ static void test_multiselect(void) SetKeyboardState(kstate); } DestroyWindow(hwnd); + + /* make multiple selection, then switch to LVS_SINGLESEL */ + hwnd = create_listview_control(0); + for (i=0;i<items;i++) { + insert_item(hwnd, 0); + } + item_count = (int)SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); + expect(items,item_count); + /* deselect all items */ + ListView_SetItemState(hwnd, -1, 0, LVIS_SELECTED); + SendMessage(hwnd, LVM_SETSELECTIONMARK, 0, -1); + for (i=0;i<3;i++) { + ListView_SetItemState(hwnd, i, LVIS_SELECTED, LVIS_SELECTED); + } + + r = SendMessage(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + expect(3, r); + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); +todo_wine + expect(-1, r); + + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(!(style & LVS_SINGLESEL), "LVS_SINGLESEL isn't expected\n"); + SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_SINGLESEL); + /* check that style is accepted */ + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(style & LVS_SINGLESEL, "LVS_SINGLESEL expected\n"); + + for (i=0;i<3;i++) { + r = ListView_GetItemState(hwnd, i, LVIS_SELECTED); + ok(r & LVIS_SELECTED, "Expected item %d to be selected\n", i); + } + r = SendMessage(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + expect(3, r); + SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); + expect(3, r); + + /* select one more */ + ListView_SetItemState(hwnd, 3, LVIS_SELECTED, LVIS_SELECTED); + + for (i=0;i<3;i++) { + r = ListView_GetItemState(hwnd, i, LVIS_SELECTED); + ok(!(r & LVIS_SELECTED), "Expected item %d to be unselected\n", i); + } + r = ListView_GetItemState(hwnd, 3, LVIS_SELECTED); + ok(r & LVIS_SELECTED, "Expected item %d to be selected\n", i); + + r = SendMessage(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + expect(1, r); + r = SendMessage(hwnd, LVM_GETSELECTIONMARK, 0, 0); +todo_wine + expect(-1, r); + + DestroyWindow(hwnd); } static void test_subitem_rect(void) diff --git a/include/commctrl.h b/include/commctrl.h index 9dc7f9d..4727e3e 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -3715,7 +3715,7 @@ typedef struct NMLVSCROLL { LVITEMA _LVi; _LVi.state = data; _LVi.stateMask = dataMask;\ SNDMSGA(hwnd, LVM_SETITEMSTATE, (WPARAM)(UINT)i, (LPARAM) (LPLVITEMA)&_LVi);} #define ListView_GetItemState(hwnd,i,mask) \ - (BOOL)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask)) + (UINT)SNDMSGA((hwnd),LVM_GETITEMSTATE,(WPARAM)(UINT)(i),(LPARAM)(UINT)(mask)) #define ListView_GetCountPerPage(hwnd) \ (BOOL)SNDMSGW((hwnd),LVM_GETCOUNTPERPAGE,0,0L) #define ListView_GetImageList(hwnd,iImageList) \
1
0
0
0
Nikolay Sivov : comctl32/listview: Fix a regression caused by 9c1a0e468f5cfbe9d863852ed5a42390f2cbfeb4.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: 0588ba7fefedddbf024c10ecc36d55291bee0da0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0588ba7fefedddbf024c10ecc…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Apr 20 08:03:07 2009 -0400 comctl32/listview: Fix a regression caused by 9c1a0e468f5cfbe9d863852ed5a42390f2cbfeb4. --- dlls/comctl32/listview.c | 6 +----- dlls/comctl32/tests/listview.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 870354c..d249cff 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -3565,7 +3565,7 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL if (uChanged & LVIF_STATE) { - if (lpItem && (stateMask & ~infoPtr->uCallbackMask & ~(LVIS_FOCUSED | LVIS_SELECTED))) + if (lpItem && (stateMask & ~infoPtr->uCallbackMask)) { lpItem->state &= ~stateMask; lpItem->state |= (lpLVItem->state & stateMask); @@ -3574,12 +3574,10 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL { if (infoPtr->dwStyle & LVS_SINGLESEL) LISTVIEW_DeselectAllSkipItem(infoPtr, lpLVItem->iItem); ranges_additem(infoPtr->selectionRanges, lpLVItem->iItem); - lpItem->state |= LVIS_SELECTED; } else if (stateMask & LVIS_SELECTED) { ranges_delitem(infoPtr->selectionRanges, lpLVItem->iItem); - lpItem->state &= ~LVIS_SELECTED; } /* if we are asked to change focus, and we manage it, do it */ if (stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED) @@ -3597,13 +3595,11 @@ static BOOL set_main_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL LISTVIEW_SetItemState(infoPtr, infoPtr->nFocusedItem, &item); } - lpItem->state |= LVIS_FOCUSED; infoPtr->nFocusedItem = lpLVItem->iItem; LISTVIEW_EnsureVisible(infoPtr, lpLVItem->iItem, uView == LVS_LIST); } else if (infoPtr->nFocusedItem == lpLVItem->iItem) { - lpItem->state &= ~LVIS_FOCUSED; infoPtr->nFocusedItem = -1; } } diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 5aa2f52..5733668 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -1532,6 +1532,8 @@ static void test_ownerdata(void) { HWND hwnd; LONG_PTR style, ret; + DWORD res; + LVITEMA item; /* it isn't possible to set LVS_OWNERDATA after creation */ hwnd = create_listview_control(0); @@ -1579,6 +1581,22 @@ static void test_ownerdata(void) style = GetWindowLongPtrA(hwnd, GWL_STYLE); ok(style & LVS_OWNERDATA, "LVS_OWNERDATA is expected\n"); DestroyWindow(hwnd); + + /* try select an item */ + hwnd = create_listview_control(LVS_OWNERDATA); + ok(hwnd != NULL, "failed to create a listview window\n"); + res = SendMessageA(hwnd, LVM_SETITEMCOUNT, 1, 0); + ok(res != 0, "Expected LVM_SETITEMCOUNT to succeed\n"); + res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + expect(0, res); + memset(&item, 0, sizeof(item)); + item.stateMask = LVIS_SELECTED; + item.state = LVIS_SELECTED; + res = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); + expect(TRUE, res); + res = SendMessageA(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); + expect(1, res); + DestroyWindow(hwnd); } START_TEST(listview)
1
0
0
0
Nikolay Sivov : comctl32/listview: Switching to/from LVS_OWNERDATA isn' t allowed after creation.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: 42bef95cbcce5c0530a888dc70fe70fffeccc560 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=42bef95cbcce5c0530a888dc7…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Apr 20 07:42:43 2009 -0400 comctl32/listview: Switching to/from LVS_OWNERDATA isn't allowed after creation. --- dlls/comctl32/listview.c | 34 +++++++++++++++- dlls/comctl32/tests/listview.c | 86 +++++++++++++++++++++++++++++++++++---- 2 files changed, 110 insertions(+), 10 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 26f9ef3..870354c 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9570,7 +9570,6 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, if (wStyleType != GWL_STYLE) return 0; /* FIXME: if LVS_NOSORTHEADER changed, update header */ - /* what if LVS_OWNERDATA changed? */ /* or LVS_SINGLESEL */ /* or LVS_SORT{AS,DES}CENDING */ @@ -9664,6 +9663,36 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, /*** * DESCRIPTION: + * Processes WM_STYLECHANGING messages. + * + * PARAMETER(S): + * [I] infoPtr : valid pointer to the listview structure + * [I] wStyleType : window style type (normal or extended) + * [I0] lpss : window style information + * + * RETURN: + * Zero + */ +static INT LISTVIEW_StyleChanging(LISTVIEW_INFO *infoPtr, WPARAM wStyleType, + STYLESTRUCT *lpss) +{ + TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n", + wStyleType, lpss->styleOld, lpss->styleNew); + + /* don't forward LVS_OWNERDATA only if not already set to */ + if ((lpss->styleNew ^ lpss->styleOld) & LVS_OWNERDATA) + { + if (lpss->styleOld & LVS_OWNERDATA) + lpss->styleNew |= LVS_OWNERDATA; + else + lpss->styleNew &= ~LVS_OWNERDATA; + } + + return 0; +} + +/*** + * DESCRIPTION: * Processes WM_SHOWWINDOW messages. * * PARAMETER(S): @@ -10164,6 +10193,9 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_STYLECHANGED: return LISTVIEW_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam); + case WM_STYLECHANGING: + return LISTVIEW_StyleChanging(infoPtr, wParam, (LPSTYLESTRUCT)lParam); + case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); return 0; diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index d08ca2f..5aa2f52 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -146,6 +146,12 @@ static const struct message listview_itempos_seq[] = { { 0 } }; +static const struct message listview_ownerdata_switchto_seq[] = { + { WM_STYLECHANGING, sent }, + { WM_STYLECHANGED, sent }, + { 0 } +}; + struct subclass_info { WNDPROC oldproc; @@ -223,6 +229,14 @@ static LRESULT WINAPI listview_subclass_proc(HWND hwnd, UINT message, WPARAM wPa trace("listview: %p, %04x, %08lx, %08lx\n", hwnd, message, wParam, lParam); + /* some debug output for style changing */ + if ((message == WM_STYLECHANGING || + message == WM_STYLECHANGED) && lParam) + { + STYLESTRUCT *style = (STYLESTRUCT*)lParam; + trace("\told style: 0x%08x, new style: 0x%08x\n", style->styleOld, style->styleNew); + } + msg.message = message; msg.flags = sent|wparam|lparam; if (defwndproc_counter) msg.flags |= defwinproc; @@ -237,7 +251,7 @@ static LRESULT WINAPI listview_subclass_proc(HWND hwnd, UINT message, WPARAM wPa return ret; } -static HWND create_listview_control(void) +static HWND create_listview_control(DWORD style) { struct subclass_info *info; HWND hwnd; @@ -249,7 +263,7 @@ static HWND create_listview_control(void) GetClientRect(hwndparent, &rect); hwnd = CreateWindowExA(0, WC_LISTVIEW, "foo", - WS_CHILD | WS_BORDER | WS_VISIBLE | LVS_REPORT, + WS_CHILD | WS_BORDER | WS_VISIBLE | LVS_REPORT | style, 0, 0, rect.right, rect.bottom, hwndparent, NULL, GetModuleHandleA(NULL), NULL); ok(hwnd != NULL, "gle=%d\n", GetLastError()); @@ -957,7 +971,7 @@ static void test_redraw(void) { HWND hwnd, hwndheader; - hwnd = create_listview_control(); + hwnd = create_listview_control(0); hwndheader = subclass_header(hwnd); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -1009,7 +1023,7 @@ static void test_customdraw(void) HWND hwnd; WNDPROC oldwndproc; - hwnd = create_listview_control(); + hwnd = create_listview_control(0); insert_column(hwnd, 0); insert_column(hwnd, 1); @@ -1081,7 +1095,7 @@ static void test_color(void) COLORREF color; COLORREF colors[4] = {RGB(0,0,0), RGB(100,50,200), CLR_NONE, RGB(255,255,255)}; - hwnd = create_listview_control(); + hwnd = create_listview_control(0); ok(hwnd != NULL, "failed to create a listview window\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -1127,7 +1141,7 @@ static void test_item_count(void) static CHAR item1text[] = "item1"; static CHAR item2text[] = "item2"; - hwnd = create_listview_control(); + hwnd = create_listview_control(0); ok(hwnd != NULL, "failed to create a listview window\n"); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -1346,7 +1360,7 @@ static void test_multiselect(void) }; - hwnd = create_listview_control(); + hwnd = create_listview_control(0); for (i=0;i<items;i++) { insert_item(hwnd, 0); @@ -1403,7 +1417,7 @@ static void test_subitem_rect(void) RECT rect; /* test LVM_GETSUBITEMRECT for header */ - hwnd = create_listview_control(); + hwnd = create_listview_control(0); ok(hwnd != NULL, "failed to create a listview window\n"); /* add some columns */ memset(&col, 0, sizeof(LVCOLUMN)); @@ -1464,7 +1478,7 @@ static void test_sorting(void) LVITEMA item = {0}; DWORD r; - hwnd = create_listview_control(); + hwnd = create_listview_control(0); ok(hwnd != NULL, "failed to create a listview window\n"); /* insert some items */ @@ -1514,6 +1528,59 @@ static void test_sorting(void) DestroyWindow(hwnd); } +static void test_ownerdata(void) +{ + HWND hwnd; + LONG_PTR style, ret; + + /* it isn't possible to set LVS_OWNERDATA after creation */ + hwnd = create_listview_control(0); + ok(hwnd != NULL, "failed to create a listview window\n"); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(!(style & LVS_OWNERDATA) && style, "LVS_OWNERDATA isn't expected\n"); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + ret = SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_OWNERDATA); + ok(ret == style, "Expected set GWL_STYLE to succeed\n"); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_ownerdata_switchto_seq, + "try to switch to LVS_OWNERDATA seq", FALSE); + + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(!(style & LVS_OWNERDATA), "LVS_OWNERDATA isn't expected\n"); + DestroyWindow(hwnd); + + /* try to set LVS_OWNERDATA after creation just having it */ + hwnd = create_listview_control(LVS_OWNERDATA); + ok(hwnd != NULL, "failed to create a listview window\n"); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(style & LVS_OWNERDATA, "LVS_OWNERDATA is expected\n"); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + ret = SetWindowLongPtrA(hwnd, GWL_STYLE, style | LVS_OWNERDATA); + ok(ret == style, "Expected set GWL_STYLE to succeed\n"); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_ownerdata_switchto_seq, + "try to switch to LVS_OWNERDATA seq", FALSE); + DestroyWindow(hwnd); + + /* try to remove LVS_OWNERDATA after creation just having it */ + hwnd = create_listview_control(LVS_OWNERDATA); + ok(hwnd != NULL, "failed to create a listview window\n"); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(style & LVS_OWNERDATA, "LVS_OWNERDATA is expected\n"); + + flush_sequences(sequences, NUM_MSG_SEQUENCES); + + ret = SetWindowLongPtrA(hwnd, GWL_STYLE, style & ~LVS_OWNERDATA); + ok(ret == style, "Expected set GWL_STYLE to succeed\n"); + ok_sequence(sequences, LISTVIEW_SEQ_INDEX, listview_ownerdata_switchto_seq, + "try to switch to LVS_OWNERDATA seq", FALSE); + style = GetWindowLongPtrA(hwnd, GWL_STYLE); + ok(style & LVS_OWNERDATA, "LVS_OWNERDATA is expected\n"); + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -1553,4 +1620,5 @@ START_TEST(listview) test_multiselect(); test_subitem_rect(); test_sorting(); + test_ownerdata(); }
1
0
0
0
Nikolay Sivov : comctl32/listview: Slightly enlarge rectangle when drawing checkbox.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: 10a936150bb2ddcb63dae88f42a9536e0ebbb3c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=10a936150bb2ddcb63dae88f4…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Apr 20 07:37:33 2009 -0400 comctl32/listview: Slightly enlarge rectangle when drawing checkbox. --- dlls/comctl32/listview.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index c5261e1..26f9ef3 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -7209,7 +7209,7 @@ static HIMAGELIST LISTVIEW_CreateCheckBoxIL(const LISTVIEW_INFO *infoPtr) hbm_orig = SelectObject(hdc, hbm_mask); FillRect(hdc, &rc, hbr_white); - InflateRect(&rc, -3, -3); + InflateRect(&rc, -2, -2); FillRect(hdc, &rc, hbr_black); SelectObject(hdc, hbm_im);
1
0
0
0
Nikolay Sivov : comctl32/listview: Add a ListView_GetTextBkColor macro.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: ffb214a66b134134a0dbb311c395f826366b876d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ffb214a66b134134a0dbb311c…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Mon Apr 20 07:36:31 2009 -0400 comctl32/listview: Add a ListView_GetTextBkColor macro. --- dlls/comctl32/listview.c | 1 - include/commctrl.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index d594e51..c5261e1 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -144,7 +144,6 @@ * -- ListView_GetISearchString * -- ListView_GetNumberOfWorkAreas * -- ListView_GetOrigin - * -- ListView_GetTextBkColor * -- ListView_GetUnicodeFormat, ListView_SetUnicodeFormat * -- ListView_GetWorkAreas, ListView_SetWorkAreas * diff --git a/include/commctrl.h b/include/commctrl.h index a3ec513..9dc7f9d 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -3743,6 +3743,8 @@ typedef struct NMLVSCROLL (HWND)SNDMSGA((hwnd), LVM_GETEDITCONTROL, 0, 0) #define ListView_GetTextColor(hwnd) \ (COLORREF)SNDMSGA((hwnd), LVM_GETTEXTCOLOR, 0, 0) +#define ListView_GetTextBkColor(hwnd) \ + (COLORREF)SNDMSGA((hwnd), LVM_GETTEXTBKCOLOR, 0, 0) #define ListView_GetBkColor(hwnd) \ (COLORREF)SNDMSGA((hwnd), LVM_GETBKCOLOR, 0, 0) #define ListView_GetItemA(hwnd,pitem) \
1
0
0
0
Vitaliy Margolen : dinput: Use more friendly name for the joystick than its device path.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: 542b17943ff353bc3a2becec2c7ca7cf85ff8a7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=542b17943ff353bc3a2becec2…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Sun Apr 19 20:33:31 2009 -0600 dinput: Use more friendly name for the joystick than its device path. --- dlls/dinput/joystick_linuxinput.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 2a9db66..f9f6146 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -299,7 +299,7 @@ static void fill_joystick_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD ver lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); strcpy(lpddi->tszInstanceName, joydevs[id].name); - strcpy(lpddi->tszProductName, joydevs[id].device); + strcpy(lpddi->tszProductName, joydevs[id].name); } static void fill_joystick_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) @@ -320,7 +320,7 @@ static void fill_joystick_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD ver lpddi->dwDevType = DIDEVTYPE_JOYSTICK | (DIDEVTYPEJOYSTICK_TRADITIONAL << 8); MultiByteToWideChar(CP_ACP, 0, joydevs[id].name, -1, lpddi->tszInstanceName, MAX_PATH); - MultiByteToWideChar(CP_ACP, 0, joydevs[id].device, -1, lpddi->tszProductName, MAX_PATH); + MultiByteToWideChar(CP_ACP, 0, joydevs[id].name, -1, lpddi->tszProductName, MAX_PATH); } static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id)
1
0
0
0
Vitaliy Margolen : dinput: Convert evdev joystick to new base class.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: 649c762f524c3fd8d62ff97aed623fa495b7b1f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=649c762f524c3fd8d62ff97ae…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Sun Apr 19 20:33:29 2009 -0600 dinput: Convert evdev joystick to new base class. --- dlls/dinput/joystick_linuxinput.c | 313 +++++++++---------------------------- 1 files changed, 73 insertions(+), 240 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=649c762f524c3fd8d62ff…
1
0
0
0
Vitaliy Margolen : dinput: Make props array a part of the generic joystick struct.
by Alexandre Julliard
20 Apr '09
20 Apr '09
Module: wine Branch: master Commit: 3223798d30d7ff81b57ec3a598ab7270be87c599 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3223798d30d7ff81b57ec3a59…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Sun Apr 19 20:33:27 2009 -0600 dinput: Make props array a part of the generic joystick struct. It's much easier to free it on release. --- dlls/dinput/joystick_linux.c | 6 ------ dlls/dinput/joystick_osx.c | 6 ------ dlls/dinput/joystick_private.h | 4 +++- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index c7facab..3a8487b 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -462,11 +462,6 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di } newDevice->generic.base.data_format.wine_df = df; - /* create default properties */ - newDevice->generic.props = HeapAlloc(GetProcessHeap(),0,c_dfDIJoystick2.dwNumObjs*sizeof(ObjProps)); - if (newDevice->generic.props == 0) - goto FAILED; - /* initialize default properties */ for (i = 0; i < c_dfDIJoystick2.dwNumObjs; i++) { newDevice->generic.props[i].lDevMin = -32767; @@ -510,7 +505,6 @@ FAILED1: release_DataFormat(&newDevice->generic.base.data_format); HeapFree(GetProcessHeap(),0,newDevice->axis_map); HeapFree(GetProcessHeap(),0,newDevice->generic.name); - HeapFree(GetProcessHeap(),0,newDevice->generic.props); HeapFree(GetProcessHeap(),0,newDevice); *pdev = 0; diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c index 1446b6e..8d7f209 100644 --- a/dlls/dinput/joystick_osx.c +++ b/dlls/dinput/joystick_osx.c @@ -724,11 +724,6 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di } newDevice->generic.base.data_format.wine_df = df; - /* create default properties */ - newDevice->generic.props = HeapAlloc(GetProcessHeap(),0,c_dfDIJoystick2.dwNumObjs*sizeof(ObjProps)); - if (newDevice->generic.props == 0) - goto FAILED; - /* initialize default properties */ get_osx_device_elements_props(newDevice); @@ -761,7 +756,6 @@ FAILED: HeapFree(GetProcessHeap(), 0, df); release_DataFormat(&newDevice->generic.base.data_format); HeapFree(GetProcessHeap(),0,newDevice->generic.name); - HeapFree(GetProcessHeap(),0,newDevice->generic.props); HeapFree(GetProcessHeap(),0,newDevice); *pdev = 0; diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h index d1f1666..265c7f0 100644 --- a/dlls/dinput/joystick_private.h +++ b/dlls/dinput/joystick_private.h @@ -29,6 +29,8 @@ #include "dinput_private.h" #include "device_private.h" +/* Number of objects in the default data format */ +#define MAX_PROPS 164 struct JoystickGenericImpl; typedef void joy_polldev_handler(struct JoystickGenericImpl *This); @@ -37,7 +39,7 @@ typedef struct JoystickGenericImpl { struct IDirectInputDevice2AImpl base; - ObjProps *props; + ObjProps props[MAX_PROPS]; DIDEVCAPS devcaps; DIJOYSTATE2 js; /* wine data */ GUID guidProduct;
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
67
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
Results per page:
10
25
50
100
200