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
January 2013
----- 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
736 discussions
Start a n
N
ew thread
Rico Schüller : d3dx9: Introduce a function for filling a texture.
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: 275f784009308fbaed9db38a1462914cfd201f02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=275f784009308fbaed9db38a1…
Author: Rico Schüller <kgbricola(a)web.de> Date: Thu Jan 10 17:57:16 2013 +0100 d3dx9: Introduce a function for filling a texture. --- dlls/d3dx9_36/texture.c | 159 +++++++++++++++-------------------------------- 1 files changed, 51 insertions(+), 108 deletions(-) diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index 788a572..2531ea6 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -1206,18 +1206,57 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *devic return D3D_OK; } +static inline void fill_texture(const struct pixel_format_desc *format, BYTE *pos, const D3DXVECTOR4 *value) +{ + DWORD c; + + for (c = 0; c < format->bytes_per_pixel; c++) + pos[c] = 0; + + for (c = 0; c < 4; c++) + { + float comp_value; + DWORD i, v; + + switch (c) + { + case 0: /* Alpha */ + comp_value = value->w; + break; + case 1: /* Red */ + comp_value = value->x; + break; + case 2: /* Green */ + comp_value = value->y; + break; + case 3: /* Blue */ + comp_value = value->z; + break; + } + + v = comp_value * ((1 << format->bits[c]) - 1) + 0.5f; + + for (i = 0; i < format->bits[c] + format->shift[c]; i += 8) + { + BYTE byte, mask; + + mask = ((1 << format->bits[c]) - 1) << format->shift[c] >> i; + byte = (v << format->shift[c] >> i) & mask; + pos[i / 8] |= byte; + } + } +} + HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D function, void *funcdata) { DWORD miplevels; - DWORD m, i, x, y, c, v; + DWORD m, x, y; D3DSURFACE_DESC desc; D3DLOCKED_RECT lock_rect; D3DXVECTOR4 value; D3DXVECTOR2 coord, size; const struct pixel_format_desc *format; - BYTE *data, *pos; - BYTE byte, mask; - float comp_value; + BYTE *data; if (texture == NULL || function == NULL) return D3DERR_INVALIDCALL; @@ -1256,38 +1295,7 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f function(&value, &coord, &size, funcdata); - pos = data + y * lock_rect.Pitch + x * format->bytes_per_pixel; - - for (i = 0; i < format->bytes_per_pixel; i++) - pos[i] = 0; - - for (c = 0; c < 4; c++) - { - switch (c) - { - case 0: /* Alpha */ - comp_value = value.w; - break; - case 1: /* Red */ - comp_value = value.x; - break; - case 2: /* Green */ - comp_value = value.y; - break; - case 3: /* Blue */ - comp_value = value.z; - break; - } - - v = comp_value * ((1 << format->bits[c]) - 1) + 0.5f; - - for (i = 0; i < format->bits[c] + format->shift[c]; i += 8) - { - mask = ((1 << format->bits[c]) - 1) << format->shift[c] >> i; - byte = (v << format->shift[c] >> i) & mask; - pos[i / 8] |= byte; - } - } + fill_texture(format, data + y * lock_rect.Pitch + x * format->bytes_per_pixel, &value); } } IDirect3DTexture9_UnlockRect(texture, m); @@ -1600,15 +1608,13 @@ static float get_cube_coord(enum cube_coord coord, unsigned int x, unsigned int HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DXFILL3D function, void *funcdata) { DWORD miplevels; - DWORD m, i, x, y, c, f, v; + DWORD m, x, y, f; D3DSURFACE_DESC desc; D3DLOCKED_RECT lock_rect; D3DXVECTOR4 value; D3DXVECTOR3 coord, size; const struct pixel_format_desc *format; - BYTE *data, *pos; - BYTE byte, mask; - float comp_value; + BYTE *data; static const enum cube_coord coordmap[6][3] = { {ONE, YCOORDINV, XCOORDINV}, @@ -1657,38 +1663,7 @@ HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DX function(&value, &coord, &size, funcdata); - pos = data + y * lock_rect.Pitch + x * format->bytes_per_pixel; - - for (i = 0; i < format->bytes_per_pixel; i++) - pos[i] = 0; - - for (c = 0; c < 4; c++) - { - switch (c) - { - case 0: /* Alpha */ - comp_value = value.w; - break; - case 1: /* Red */ - comp_value = value.x; - break; - case 2: /* Green */ - comp_value = value.y; - break; - case 3: /* Blue */ - comp_value = value.z; - break; - } - - v = comp_value * ((1 << format->bits[c]) - 1) + 0.5f; - - for (i = 0; i < format->bits[c] + format->shift[c]; i += 8) - { - mask = ((1 << format->bits[c]) - 1) << format->shift[c] >> i; - byte = (v << format->shift[c] >> i) & mask; - pos[i / 8] |= byte; - } - } + fill_texture(format, data + y * lock_rect.Pitch + x * format->bytes_per_pixel, &value); } } IDirect3DCubeTexture9_UnlockRect(texture, f, m); @@ -1701,15 +1676,13 @@ HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DX HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *texture, LPD3DXFILL3D function, void *funcdata) { DWORD miplevels; - DWORD m, i, x, y, z, c, v; + DWORD m, x, y, z; D3DVOLUME_DESC desc; D3DLOCKED_BOX lock_box; D3DXVECTOR4 value; D3DXVECTOR3 coord, size; const struct pixel_format_desc *format; - BYTE *data, *pos; - BYTE byte, mask; - float comp_value; + BYTE *data; if (texture == NULL || function == NULL) return D3DERR_INVALIDCALL; @@ -1753,38 +1726,8 @@ HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *texture, LP function(&value, &coord, &size, funcdata); - pos = data + z * lock_box.SlicePitch + y * lock_box.RowPitch + x * format->bytes_per_pixel; - - for (i = 0; i < format->bytes_per_pixel; i++) - pos[i] = 0; - - for (c = 0; c < 4; c++) - { - switch (c) - { - case 0: /* Alpha */ - comp_value = value.w; - break; - case 1: /* Red */ - comp_value = value.x; - break; - case 2: /* Green */ - comp_value = value.y; - break; - case 3: /* Blue */ - comp_value = value.z; - break; - } - - v = comp_value * ((1 << format->bits[c]) - 1) + 0.5f; - - for (i = 0; i < format->bits[c] + format->shift[c]; i += 8) - { - mask = ((1 << format->bits[c]) - 1) << format->shift[c] >> i; - byte = (v << format->shift[c] >> i) & mask; - pos[i / 8] |= byte; - } - } + fill_texture(format, data + z * lock_box.SlicePitch + y * lock_box.RowPitch + + x * format->bytes_per_pixel, &value); } } }
1
0
0
0
Marcus Meissner : comctl32: Initialize SYSTEMTIME structs (Coverity).
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: 1fe4af293cc496fc1aaf337e74e997d483021d57 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1fe4af293cc496fc1aaf337e7…
Author: Marcus Meissner <meissner(a)suse.de> Date: Wed Jan 9 02:42:13 2013 +0100 comctl32: Initialize SYSTEMTIME structs (Coverity). --- dlls/comctl32/tests/monthcal.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index c7fd1e5..0cd064f 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -1368,10 +1368,8 @@ static void test_monthrange(void) hwnd = create_monthcal_control(0); - st_visible[0].wYear = 0; - st_visible[0].wMonth = 0; - st_visible[0].wDay = 0; - st_daystate[1] = st_daystate[0] = st_visible[1] = st_visible[0]; + memset(&st_visible, 0, sizeof(st_visible)); + memset(&st_daystate, 0, sizeof(st_daystate)); st.wYear = 2000; st.wMonth = 11;
1
0
0
0
Marcus Meissner : crypt32: Free the encoded msg (Coverity).
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: ee1f4164096ece5203b6a8ed64b331decbb931f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee1f4164096ece5203b6a8ed6…
Author: Marcus Meissner <meissner(a)suse.de> Date: Wed Jan 9 02:42:15 2013 +0100 crypt32: Free the encoded msg (Coverity). --- dlls/crypt32/msg.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 3e00a89..25204ea 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -1450,6 +1450,7 @@ static HCRYPTMSG CSignedEncodeMsg_Open(DWORD dwFlags, if (!ret) { CSignedEncodeMsg_Close(msg); + CryptMemFree(msg); msg = NULL; } }
1
0
0
0
Austin English : wine.inf: Add HKLM, System\CurrentControlSet\Control\TimeZoneInformation\{StandardName, TimeZoneKeyName} registry keys.
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: 0546c551f17fda52e4d60dbb1a8af3535fa68212 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0546c551f17fda52e4d60dbb1…
Author: Austin English <austinenglish(a)gmail.com> Date: Tue Jan 8 20:33:33 2013 -0800 wine.inf: Add HKLM, System\CurrentControlSet\Control\TimeZoneInformation\{StandardName, TimeZoneKeyName} registry keys. --- tools/wine.inf.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/wine.inf.in b/tools/wine.inf.in index 9d0650f..e7cc5c7 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -639,6 +639,8 @@ HKLM,Software\Microsoft\Transaction Server,,16 HKLM,Software\Policies,,16 HKLM,Software\Registered Applications,,16 HKLM,System\CurrentControlSet\Control\Lsa,,16 +HKLM,System\CurrentControlSet\Control\TimeZoneInformation,"StandardName",2,"" +HKLM,System\CurrentControlSet\Control\TimeZoneInformation,"TimeZoneKeyName",2,"" HKLM,System\CurrentControlSet\Control\VirtualDeviceDrivers,,16 HKLM,System\CurrentControlSet\Control\VMM32Files,,16 HKCU,AppEvents\Schemes\Apps\Explorer\Navigating\.Current,,,""
1
0
0
0
Alexandre Julliard : configure: Try readelf before ldd to determine a library soname.
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: 0874734ecbd6d137705f5322482ba5e17416eeb6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0874734ecbd6d137705f53224…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 10 17:52:11 2013 +0100 configure: Try readelf before ldd to determine a library soname. --- aclocal.m4 | 14 ++- configure | 272 ++++++++++++++++++++++++++++++++++++++++++++++++++------- configure.ac | 2 +- 3 files changed, 248 insertions(+), 40 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0874734ecbd6d137705f5…
1
0
0
0
Jacek Caban : mshtml: Added support for non-integer values in get_nsstyle_pixel_val.
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: b93e29f0ee0006e4469782db740f20cdae6b5be2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b93e29f0ee0006e4469782db7…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jan 10 14:20:16 2013 +0100 mshtml: Added support for non-integer values in get_nsstyle_pixel_val. --- dlls/mshtml/htmlstyle.c | 7 ++++++- dlls/mshtml/tests/style.c | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 2cf252d..8d3148c 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -664,9 +664,14 @@ static HRESULT get_nsstyle_pixel_val(HTMLStyle *This, styleid_t sid, LONG *p) if(value) { *p = strtolW(value, &ptr, 10); + if(*ptr == '.') { + /* Skip all digits. We have tests showing that we should not round the value. */ + while(isdigitW(*++ptr)); + } + if(*ptr && strcmpW(ptr, pxW)) { nsAString_Finish(&str_value); - FIXME("only px values are currently supported\n"); + FIXME("%s: only px values are currently supported\n", debugstr_w(value)); hres = E_NOTIMPL; } }else { diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 8ec69a6..3e2ef89 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -961,6 +961,17 @@ static void test_body_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = a2bstr("4.99"); + hres = IHTMLStyle_put_left(style, v); + ok(hres == S_OK, "put_left failed: %08x\n", hres); + VariantClear(&v); + + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelLeft(style, &l); + ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres); + ok(l == 4, "pixelLeft = %d\n", l); + V_VT(&v) = VT_NULL; hres = IHTMLStyle_put_left(style, v); ok(hres == S_OK, "put_left failed: %08x\n", hres);
1
0
0
0
Nikolay Sivov : comctl32/listview: Use LVM_SETITEMSTATE directly in tests.
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: 7bb36372c8ffaff8a3032c7771a512a3a0f93bfe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7bb36372c8ffaff8a3032c777…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Jan 10 16:45:44 2013 +0400 comctl32/listview: Use LVM_SETITEMSTATE directly in tests. --- dlls/comctl32/tests/listview.c | 36 +++++++++++++++++++++++++----------- 1 files changed, 25 insertions(+), 11 deletions(-) diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 161278c..583645d 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -2145,24 +2145,29 @@ static void test_multiselect(void) hwnd = create_listview_control(LVS_REPORT); - for (i=0;i<items;i++) { - insert_item(hwnd, 0); - } + for (i = 0; i < items; i++) + insert_item(hwnd, 0); item_count = (int)SendMessage(hwnd, LVM_GETITEMCOUNT, 0, 0); + expect(items, item_count); - expect(items,item_count); + for (i = 0; i < 4; i++) { + LVITEMA item; - for (i=0;i<4;i++) { task = task_list[i]; /* deselect all items */ - ListView_SetItemState(hwnd, -1, 0, LVIS_SELECTED); + item.state = 0; + item.stateMask = LVIS_SELECTED; + SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); SendMessage(hwnd, LVM_SETSELECTIONMARK, 0, -1); /* set initial position */ SendMessage(hwnd, LVM_SETSELECTIONMARK, 0, (task.initPos == -1 ? item_count -1 : task.initPos)); - ListView_SetItemState(hwnd,(task.initPos == -1 ? item_count -1 : task.initPos),LVIS_SELECTED ,LVIS_SELECTED); + + item.state = LVIS_SELECTED; + item.stateMask = LVIS_SELECTED; + SendMessageA(hwnd, LVM_SETITEMSTATE, task.initPos == -1 ? item_count-1 : task.initPos, (LPARAM)&item); selected_count = (int)SendMessage(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); @@ -2204,7 +2209,9 @@ static void test_multiselect(void) expect(FALSE, r); /* select all, check notifications */ - ListView_SetItemState(hwnd, -1, 0, LVIS_SELECTED); + item.state = 0; + item.stateMask = LVIS_SELECTED; + SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); flush_sequences(sequences, NUM_MSG_SEQUENCES); @@ -2217,10 +2224,15 @@ static void test_multiselect(void) "select all notification", FALSE); /* deselect all items */ - ListView_SetItemState(hwnd, -1, 0, LVIS_SELECTED); + item.state = 0; + item.stateMask = LVIS_SELECTED; + SendMessageA(hwnd, LVM_SETITEMSTATE, -1, (LPARAM)&item); + SendMessage(hwnd, LVM_SETSELECTIONMARK, 0, -1); for (i=0;i<3;i++) { - ListView_SetItemState(hwnd, i, LVIS_SELECTED, LVIS_SELECTED); + item.state = LVIS_SELECTED; + item.stateMask = LVIS_SELECTED; + SendMessageA(hwnd, LVM_SETITEMSTATE, i, (LPARAM)&item); } r = SendMessage(hwnd, LVM_GETSELECTEDCOUNT, 0, 0); @@ -2245,7 +2257,9 @@ static void test_multiselect(void) expect(3, r); /* select one more */ - ListView_SetItemState(hwnd, 3, LVIS_SELECTED, LVIS_SELECTED); + item.state = LVIS_SELECTED; + item.stateMask = LVIS_SELECTED; + SendMessageA(hwnd, LVM_SETITEMSTATE, 3, (LPARAM)&item); for (i=0;i<3;i++) { r = ListView_GetItemState(hwnd, i, LVIS_SELECTED);
1
0
0
0
Nikolay Sivov : comctl32/listview: Fix focus index update when item is deleted.
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: 6227bbcff79cd03a6775ac72436c1ea2f5c81694 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6227bbcff79cd03a6775ac724…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Jan 10 16:34:41 2013 +0400 comctl32/listview: Fix focus index update when item is deleted. --- dlls/comctl32/listview.c | 32 ++++++++++++++----- dlls/comctl32/tests/listview.c | 69 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 8 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 2c953ad..49c326a 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -3447,7 +3447,6 @@ static inline BOOL LISTVIEW_SetItemFocus(LISTVIEW_INFO *infoPtr, INT nItem) return oldFocus != infoPtr->nFocusedItem; } -/* Helper function for LISTVIEW_ShiftIndices *only* */ static INT shift_item(const LISTVIEW_INFO *infoPtr, INT nShiftItem, INT nItem, INT direction) { if (nShiftItem < nItem) return nShiftItem; @@ -3459,6 +3458,24 @@ static INT shift_item(const LISTVIEW_INFO *infoPtr, INT nShiftItem, INT nItem, I return min(nShiftItem, infoPtr->nItemCount - 1); } +/* This function updates focus index. + +Parameters: + focus : current focus index + item : index of item to be added/removed + direction : add/remove flag +*/ +static void LISTVIEW_ShiftFocus(LISTVIEW_INFO *infoPtr, INT focus, INT item, INT direction) +{ + BOOL old_change = infoPtr->bDoChangeNotify; + + infoPtr->bDoChangeNotify = FALSE; + focus = shift_item(infoPtr, focus, item, direction); + if (focus != infoPtr->nFocusedItem) + LISTVIEW_SetItemFocus(infoPtr, focus); + infoPtr->bDoChangeNotify = old_change; +} + /** * DESCRIPTION: * Updates the various indices after an item has been inserted or deleted. @@ -3473,24 +3490,19 @@ static INT shift_item(const LISTVIEW_INFO *infoPtr, INT nShiftItem, INT nItem, I */ static void LISTVIEW_ShiftIndices(LISTVIEW_INFO *infoPtr, INT nItem, INT direction) { - INT nNewFocus; BOOL bOldChange; /* temporarily disable change notification while shifting items */ bOldChange = infoPtr->bDoChangeNotify; infoPtr->bDoChangeNotify = FALSE; - TRACE("Shifting %iu, %i steps\n", nItem, direction); + TRACE("Shifting %i, %i steps\n", nItem, direction); ranges_shift(infoPtr->selectionRanges, nItem, direction, infoPtr->nItemCount); assert(abs(direction) == 1); infoPtr->nSelectionMark = shift_item(infoPtr, infoPtr->nSelectionMark, nItem, direction); - - nNewFocus = shift_item(infoPtr, infoPtr->nFocusedItem, nItem, direction); - if (nNewFocus != infoPtr->nFocusedItem) - LISTVIEW_SetItemFocus(infoPtr, nNewFocus); /* But we are not supposed to modify nHotItem! */ @@ -5664,6 +5676,7 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) { LVITEMW item; const BOOL is_icon = (infoPtr->uView == LV_VIEW_SMALLICON || infoPtr->uView == LV_VIEW_ICON); + INT focus = infoPtr->nFocusedItem; TRACE("(nItem=%d)\n", nItem); @@ -5673,7 +5686,7 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) item.state = 0; item.stateMask = LVIS_SELECTED | LVIS_FOCUSED; LISTVIEW_SetItemState(infoPtr, nItem, &item); - + /* send LVN_DELETEITEM notification. */ if (!notify_deleteitem(infoPtr, nItem)) return FALSE; @@ -5714,6 +5727,7 @@ static BOOL LISTVIEW_DeleteItem(LISTVIEW_INFO *infoPtr, INT nItem) infoPtr->nItemCount--; LISTVIEW_ShiftIndices(infoPtr, nItem, -1); + LISTVIEW_ShiftFocus(infoPtr, focus, nItem, -1); /* now is the invalidation fun */ if (!is_icon) @@ -7721,6 +7735,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, /* shift indices first so they don't get tangled */ LISTVIEW_ShiftIndices(infoPtr, nItem, 1); + LISTVIEW_ShiftFocus(infoPtr, infoPtr->nFocusedItem, nItem, 1); /* set the item attributes */ if (lpLVItem->mask & (LVIF_GROUPID|LVIF_COLUMNS)) @@ -7787,6 +7802,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, undo: LISTVIEW_ShiftIndices(infoPtr, nItem, -1); + LISTVIEW_ShiftFocus(infoPtr, infoPtr->nFocusedItem, nItem, -1); DPA_DeletePtr(infoPtr->hdpaItems, nItem); infoPtr->nItemCount--; fail: diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index 01b90ae..161278c 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -63,6 +63,8 @@ static LVITEMA g_itema; static BOOL g_disp_A_to_W; /* dispinfo data sent with LVN_LVN_ENDLABELEDIT */ static NMLVDISPINFO g_editbox_disp_info; +/* when this is set focus will be tested on LVN_DELETEITEM */ +static BOOL g_focus_test_LVN_DELETEITEM; static HWND subclass_editbox(HWND hwndListview); @@ -454,6 +456,16 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP "buffer size %d\n", dispinfo->item.cchTextMax); } break; + case LVN_DELETEITEM: + if (g_focus_test_LVN_DELETEITEM) + { + NMLISTVIEW *nmlv = (NMLISTVIEW*)lParam; + UINT state; + + state = SendMessageA(((NMHDR*)lParam)->hwndFrom, LVM_GETITEMSTATE, nmlv->iItem, LVIS_FOCUSED); + ok(state == 0, "got state %x\n", state); + } + break; case NM_HOVER: if (g_block_hover) return 1; break; @@ -5291,6 +5303,61 @@ static void test_imagelists(void) DestroyWindow(hwnd); } +static void test_deleteitem(void) +{ + LVITEMA item; + UINT state; + HWND hwnd; + BOOL ret; + + hwnd = create_listview_control(LVS_REPORT); + + insert_item(hwnd, 0); + insert_item(hwnd, 0); + insert_item(hwnd, 0); + insert_item(hwnd, 0); + insert_item(hwnd, 0); + + g_focus_test_LVN_DELETEITEM = TRUE; + + /* delete focused item (not the last index) */ + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + ret = SendMessageA(hwnd, LVM_SETITEMSTATE, 2, (LPARAM)&item); + ok(ret == TRUE, "got %d\n", ret); + ret = SendMessageA(hwnd, LVM_DELETEITEM, 2, 0); + ok(ret == TRUE, "got %d\n", ret); + /* next item gets focus */ + state = SendMessageA(hwnd, LVM_GETITEMSTATE, 2, LVIS_FOCUSED); + ok(state == LVIS_FOCUSED, "got %x\n", state); + + /* focus last item and delete it */ + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + ret = SendMessageA(hwnd, LVM_SETITEMSTATE, 3, (LPARAM)&item); + ok(ret == TRUE, "got %d\n", ret); + ret = SendMessageA(hwnd, LVM_DELETEITEM, 3, 0); + ok(ret == TRUE, "got %d\n", ret); + /* new last item gets focus */ + state = SendMessageA(hwnd, LVM_GETITEMSTATE, 2, LVIS_FOCUSED); + ok(state == LVIS_FOCUSED, "got %x\n", state); + + /* focus first item and delete it */ + item.stateMask = LVIS_FOCUSED; + item.state = LVIS_FOCUSED; + ret = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item); + ok(ret == TRUE, "got %d\n", ret); + ret = SendMessageA(hwnd, LVM_DELETEITEM, 0, 0); + ok(ret == TRUE, "got %d\n", ret); + /* new first item gets focus */ + state = SendMessageA(hwnd, LVM_GETITEMSTATE, 0, LVIS_FOCUSED); + ok(state == LVIS_FOCUSED, "got %x\n", state); + + g_focus_test_LVN_DELETEITEM = FALSE; + + DestroyWindow(hwnd); +} + START_TEST(listview) { HMODULE hComctl32; @@ -5358,6 +5425,7 @@ START_TEST(listview) test_dispinfo(); test_LVM_SETITEMTEXT(); test_imagelists(); + test_deleteitem(); if (!load_v6_module(&ctx_cookie, &hCtx)) { @@ -5387,6 +5455,7 @@ START_TEST(listview) test_scrollnotify(); test_LVS_EX_TRANSPARENTBKGND(); test_LVS_EX_HEADERINALLVIEWS(); + test_deleteitem(); unload_v6_module(ctx_cookie, hCtx);
1
0
0
0
Jacek Caban : atl100: Added AtlWaitWithMessageLoop implementation.
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: 0c67e653c0265803c3abd3bcb4bdb1316a9b70d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c67e653c0265803c3abd3bcb…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jan 10 13:27:05 2013 +0100 atl100: Added AtlWaitWithMessageLoop implementation. --- dlls/atl/atl.spec | 2 +- dlls/atl100/atl.c | 28 ++++++++++++++++++++++++++++ dlls/atl100/atl100.spec | 2 +- dlls/atl80/atl80.spec | 2 +- include/atlbase.h | 1 + 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/dlls/atl/atl.spec b/dlls/atl/atl.spec index 47ed135..cb071f5 100644 --- a/dlls/atl/atl.spec +++ b/dlls/atl/atl.spec @@ -16,7 +16,7 @@ 21 stdcall AtlModuleTerm(ptr) 22 stdcall AtlModuleUnregisterServer(ptr ptr) 23 stdcall AtlModuleUpdateRegistryFromResourceD(ptr wstr long ptr ptr) -24 stub AtlWaitWithMessageLoop +24 stdcall AtlWaitWithMessageLoop(long) atl100.AtlWaitWithMessageLoop 25 stub AtlSetErrorInfo 26 stdcall AtlCreateTargetDC(long ptr) atl100.AtlCreateTargetDC 27 stdcall AtlHiMetricToPixel(ptr ptr) atl100.AtlHiMetricToPixel diff --git a/dlls/atl100/atl.c b/dlls/atl100/atl.c index 61477ae..099513a 100644 --- a/dlls/atl100/atl.c +++ b/dlls/atl100/atl.c @@ -518,6 +518,34 @@ HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID clsid, const struct _AT } /*********************************************************************** + * AtlWaitWithMessageLoop [atl100.24] + */ +BOOL WINAPI AtlWaitWithMessageLoop(HANDLE handle) +{ + MSG msg; + DWORD res; + + TRACE("(%p)\n", handle); + + while(1) { + res = MsgWaitForMultipleObjects(1, &handle, FALSE, INFINITE, QS_ALLINPUT); + switch(res) { + case WAIT_OBJECT_0: + return TRUE; + case WAIT_OBJECT_0+1: + if(GetMessageW(&msg, NULL, 0, 0) < 0) + return FALSE; + + TranslateMessage(&msg); + DispatchMessageW(&msg); + break; + default: + return FALSE; + } + } +} + +/*********************************************************************** * AtlGetVersion [atl100.@] */ DWORD WINAPI AtlGetVersion(void *pReserved) diff --git a/dlls/atl100/atl100.spec b/dlls/atl100/atl100.spec index 0c27070..b30b839 100644 --- a/dlls/atl100/atl100.spec +++ b/dlls/atl100/atl100.spec @@ -8,7 +8,7 @@ 20 stub AtlComModuleRevokeClassObjects 22 stub AtlComModuleUnregisterServer 23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr) -24 stub AtlWaitWithMessageLoop +24 stdcall AtlWaitWithMessageLoop(long) 25 stub AtlSetErrorInfo 26 stdcall AtlCreateTargetDC(long ptr) 27 stdcall AtlHiMetricToPixel(ptr ptr) diff --git a/dlls/atl80/atl80.spec b/dlls/atl80/atl80.spec index 5c5967e..7719257 100644 --- a/dlls/atl80/atl80.spec +++ b/dlls/atl80/atl80.spec @@ -10,7 +10,7 @@ 20 stub AtlComModuleRevokeClassObjects 22 stub AtlComModuleUnregisterServer 23 stdcall AtlUpdateRegistryFromResourceD(long wstr long ptr ptr) atl100.AtlUpdateRegistryFromResourceD -24 stub AtlWaitWithMessageLoop +24 stdcall AtlWaitWithMessageLoop(long) atl100.AtlWaitWithMessageLoop 25 stub AtlSetErrorInfo 26 stdcall AtlCreateTargetDC(long ptr) atl100.AtlCreateTargetDC 27 stdcall AtlHiMetricToPixel(ptr ptr) atl100.AtlHiMetricToPixel diff --git a/include/atlbase.h b/include/atlbase.h index 39c3741..d0dd96c 100644 --- a/include/atlbase.h +++ b/include/atlbase.h @@ -255,5 +255,6 @@ HRESULT WINAPI AtlLoadTypeLib(HINSTANCE,LPCOLESTR,BSTR*,ITypeLib**); HRESULT WINAPI AtlRegisterTypeLib(HINSTANCE,LPCOLESTR); HRESULT WINAPI AtlRegisterClassCategoriesHelper(REFCLSID,const struct _ATL_CATMAP_ENTRY*,BOOL); HRESULT WINAPI AtlComModuleGetClassObject(_ATL_COM_MODULE*,REFCLSID,REFIID,void**); +BOOL WINAPI AtlWaitWithMessageLoop(HANDLE); #endif /* __WINE_ATLBASE_H__ */
1
0
0
0
Jacek Caban : atl80: Skip NULL map entries in AtlComModuleRegisterServer.
by Alexandre Julliard
10 Jan '13
10 Jan '13
Module: wine Branch: master Commit: 07065b4d939f2f5d469f99e68332208462d5d1df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=07065b4d939f2f5d469f99e68…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jan 10 13:26:46 2013 +0100 atl80: Skip NULL map entries in AtlComModuleRegisterServer. --- dlls/atl80/atl80.c | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/atl80/atl80.c b/dlls/atl80/atl80.c index 278d736..2cee94c 100644 --- a/dlls/atl80/atl80.c +++ b/dlls/atl80/atl80.c @@ -37,18 +37,19 @@ HRESULT WINAPI AtlComModuleRegisterServer(_ATL_COM_MODULE *mod, BOOL bRegTypeLib TRACE("(%p %x %s)\n", mod, bRegTypeLib, debugstr_guid(clsid)); for(iter = mod->m_ppAutoObjMapFirst; iter < mod->m_ppAutoObjMapLast; iter++) { - if(!clsid || IsEqualCLSID((*iter)->pclsid, clsid)) { - TRACE("Registering clsid %s\n", debugstr_guid((*iter)->pclsid)); - hres = (*iter)->pfnUpdateRegistry(TRUE); + if(!*iter || (clsid && !IsEqualCLSID((*iter)->pclsid, clsid))) + continue; + + TRACE("Registering clsid %s\n", debugstr_guid((*iter)->pclsid)); + hres = (*iter)->pfnUpdateRegistry(TRUE); + if(FAILED(hres)) + return hres; + + catmap = (*iter)->pfnGetCategoryMap(); + if(catmap) { + hres = AtlRegisterClassCategoriesHelper((*iter)->pclsid, catmap, TRUE); if(FAILED(hres)) return hres; - - catmap = (*iter)->pfnGetCategoryMap(); - if(catmap) { - hres = AtlRegisterClassCategoriesHelper((*iter)->pclsid, catmap, TRUE); - if(FAILED(hres)) - return hres; - } } }
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
74
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
Results per page:
10
25
50
100
200