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
October 2015
----- 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
749 discussions
Start a n
N
ew thread
Riccardo Bortolato : wined3d: Pass wined3d_texture and sub_resource idx to device_volume_created callback.
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: 9621737c8e7ce3c67f998ef096ea321f9ea2f04a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9621737c8e7ce3c67f998ef09…
Author: Riccardo Bortolato <rikyz619(a)gmail.com> Date: Tue Oct 6 10:36:49 2015 +0200 wined3d: Pass wined3d_texture and sub_resource idx to device_volume_created callback. Store wined3d_texture and sub_resource in d3d8_volume. Updated the d3d8_volume_LockBox to make use of wined3d_texture_map. Also updated d3d9, d3d11, ddraw callbacks accordingly. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/d3d11/device.c | 6 +++--- dlls/d3d8/d3d8_private.h | 6 ++++-- dlls/d3d8/device.c | 10 +++++----- dlls/d3d8/volume.c | 11 +++++++---- dlls/d3d9/d3d9_private.h | 4 ++-- dlls/d3d9/device.c | 8 ++++---- dlls/d3d9/volume.c | 6 +++--- dlls/ddraw/ddraw.c | 6 +++--- dlls/wined3d/volume.c | 2 +- include/wine/wined3d.h | 3 ++- 10 files changed, 34 insertions(+), 28 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9621737c8e7ce3c67f998…
1
0
0
0
Riccardo Bortolato : wined3d: Introduce new wined3d_texture_(un) map functions.
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: eac95d30b66609c5c924ec36b6049e680c63015f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eac95d30b66609c5c924ec36b…
Author: Riccardo Bortolato <rikyz619(a)gmail.com> Date: Tue Oct 6 10:36:48 2015 +0200 wined3d: Introduce new wined3d_texture_(un)map functions. Initial usage in d3d11. Also removed wined3d_volume_from_resource. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/d3d11/texture.c | 28 ++++--------------------- dlls/wined3d/texture.c | 47 ++++++++++++++++++++++++++++++++++++++++++ dlls/wined3d/volume.c | 5 ----- dlls/wined3d/wined3d.spec | 3 ++- dlls/wined3d/wined3d_private.h | 3 +++ include/wine/wined3d.h | 4 +++- 6 files changed, 59 insertions(+), 31 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=eac95d30b66609c5c924e…
1
0
0
0
Riccardo Bortolato : wined3d: Pass a wined3d_box to wined3d_surface_map..
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: 1d1487105d4d3a9133f0846d32363a0432812d0c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d1487105d4d3a9133f0846d3…
Author: Riccardo Bortolato <rikyz619(a)gmail.com> Date: Tue Oct 6 10:36:47 2015 +0200 wined3d: Pass a wined3d_box to wined3d_surface_map.. Introduced a new surface_check_block_align function that accepts a wined3d_box, eventually the old _rect version will be completely replaced. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/d3d8/surface.c | 9 +++++++- dlls/d3d9/surface.c | 13 ++++++++++- dlls/ddraw/surface.c | 9 +++++++- dlls/wined3d/surface.c | 62 ++++++++++++++++++++++++++++---------------------- include/wine/wined3d.h | 2 +- 5 files changed, 64 insertions(+), 31 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1d1487105d4d3a9133f08…
1
0
0
0
Dmitry Timoshkov : oleview: Always check return value of SendMessage( TVM_GETITEM).
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: 26db80b685e9be1191a892e149ec35bc71404072 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26db80b685e9be1191a892e14…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Oct 7 18:27:49 2015 +0800 oleview: Always check return value of SendMessage(TVM_GETITEM). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- programs/oleview/tree.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/programs/oleview/tree.c b/programs/oleview/tree.c index 4a16081..decedc4 100644 --- a/programs/oleview/tree.c +++ b/programs/oleview/tree.c @@ -82,7 +82,7 @@ void CreateInst(HTREEITEM item, WCHAR *wszMachineName) tvis.hParent = item; tvis.hInsertAfter = TVI_LAST; - SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi); + if (!SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi)) return; if(!tvi.lParam || ((ITEM_INFO *)tvi.lParam)->loaded || !(((ITEM_INFO *)tvi.lParam)->cFlag&SHOWALL)) return; @@ -154,9 +154,7 @@ void CreateInst(HTREEITEM item, WCHAR *wszMachineName) while(hCur) { tvi.hItem = hCur; - SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi); - - if(!tvi.lParam) + if(!SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi) || !tvi.lParam) { hCur = (HTREEITEM)SendMessageW(globals.hTree, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)hCur); @@ -192,9 +190,7 @@ void ReleaseInst(HTREEITEM item) memset(&tvi, 0, sizeof(TVITEMW)); tvi.hItem = item; - SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi); - - if(!tvi.lParam) return; + if(!SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi) || !tvi.lParam) return; pU = ((ITEM_INFO *)tvi.lParam)->pU; @@ -223,18 +219,18 @@ BOOL CreateRegPath(HTREEITEM item, WCHAR *buffer, int bufSize) { TVITEMW tvi; int bufLen; - BOOL ret; + BOOL ret = FALSE; memset(buffer, 0, bufSize * sizeof(WCHAR)); memset(&tvi, 0, sizeof(TVITEMW)); tvi.hItem = item; - SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi); - ret = (tvi.lParam && ((ITEM_INFO *)tvi.lParam)->cFlag & REGPATH); + if (SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi)) + ret = (tvi.lParam && ((ITEM_INFO *)tvi.lParam)->cFlag & REGPATH); while(TRUE) { - SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi); + if(!SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi)) break; if(tvi.lParam && (((ITEM_INFO *)tvi.lParam)->cFlag & (REGPATH|REGTOP))) { @@ -318,7 +314,7 @@ static void AddCOMandAll(void) while(curSearch) { tvi.hItem = curSearch; - SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi); + if(!SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi)) break; if(tvi.lParam && !lstrcmpW(((ITEM_INFO *)tvi.lParam)->info, wszComp)) { @@ -631,15 +627,13 @@ void EmptyTree(void) TVM_GETNEXTITEM, TVGN_PARENT, (LPARAM)del); tvi.hItem = del; - SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi); - - if(tvi.lParam) + if(SendMessageW(globals.hTree, TVM_GETITEMW, 0, (LPARAM)&tvi) && tvi.lParam) { if(((ITEM_INFO *)tvi.lParam)->loaded) ReleaseInst(del); HeapFree(GetProcessHeap(), 0, (ITEM_INFO *)tvi.lParam); - } - SendMessageW(globals.hTree, TVM_DELETEITEM, 0, (LPARAM)del); + SendMessageW(globals.hTree, TVM_DELETEITEM, 0, (LPARAM)del); + } if(!cur) break; }
1
0
0
0
Dmitry Timoshkov : oleview: Remove useless check for hPrevInst.
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: 65187a0b9997a8251b5853e1df9dff418282a42b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=65187a0b9997a8251b5853e1d…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Oct 7 18:27:37 2015 +0800 oleview: Remove useless check for hPrevInst. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- programs/oleview/oleview.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/programs/oleview/oleview.c b/programs/oleview/oleview.c index 5a11888..350f6ad 100644 --- a/programs/oleview/oleview.c +++ b/programs/oleview/oleview.c @@ -558,12 +558,9 @@ int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int { MSG msg; HANDLE hAccelTable; - - if(!hPrevInst) - { - if(!InitApplication(hInst)) - return FALSE; - } + + if(!InitApplication(hInst)) + return FALSE; if(!InitInstance(hInst, nCmdShow)) return FALSE;
1
0
0
0
Dmitry Timoshkov : oleview: Correctly set window' s class background and cursor.
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: e10db2f22e50b6f575b921f6d3e2d363c2af46b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e10db2f22e50b6f575b921f6d…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Oct 7 18:27:30 2015 +0800 oleview: Correctly set window's class background and cursor. Otherwise background of some windows doesn't match current theme, and mouse cursor sometimes gets stuck after moving over vertical splitter. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- programs/oleview/details.c | 3 ++- programs/oleview/oleview.c | 1 + programs/oleview/pane.c | 3 ++- programs/oleview/tree.c | 2 ++ programs/oleview/typelib.c | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/programs/oleview/details.c b/programs/oleview/details.c index 9fdd9f3..49d3dc4 100644 --- a/programs/oleview/details.c +++ b/programs/oleview/details.c @@ -397,7 +397,8 @@ HWND CreateDetailsWindow(HINSTANCE hInst) memset(&wcd, 0, sizeof(WNDCLASSW)); wcd.lpfnWndProc = DetailsProc; wcd.lpszClassName = wszDetailsClass; - wcd.hbrBackground = (HBRUSH)COLOR_WINDOW; + wcd.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcd.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW); if(!RegisterClassW(&wcd)) return NULL; diff --git a/programs/oleview/oleview.c b/programs/oleview/oleview.c index 69f4f9e..5a11888 100644 --- a/programs/oleview/oleview.c +++ b/programs/oleview/oleview.c @@ -499,6 +499,7 @@ static BOOL InitApplication(HINSTANCE hInst) memset(&wc, 0, sizeof(WNDCLASSW)); wc.lpfnWndProc = WndProc; wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wc.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW); wc.lpszMenuName = MAKEINTRESOURCEW(IDM_MENU); wc.lpszClassName = wszAppName; diff --git a/programs/oleview/pane.c b/programs/oleview/pane.c index a96da4d..9e4cd28 100644 --- a/programs/oleview/pane.c +++ b/programs/oleview/pane.c @@ -135,7 +135,8 @@ BOOL PaneRegisterClassW(void) memset(&wcc, 0, sizeof(WNDCLASSW)); wcc.lpfnWndProc = PaneProc; - wcc.hbrBackground = (HBRUSH)(COLOR_WINDOW); + wcc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcc.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW); wcc.lpszClassName = wszPaneClass; if(!RegisterClassW(&wcc)) diff --git a/programs/oleview/tree.c b/programs/oleview/tree.c index 17844bf..4a16081 100644 --- a/programs/oleview/tree.c +++ b/programs/oleview/tree.c @@ -703,6 +703,8 @@ HWND CreateTreeWindow(HINSTANCE hInst) memset(&wct, 0, sizeof(WNDCLASSW)); wct.lpfnWndProc = TreeProc; wct.lpszClassName = wszTreeClass; + wct.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wct.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW); if(!RegisterClassW(&wct)) return NULL; diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c index d07dd3c..3a60348 100644 --- a/programs/oleview/typelib.c +++ b/programs/oleview/typelib.c @@ -1628,6 +1628,7 @@ BOOL TypeLibRegisterClassW(void) memset(&wcc, 0, sizeof(WNDCLASSW)); wcc.lpfnWndProc = TypeLibProc; wcc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcc.hCursor = LoadCursorW(0, (LPCWSTR)IDC_ARROW); wcc.lpszMenuName = MAKEINTRESOURCEW(IDM_TYPELIB); wcc.lpszClassName = wszTypeLib;
1
0
0
0
Dmitry Timoshkov : oleview: Fix compilation with PSDK.
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: edb35ff096db2b5c4a2c5c5188963a0947f01028 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=edb35ff096db2b5c4a2c5c518…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Oct 7 18:27:23 2015 +0800 oleview: Fix compilation with PSDK. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- programs/oleview/oleview.c | 2 +- programs/oleview/typelib.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/programs/oleview/oleview.c b/programs/oleview/oleview.c index 3a379b4..69f4f9e 100644 --- a/programs/oleview/oleview.c +++ b/programs/oleview/oleview.c @@ -422,7 +422,7 @@ static int MenuCommand(WPARAM wParam, HWND hWnd) LoadStringW(globals.hMainInst, IDS_OPEN, wszTitle, sizeof(wszTitle)/sizeof(wszTitle[0])); LoadStringW(globals.hMainInst, IDS_OPEN_FILTER_TYPELIB, filter_typelib, sizeof(filter_typelib)/sizeof(WCHAR)); LoadStringW(globals.hMainInst, IDS_OPEN_FILTER_ALL, filter_all, sizeof(filter_all)/sizeof(WCHAR)); - snprintfW( filter, MAX_PATH, filterW, filter_typelib, 0, 0, filter_all, 0, 0 ); + wsprintfW( filter, filterW, filter_typelib, 0, 0, filter_all, 0, 0 ); InitOpenFileName(hWnd, &ofn, filter, wszTitle, wszName); if(GetOpenFileNameW(&ofn)) CreateTypeLibWindow(globals.hMainInst, wszName); break; diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c index 21e9d96..d07dd3c 100644 --- a/programs/oleview/typelib.c +++ b/programs/oleview/typelib.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define NONAMELESSUNION + #include "main.h" #include "wine/debug.h"
1
0
0
0
Piotr Caban : comctl32: Don' t use uninitialized LVITEM fields in LISTVIEW_InsertItemT when LVS_EX_CHECKBOXES was specified.
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: 9c87c7e76dbb860884308c7f609fb3588d3e686d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c87c7e76dbb860884308c7f6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Oct 7 10:17:14 2015 +0200 comctl32: Don't use uninitialized LVITEM fields in LISTVIEW_InsertItemT when LVS_EX_CHECKBOXES was specified. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> --- dlls/comctl32/listview.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index c0956ad..a76935a 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -7851,10 +7851,18 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, item.iItem = nItem; if (infoPtr->dwLvExStyle & LVS_EX_CHECKBOXES) { - item.mask |= LVIF_STATE; - item.stateMask |= LVIS_STATEIMAGEMASK; - item.state &= ~LVIS_STATEIMAGEMASK; - item.state |= INDEXTOSTATEIMAGEMASK(1); + if (item.mask & LVIF_STATE) + { + item.stateMask |= LVIS_STATEIMAGEMASK; + item.state &= ~LVIS_STATEIMAGEMASK; + item.state |= INDEXTOSTATEIMAGEMASK(1); + } + else + { + item.mask |= LVIF_STATE; + item.stateMask = LVIS_STATEIMAGEMASK; + item.state = INDEXTOSTATEIMAGEMASK(1); + } } if (!set_main_item(infoPtr, &item, TRUE, isW, &has_changed)) goto undo;
1
0
0
0
Alex Henrie : comctl32: Remove redundant if (button) statements.
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: c565145b0e6b04af591662719c09c2574607df02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c565145b0e6b04af591662719…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Oct 6 21:16:24 2015 -0600 comctl32: Remove redundant if (button) statements. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> --- dlls/comctl32/toolbar.c | 151 ++++++++++++++++++++++++------------------------ 1 file changed, 74 insertions(+), 77 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index c777f5b..558bfa1 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -5536,95 +5536,92 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) nHit = TOOLBAR_InternalHitTest (infoPtr, &pt, &button); if (button) + { btnPtr = &infoPtr->buttons[nHit]; - if (button && bDragKeyPressed && (infoPtr->dwStyle & CCS_ADJUSTABLE)) - { - infoPtr->nButtonDrag = nHit; - SetCapture (infoPtr->hwndSelf); - - /* If drag cursor has not been loaded, load it. - * Note: it doesn't need to be freed */ - if (!hCursorDrag) - hCursorDrag = LoadCursorW(COMCTL32_hModule, (LPCWSTR)IDC_MOVEBUTTON); - SetCursor(hCursorDrag); - } - else if (button) - { - RECT arrowRect; - infoPtr->nOldHit = nHit; - - CopyRect(&arrowRect, &btnPtr->rect); - arrowRect.left = max(btnPtr->rect.left, btnPtr->rect.right - DDARROW_WIDTH); - - /* for EX_DRAWDDARROWS style, click must be in the drop-down arrow rect */ - if ((btnPtr->fsState & TBSTATE_ENABLED) && - ((btnPtr->fsStyle & BTNS_WHOLEDROPDOWN) || - ((btnPtr->fsStyle & BTNS_DROPDOWN) && - ((TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle) && PtInRect(&arrowRect, pt)) || - (!TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle)))))) - { - LRESULT res; + if (bDragKeyPressed && (infoPtr->dwStyle & CCS_ADJUSTABLE)) + { + infoPtr->nButtonDrag = nHit; + SetCapture (infoPtr->hwndSelf); + + /* If drag cursor has not been loaded, load it. + * Note: it doesn't need to be freed */ + if (!hCursorDrag) + hCursorDrag = LoadCursorW(COMCTL32_hModule, (LPCWSTR)IDC_MOVEBUTTON); + SetCursor(hCursorDrag); + } + else + { + RECT arrowRect; + infoPtr->nOldHit = nHit; - /* draw in pressed state */ - if (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN) - btnPtr->fsState |= TBSTATE_PRESSED; - else - btnPtr->bDropDownPressed = TRUE; - RedrawWindow(infoPtr->hwndSelf,&btnPtr->rect,0, - RDW_ERASE|RDW_INVALIDATE|RDW_UPDATENOW); - - memset(&nmtb, 0, sizeof(nmtb)); - nmtb.iItem = btnPtr->idCommand; - nmtb.rcButton = btnPtr->rect; - res = TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr, - TBN_DROPDOWN); - TRACE("TBN_DROPDOWN responded with %ld\n", res); - - if (res != TBDDRET_TREATPRESSED) + CopyRect(&arrowRect, &btnPtr->rect); + arrowRect.left = max(btnPtr->rect.left, btnPtr->rect.right - DDARROW_WIDTH); + + /* for EX_DRAWDDARROWS style, click must be in the drop-down arrow rect */ + if ((btnPtr->fsState & TBSTATE_ENABLED) && + ((btnPtr->fsStyle & BTNS_WHOLEDROPDOWN) || + ((btnPtr->fsStyle & BTNS_DROPDOWN) && + ((TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle) && PtInRect(&arrowRect, pt)) || + (!TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle)))))) { - MSG msg; + LRESULT res; - /* redraw button in unpressed state */ - if (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN) - btnPtr->fsState &= ~TBSTATE_PRESSED; - else - btnPtr->bDropDownPressed = FALSE; - InvalidateRect(infoPtr->hwndSelf, &btnPtr->rect, TRUE); + /* draw in pressed state */ + if (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN) + btnPtr->fsState |= TBSTATE_PRESSED; + else + btnPtr->bDropDownPressed = TRUE; + RedrawWindow(infoPtr->hwndSelf, &btnPtr->rect, 0, RDW_ERASE|RDW_INVALIDATE|RDW_UPDATENOW); - /* find and set hot item */ - GetCursorPos(&pt); - ScreenToClient(infoPtr->hwndSelf, &pt); - nHit = TOOLBAR_InternalHitTest(infoPtr, &pt, &button); - if (!infoPtr->bAnchor || button) - TOOLBAR_SetHotItemEx(infoPtr, button ? nHit : TOOLBAR_NOWHERE, HICF_MOUSE | HICF_LMOUSE); - - /* remove any left mouse button down or double-click messages - * so that we can get a toggle effect on the button */ - while (PeekMessageW(&msg, infoPtr->hwndSelf, WM_LBUTTONDOWN, WM_LBUTTONDOWN, PM_REMOVE) || - PeekMessageW(&msg, infoPtr->hwndSelf, WM_LBUTTONDBLCLK, WM_LBUTTONDBLCLK, PM_REMOVE)) - ; + memset(&nmtb, 0, sizeof(nmtb)); + nmtb.iItem = btnPtr->idCommand; + nmtb.rcButton = btnPtr->rect; + res = TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr, TBN_DROPDOWN); + TRACE("TBN_DROPDOWN responded with %ld\n", res); - return 0; + if (res != TBDDRET_TREATPRESSED) + { + MSG msg; + + /* redraw button in unpressed state */ + if (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN) + btnPtr->fsState &= ~TBSTATE_PRESSED; + else + btnPtr->bDropDownPressed = FALSE; + InvalidateRect(infoPtr->hwndSelf, &btnPtr->rect, TRUE); + + /* find and set hot item */ + GetCursorPos(&pt); + ScreenToClient(infoPtr->hwndSelf, &pt); + nHit = TOOLBAR_InternalHitTest(infoPtr, &pt, &button); + if (!infoPtr->bAnchor || button) + TOOLBAR_SetHotItemEx(infoPtr, nHit, HICF_MOUSE | HICF_LMOUSE); + + /* remove any left mouse button down or double-click messages + * so that we can get a toggle effect on the button */ + while (PeekMessageW(&msg, infoPtr->hwndSelf, WM_LBUTTONDOWN, WM_LBUTTONDOWN, PM_REMOVE) || + PeekMessageW(&msg, infoPtr->hwndSelf, WM_LBUTTONDBLCLK, WM_LBUTTONDBLCLK, PM_REMOVE)) + ; + + return 0; + } + /* otherwise drop through and process as pushed */ } - /* otherwise drop through and process as pushed */ - } - infoPtr->bCaptured = TRUE; - infoPtr->nButtonDown = nHit; - infoPtr->bDragOutSent = FALSE; + infoPtr->bCaptured = TRUE; + infoPtr->nButtonDown = nHit; + infoPtr->bDragOutSent = FALSE; - btnPtr->fsState |= TBSTATE_PRESSED; + btnPtr->fsState |= TBSTATE_PRESSED; - TOOLBAR_SetHotItemEx(infoPtr, button ? nHit : TOOLBAR_NOWHERE, HICF_MOUSE | HICF_LMOUSE); + TOOLBAR_SetHotItemEx(infoPtr, nHit, HICF_MOUSE | HICF_LMOUSE); - if (btnPtr->fsState & TBSTATE_ENABLED) - InvalidateRect(infoPtr->hwndSelf, &btnPtr->rect, TRUE); - UpdateWindow(infoPtr->hwndSelf); - SetCapture (infoPtr->hwndSelf); - } + if (btnPtr->fsState & TBSTATE_ENABLED) + InvalidateRect(infoPtr->hwndSelf, &btnPtr->rect, TRUE); + UpdateWindow(infoPtr->hwndSelf); + SetCapture (infoPtr->hwndSelf); + } - if (button) - { memset(&nmtb, 0, sizeof(nmtb)); nmtb.iItem = btnPtr->idCommand; TOOLBAR_SendNotify((NMHDR *)&nmtb, infoPtr, TBN_BEGINDRAG);
1
0
0
0
Alex Henrie : advapi32: Remove always-true if statements from RegEnumValue [AW].
by Alexandre Julliard
07 Oct '15
07 Oct '15
Module: wine Branch: master Commit: 18b7ec94796ed09bef5337e0b02ea374d86de262 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=18b7ec94796ed09bef5337e0b…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Tue Oct 6 21:06:23 2015 -0600 advapi32: Remove always-true if statements from RegEnumValue[AW]. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/advapi32/registry.c | 164 ++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 88 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index f988c0e..4820b33 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -1940,53 +1940,45 @@ LSTATUS WINAPI RegEnumValueW( HKEY hkey, DWORD index, LPWSTR value, LPDWORD val_ status = NtEnumerateValueKey( hkey, index, KeyValueFullInformation, buffer, total_size, &total_size ); - if (status && status != STATUS_BUFFER_OVERFLOW) goto done; - if (value || data) + /* retry with a dynamically allocated buffer */ + while (status == STATUS_BUFFER_OVERFLOW) { - /* retry with a dynamically allocated buffer */ - while (status == STATUS_BUFFER_OVERFLOW) - { - if (buf_ptr != buffer) heap_free( buf_ptr ); - if (!(buf_ptr = heap_alloc( total_size ))) - return ERROR_NOT_ENOUGH_MEMORY; - info = (KEY_VALUE_FULL_INFORMATION *)buf_ptr; - status = NtEnumerateValueKey( hkey, index, KeyValueFullInformation, - buf_ptr, total_size, &total_size ); - } + if (buf_ptr != buffer) heap_free( buf_ptr ); + if (!(buf_ptr = heap_alloc( total_size ))) + return ERROR_NOT_ENOUGH_MEMORY; + info = (KEY_VALUE_FULL_INFORMATION *)buf_ptr; + status = NtEnumerateValueKey( hkey, index, KeyValueFullInformation, + buf_ptr, total_size, &total_size ); + } - if (status) goto done; + if (status) goto done; - if (value) + if (info->NameLength/sizeof(WCHAR) >= *val_count) + { + status = STATUS_BUFFER_OVERFLOW; + goto overflow; + } + memcpy( value, info->Name, info->NameLength ); + *val_count = info->NameLength / sizeof(WCHAR); + value[*val_count] = 0; + + if (data) + { + if (total_size - info->DataOffset > *count) { - if (info->NameLength/sizeof(WCHAR) >= *val_count) - { - status = STATUS_BUFFER_OVERFLOW; - goto overflow; - } - memcpy( value, info->Name, info->NameLength ); - *val_count = info->NameLength / sizeof(WCHAR); - value[*val_count] = 0; + status = STATUS_BUFFER_OVERFLOW; + goto overflow; } - - if (data) + memcpy( data, buf_ptr + info->DataOffset, total_size - info->DataOffset ); + if (total_size - info->DataOffset <= *count-sizeof(WCHAR) && is_string(info->Type)) { - if (total_size - info->DataOffset > *count) - { - status = STATUS_BUFFER_OVERFLOW; - goto overflow; - } - memcpy( data, buf_ptr + info->DataOffset, total_size - info->DataOffset ); - if (total_size - info->DataOffset <= *count-sizeof(WCHAR) && is_string(info->Type)) - { - /* if the type is REG_SZ and data is not 0-terminated - * and there is enough space in the buffer NT appends a \0 */ - WCHAR *ptr = (WCHAR *)(data + total_size - info->DataOffset); - if (ptr > (WCHAR *)data && ptr[-1]) *ptr = 0; - } + /* if the type is REG_SZ and data is not 0-terminated + * and there is enough space in the buffer NT appends a \0 */ + WCHAR *ptr = (WCHAR *)(data + total_size - info->DataOffset); + if (ptr > (WCHAR *)data && ptr[-1]) *ptr = 0; } } - else status = STATUS_SUCCESS; overflow: if (type) *type = info->Type; @@ -2025,74 +2017,70 @@ LSTATUS WINAPI RegEnumValueA( HKEY hkey, DWORD index, LPSTR value, LPDWORD val_c status = NtEnumerateValueKey( hkey, index, KeyValueFullInformation, buffer, total_size, &total_size ); - if (status && status != STATUS_BUFFER_OVERFLOW) goto done; /* we need to fetch the contents for a string type even if not requested, * because we need to compute the length of the ASCII string. */ - if (value || data || is_string(info->Type)) + + /* retry with a dynamically allocated buffer */ + while (status == STATUS_BUFFER_OVERFLOW) { - /* retry with a dynamically allocated buffer */ - while (status == STATUS_BUFFER_OVERFLOW) - { - if (buf_ptr != buffer) heap_free( buf_ptr ); - if (!(buf_ptr = heap_alloc( total_size ))) - return ERROR_NOT_ENOUGH_MEMORY; - info = (KEY_VALUE_FULL_INFORMATION *)buf_ptr; - status = NtEnumerateValueKey( hkey, index, KeyValueFullInformation, - buf_ptr, total_size, &total_size ); - } + if (buf_ptr != buffer) heap_free( buf_ptr ); + if (!(buf_ptr = heap_alloc( total_size ))) + return ERROR_NOT_ENOUGH_MEMORY; + info = (KEY_VALUE_FULL_INFORMATION *)buf_ptr; + status = NtEnumerateValueKey( hkey, index, KeyValueFullInformation, + buf_ptr, total_size, &total_size ); + } - if (status) goto done; + if (status) goto done; - if (is_string(info->Type)) + if (is_string(info->Type)) + { + DWORD len; + RtlUnicodeToMultiByteSize( &len, (WCHAR *)(buf_ptr + info->DataOffset), + total_size - info->DataOffset ); + if (data && len) { - DWORD len; - RtlUnicodeToMultiByteSize( &len, (WCHAR *)(buf_ptr + info->DataOffset), - total_size - info->DataOffset ); - if (data && len) + if (len > *count) status = STATUS_BUFFER_OVERFLOW; + else { - if (len > *count) status = STATUS_BUFFER_OVERFLOW; - else - { - RtlUnicodeToMultiByteN( (char*)data, len, NULL, (WCHAR *)(buf_ptr + info->DataOffset), - total_size - info->DataOffset ); - /* if the type is REG_SZ and data is not 0-terminated - * and there is enough space in the buffer NT appends a \0 */ - if (len < *count && data[len-1]) data[len] = 0; - } + RtlUnicodeToMultiByteN( (char*)data, len, NULL, (WCHAR *)(buf_ptr + info->DataOffset), + total_size - info->DataOffset ); + /* if the type is REG_SZ and data is not 0-terminated + * and there is enough space in the buffer NT appends a \0 */ + if (len < *count && data[len-1]) data[len] = 0; } - info->DataLength = len; - } - else if (data) - { - if (total_size - info->DataOffset > *count) status = STATUS_BUFFER_OVERFLOW; - else memcpy( data, buf_ptr + info->DataOffset, total_size - info->DataOffset ); } + info->DataLength = len; + } + else if (data) + { + if (total_size - info->DataOffset > *count) status = STATUS_BUFFER_OVERFLOW; + else memcpy( data, buf_ptr + info->DataOffset, total_size - info->DataOffset ); + } - if (value && !status) - { - DWORD len; + if (!status) + { + DWORD len; - RtlUnicodeToMultiByteSize( &len, info->Name, info->NameLength ); - if (len >= *val_count) - { - status = STATUS_BUFFER_OVERFLOW; - if (*val_count) - { - len = *val_count - 1; - RtlUnicodeToMultiByteN( value, len, NULL, info->Name, info->NameLength ); - value[len] = 0; - } - } - else + RtlUnicodeToMultiByteSize( &len, info->Name, info->NameLength ); + if (len >= *val_count) + { + status = STATUS_BUFFER_OVERFLOW; + if (*val_count) { + len = *val_count - 1; RtlUnicodeToMultiByteN( value, len, NULL, info->Name, info->NameLength ); value[len] = 0; - *val_count = len; } } + else + { + RtlUnicodeToMultiByteN( value, len, NULL, info->Name, info->NameLength ); + value[len] = 0; + *val_count = len; + } } - else status = STATUS_SUCCESS; if (type) *type = info->Type; if (count) *count = info->DataLength;
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
75
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
Results per page:
10
25
50
100
200