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 2010
----- 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
1174 discussions
Start a n
N
ew thread
Hwang YunSong : inetcpl.cpl: Update Korean resource.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: ef79dc1b952bc7e2b776b579ea62989c81cfc890 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef79dc1b952bc7e2b776b579e…
Author: Hwang YunSong <hys545(a)dreamwiz.com> Date: Mon Oct 4 10:46:47 2010 +0900 inetcpl.cpl: Update Korean resource. --- dlls/inetcpl.cpl/cpl_Ko.rc | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/dlls/inetcpl.cpl/cpl_Ko.rc b/dlls/inetcpl.cpl/cpl_Ko.rc index 6301701..b2f81a9 100644 --- a/dlls/inetcpl.cpl/cpl_Ko.rc +++ b/dlls/inetcpl.cpl/cpl_Ko.rc @@ -32,6 +32,23 @@ BEGIN IDS_CPL_INFO "Wine 인터넷 브라우저와 관련 설정 처리" END +/* "General" propsheet */ +IDD_GENERAL DIALOG 0, 0, 320, 220 +STYLE WS_CAPTION | WS_CHILD | WS_DISABLED +FONT 8, "MS Shell Dlg" +CAPTION "일반" +BEGIN + + GROUPBOX " 홈 페이지 ", IDC_STATIC, 4, 4, 312, 52 + LTEXT "홈페이지로 사용할 주소를 선택할 수 있습니다.", + IDC_STATIC, 58, 10, 252, 10 + EDITTEXT IDC_HOME_EDIT, 58, 22, 252, 12, WS_VISIBLE | ES_AUTOHSCROLL + PUSHBUTTON "현재 페이지(&C)", IDC_HOME_CURRENT, 58, 36, 80, 14 + PUSHBUTTON "기본 페이지(&D)", IDC_HOME_DEFAULT, 144, 36, 80, 14 + PUSHBUTTON "빈 페이지(&B)", IDC_HOME_BLANK, 230, 36, 80, 14 + +END + /* "Content" propsheet */ IDD_CONTENT DIALOG 0, 0, 320, 220 STYLE WS_CAPTION | WS_CHILD | WS_DISABLED
1
0
0
0
Amine Khaldi : xcopy: Fix translations.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: ef88584afa83187603bb81f5100c98be274ed6d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef88584afa83187603bb81f51…
Author: Amine Khaldi <amine.khaldi(a)reactos.org> Date: Fri Oct 1 00:16:22 2010 +0100 xcopy: Fix translations. --- programs/xcopy/Da.rc | 6 +++--- programs/xcopy/De.rc | 6 +++--- programs/xcopy/En.rc | 10 +++++----- programs/xcopy/Fr.rc | 6 +++--- programs/xcopy/It.rc | 6 +++--- programs/xcopy/Ja.rc | 6 +++--- programs/xcopy/Ko.rc | 12 ++++++------ programs/xcopy/Lt.rc | 6 +++--- programs/xcopy/Nl.rc | 6 +++--- programs/xcopy/No.rc | 6 +++--- programs/xcopy/Pl.rc | 10 +++++----- programs/xcopy/Pt.rc | 12 ++++++------ programs/xcopy/Ro.rc | 6 +++--- programs/xcopy/Ru.rc | 8 ++++---- programs/xcopy/Si.rc | 8 ++++---- programs/xcopy/Uk.rc | 6 +++--- 16 files changed, 60 insertions(+), 60 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ef88584afa83187603bb8…
1
0
0
0
Damjan Jovanovic : winemenubuilder: Start shared desktop shortcuts through their .lnk files.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: 921fe42ed86b57a72f174e9df23811b1539c5854 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=921fe42ed86b57a72f174e9df…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Thu Sep 30 22:00:39 2010 +0200 winemenubuilder: Start shared desktop shortcuts through their .lnk files. --- programs/winemenubuilder/winemenubuilder.c | 48 +++++++++++++++++++--------- 1 files changed, 33 insertions(+), 15 deletions(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index a9cb033..bf40c89 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -2280,6 +2280,23 @@ static char *get_start_exe_path(void) return escape(start_path); } +static char* escape_unix_link_arg(LPCSTR unix_link) +{ + char *ret = NULL; + WCHAR *unix_linkW = utf8_chars_to_wchars(unix_link); + if (unix_linkW) + { + char *escaped_lnk = escape(unix_linkW); + if (escaped_lnk) + { + ret = heap_printf("/Unix %s", escaped_lnk); + HeapFree(GetProcessHeap(), 0, escaped_lnk); + } + HeapFree(GetProcessHeap(), 0, unix_linkW); + } + return ret; +} + static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait ) { static const WCHAR startW[] = {'\\','c','o','m','m','a','n','d', @@ -2445,7 +2462,18 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait ) location = heap_printf("%s/%s.desktop", xdg_desktop_dir, lastEntry); if (location) { - r = !write_desktop_entry(NULL, location, lastEntry, escaped_path, escaped_args, description, work_dir, icon_name); + if (csidl == CSIDL_COMMON_DESKTOPDIRECTORY) + { + char *link_arg = escape_unix_link_arg(unix_link); + if (link_arg) + { + r = !write_desktop_entry(unix_link, location, lastEntry, + start_path, link_arg, description, work_dir, icon_name); + HeapFree(GetProcessHeap(), 0, link_arg); + } + } + else + r = !write_desktop_entry(NULL, location, lastEntry, escaped_path, escaped_args, description, work_dir, icon_name); if (r == 0) chmod(location, 0755); HeapFree(GetProcessHeap(), 0, location); @@ -2453,21 +2481,11 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait ) } else { - WCHAR *unix_linkW = utf8_chars_to_wchars(unix_link); - if (unix_linkW) + char *link_arg = escape_unix_link_arg(unix_link); + if (link_arg) { - char *escaped_lnk = escape(unix_linkW); - if (escaped_lnk) - { - char *menuarg = heap_printf("/Unix %s", escaped_lnk); - if (menuarg) - { - r = !write_menu_entry(unix_link, link_name, start_path, menuarg, description, work_dir, icon_name); - HeapFree(GetProcessHeap(), 0, menuarg); - } - HeapFree(GetProcessHeap(), 0, escaped_lnk); - } - HeapFree(GetProcessHeap(), 0, unix_linkW); + r = !write_menu_entry(unix_link, link_name, start_path, link_arg, description, work_dir, icon_name); + HeapFree(GetProcessHeap(), 0, link_arg); } }
1
0
0
0
Matteo Bruni : wined3d: Keep track of texture transformation states in compiled pixel shaders.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: 20010235ad07b7be1f68da4c9b36e3ed00d0ca14 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20010235ad07b7be1f68da4c9…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Sep 30 12:16:16 2010 +0200 wined3d: Keep track of texture transformation states in compiled pixel shaders. --- dlls/wined3d/arb_program_shader.c | 26 +++++++++++++------------- dlls/wined3d/glsl_shader.c | 18 ++++++++++-------- dlls/wined3d/shader.c | 13 ++++++++++++- dlls/wined3d/wined3d_private.h | 9 +++++++-- 4 files changed, 42 insertions(+), 24 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 9be5cd2..dec7a10 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -1884,8 +1884,7 @@ static void pshader_hw_texkill(const struct wined3d_shader_instruction *ins) static void pshader_hw_tex(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device; + struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; const struct wined3d_shader_dst_param *dst = &ins->dst[0]; DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major, ins->ctx->reg_maps->shader_version.minor); @@ -1927,8 +1926,8 @@ static void pshader_hw_tex(const struct wined3d_shader_instruction *ins) { DWORD flags = 0; if (reg_sampler_code < MAX_TEXTURES) - flags = deviceImpl->stateBlock->state.texture_states[reg_sampler_code][WINED3DTSS_TEXTURETRANSFORMFLAGS]; - if (flags & WINED3DTTFF_PROJECTED) + flags = priv->cur_ps_args->super.tex_transform >> reg_sampler_code * WINED3D_PSARGS_TEXTRANSFORM_SHIFT; + if (flags & WINED3D_PSARGS_PROJECTED) myflags |= TEX_PROJ; } else if (shader_version < WINED3D_SHADER_VERSION(2,0)) @@ -1977,9 +1976,7 @@ static void pshader_hw_texcoord(const struct wined3d_shader_instruction *ins) static void pshader_hw_texreg2ar(const struct wined3d_shader_instruction *ins) { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device; - DWORD flags; + DWORD flags = 0; DWORD reg1 = ins->dst[0].reg.idx; char dst_str[50]; @@ -1991,8 +1988,12 @@ static void pshader_hw_texreg2ar(const struct wined3d_shader_instruction *ins) /* Move .x first in case src_str is "TA" */ shader_addline(buffer, "MOV TA.y, %s.x;\n", src_str); shader_addline(buffer, "MOV TA.x, %s.w;\n", src_str); - flags = reg1 < MAX_TEXTURES ? deviceImpl->stateBlock->state.texture_states[reg1][WINED3DTSS_TEXTURETRANSFORMFLAGS] : 0; - shader_hw_sample(ins, reg1, dst_str, "TA", flags & WINED3DTTFF_PROJECTED ? TEX_PROJ : 0, NULL, NULL); + if (reg1 < MAX_TEXTURES) + { + struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; + flags = priv->cur_ps_args->super.tex_transform >> reg1 * WINED3D_PSARGS_TEXTRANSFORM_SHIFT; + } + shader_hw_sample(ins, reg1, dst_str, "TA", flags & WINED3D_PSARGS_PROJECTED ? TEX_PROJ : 0, NULL, NULL); } static void pshader_hw_texreg2gb(const struct wined3d_shader_instruction *ins) @@ -2025,8 +2026,7 @@ static void pshader_hw_texreg2rgb(const struct wined3d_shader_instruction *ins) static void pshader_hw_texbem(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)shader->baseShader.device; + struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; const struct wined3d_shader_dst_param *dst = &ins->dst[0]; struct wined3d_shader_buffer *buffer = ins->ctx->buffer; char reg_coord[40], dst_reg[50], src_reg[50]; @@ -2058,8 +2058,8 @@ static void pshader_hw_texbem(const struct wined3d_shader_instruction *ins) /* with projective textures, texbem only divides the static texture coord, not the displacement, * so we can't let the GL handle this. */ - if (device->stateBlock->state.texture_states[reg_dest_code][WINED3DTSS_TEXTURETRANSFORMFLAGS] - & WINED3DTTFF_PROJECTED) + if ((priv->cur_ps_args->super.tex_transform >> reg_dest_code * WINED3D_PSARGS_TEXTRANSFORM_SHIFT) + & WINED3D_PSARGS_PROJECTED) { shader_addline(buffer, "RCP TB.w, %s.w;\n", reg_coord); shader_addline(buffer, "MUL TB.xy, %s, TB.w;\n", reg_coord); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 28a3350..b71a17e 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -3031,13 +3031,15 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) if (shader_version < WINED3D_SHADER_VERSION(1,4)) { - DWORD flags = deviceImpl->stateBlock->state.texture_states[sampler_idx][WINED3DTSS_TEXTURETRANSFORMFLAGS]; + const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; + DWORD flags = (priv->cur_ps_args->tex_transform >> sampler_idx * WINED3D_PSARGS_TEXTRANSFORM_SHIFT) + & WINED3D_PSARGS_TEXTRANSFORM_MASK; WINED3DSAMPLER_TEXTURE_TYPE sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx]; /* Projected cube textures don't make a lot of sense, the resulting coordinates stay the same. */ - if (flags & WINED3DTTFF_PROJECTED && sampler_type != WINED3DSTT_CUBE) { + if (flags & WINED3D_PSARGS_PROJECTED && sampler_type != WINED3DSTT_CUBE) { sample_flags |= WINED3D_GLSL_SAMPLE_PROJECTED; - switch (flags & ~WINED3DTTFF_PROJECTED) { + switch (flags & ~WINED3D_PSARGS_PROJECTED) { case WINED3DTTFF_COUNT1: FIXME("WINED3DTTFF_PROJECTED with WINED3DTTFF_COUNT1?\n"); break; case WINED3DTTFF_COUNT2: mask = WINED3DSP_WRITEMASK_1; break; case WINED3DTTFF_COUNT3: mask = WINED3DSP_WRITEMASK_2; break; @@ -3467,8 +3469,7 @@ static void shader_glsl_texm3x3vspec(const struct wined3d_shader_instruction *in */ static void shader_glsl_texbem(const struct wined3d_shader_instruction *ins) { - IWineD3DBaseShaderImpl *shader = (IWineD3DBaseShaderImpl *)ins->ctx->shader; - IWineD3DDeviceImpl *deviceImpl = (IWineD3DDeviceImpl *)shader->baseShader.device; + const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; glsl_sample_function_t sample_function; glsl_src_param_t coord_param; DWORD sampler_idx; @@ -3477,7 +3478,8 @@ static void shader_glsl_texbem(const struct wined3d_shader_instruction *ins) char coord_mask[6]; sampler_idx = ins->dst[0].reg.idx; - flags = deviceImpl->stateBlock->state.texture_states[sampler_idx][WINED3DTSS_TEXTURETRANSFORMFLAGS]; + flags = (priv->cur_ps_args->tex_transform >> sampler_idx * WINED3D_PSARGS_TEXTRANSFORM_SHIFT) + & WINED3D_PSARGS_TEXTRANSFORM_MASK; /* Dependent read, not valid with conditional NP2 */ shader_glsl_get_sample_function(ins->ctx, sampler_idx, 0, &sample_function); @@ -3488,10 +3490,10 @@ static void shader_glsl_texbem(const struct wined3d_shader_instruction *ins) /* with projective textures, texbem only divides the static texture coord, not the displacement, * so we can't let the GL handle this. */ - if (flags & WINED3DTTFF_PROJECTED) { + if (flags & WINED3D_PSARGS_PROJECTED) { DWORD div_mask=0; char coord_div_mask[3]; - switch (flags & ~WINED3DTTFF_PROJECTED) { + switch (flags & ~WINED3D_PSARGS_PROJECTED) { case WINED3DTTFF_COUNT1: FIXME("WINED3DTTFF_PROJECTED with WINED3DTTFF_COUNT1?\n"); break; case WINED3DTTFF_COUNT2: div_mask = WINED3DSP_WRITEMASK_1; break; case WINED3DTTFF_COUNT3: div_mask = WINED3DSP_WRITEMASK_2; break; diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 3bbf5ed..323f010 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -2081,7 +2081,18 @@ void find_ps_compile_args(const struct wined3d_state *state, if(rt->resource.format->Flags & WINED3DFMT_FLAG_SRGB_WRITE) args->srgb_correction = 1; } - args->np2_fixup = 0; + if (shader->baseShader.reg_maps.shader_version.major == 1 + && shader->baseShader.reg_maps.shader_version.minor <= 3) + { + for (i = 0; i < 4; ++i) + { + DWORD flags = state->texture_states[i][WINED3DTSS_TEXTURETRANSFORMFLAGS]; + DWORD tex_transform = flags & ~WINED3DTTFF_PROJECTED; + if (flags & WINED3DTTFF_PROJECTED) + tex_transform |= WINED3D_PSARGS_PROJECTED; + args->tex_transform |= tex_transform << i * WINED3D_PSARGS_TEXTRANSFORM_SHIFT; + } + } for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 33bb437..dc5d144 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -677,13 +677,18 @@ enum fogmode { /* Stateblock dependent parameters which have to be hardcoded * into the shader code */ + +#define WINED3D_PSARGS_PROJECTED (1 << 3) +#define WINED3D_PSARGS_TEXTRANSFORM_SHIFT 4 +#define WINED3D_PSARGS_TEXTRANSFORM_MASK 0xf + struct ps_compile_args { struct color_fixup_desc color_fixup[MAX_FRAGMENT_SAMPLERS]; enum vertexprocessing_mode vp_mode; enum fogmode fog; - /* Projected textures(ps 1.0-1.3) */ + WORD tex_transform; /* ps 1.0-1.3, 4 textures */ /* Texture types(2D, Cube, 3D) in ps 1.x */ - BOOL srgb_correction; + WORD srgb_correction; WORD np2_fixup; /* Bitmap for NP2 texcoord fixups (16 samplers max currently). D3D9 has a limit of 16 samplers and the fixup is superfluous
1
0
0
0
Alexandre Julliard : mshtml: Try installing Gecko from the global data dir too.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: 2510df000d48dd8c505a633e97c31eef16c3113f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2510df000d48dd8c505a633e9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 4 13:28:37 2010 +0200 mshtml: Try installing Gecko from the global data dir too. --- dlls/mshtml/Makefile.in | 2 +- dlls/mshtml/install.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/Makefile.in b/dlls/mshtml/Makefile.in index d31d7c7..391e20b 100644 --- a/dlls/mshtml/Makefile.in +++ b/dlls/mshtml/Makefile.in @@ -1,7 +1,7 @@ MODULE = mshtml.dll IMPORTLIB = mshtml IMPORTS = strmiids uuid urlmon shlwapi shell32 ole32 oleaut32 user32 gdi32 advapi32 -EXTRADEFS = -DCOM_NO_WINDOWS_H +EXTRADEFS = -DCOM_NO_WINDOWS_H -DGECKO_DATADIR="\"$(datadir)\"" DELAYIMPORTS = wininet C_SRCS = \ diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c index c635893..ee6959d 100644 --- a/dlls/mshtml/install.c +++ b/dlls/mshtml/install.c @@ -258,10 +258,12 @@ static BOOL install_from_default_dir(void) ret = install_from_unix_file(file_name); heap_free(file_name); - if(ret) - return TRUE; - return install_from_unix_file("/usr/share/wine/gecko/" GECKO_FILE_NAME); + if (!ret) + ret = install_from_unix_file( GECKO_DATADIR "/wine/gecko/" GECKO_FILE_NAME); + if (!ret && strcmp( GECKO_DATADIR, "/usr/share" )) + ret = install_from_unix_file("/usr/share/wine/gecko/" GECKO_FILE_NAME); + return ret; } static HRESULT WINAPI InstallCallback_QueryInterface(IBindStatusCallback *iface,
1
0
0
0
Jacek Caban : mshtml: Use URLDownloadToFile to download Gecko package file.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: a9b4f82c7c27ffad39934503e3accdff4607f63c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a9b4f82c7c27ffad39934503e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 1 15:31:05 2010 +0200 mshtml: Use URLDownloadToFile to download Gecko package file. --- dlls/mshtml/install.c | 92 +++++++------------------------------------------ 1 files changed, 13 insertions(+), 79 deletions(-) diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c index 243788e..c635893 100644 --- a/dlls/mshtml/install.c +++ b/dlls/mshtml/install.c @@ -63,30 +63,8 @@ static const WCHAR mshtml_keyW[] = '\\','M','S','H','T','M','L',0}; static HWND install_dialog = NULL; -static LPWSTR tmp_file_name = NULL; -static HANDLE tmp_file = INVALID_HANDLE_VALUE; static LPWSTR url = NULL; -static void clean_up(void) -{ - if(tmp_file != INVALID_HANDLE_VALUE) - CloseHandle(tmp_file); - - if(tmp_file_name) { - DeleteFileW(tmp_file_name); - heap_free(tmp_file_name); - tmp_file_name = NULL; - } - - if(tmp_file != INVALID_HANDLE_VALUE) { - CloseHandle(tmp_file); - tmp_file = INVALID_HANDLE_VALUE; - } - - if(install_dialog) - EndDialog(install_dialog, 0); -} - static void set_status(DWORD id) { HWND status = GetDlgItem(install_dialog, ID_DWL_STATUS); @@ -174,13 +152,10 @@ static BOOL install_cab(LPCWSTR file_name) heap_free(file_name_a); if(FAILED(hres)) { ERR("Could not extract package: %08x\n", hres); - clean_up(); return FALSE; } set_registry(install_dir); - clean_up(); - return TRUE; } @@ -313,26 +288,7 @@ static ULONG WINAPI InstallCallback_Release(IBindStatusCallback *iface) static HRESULT WINAPI InstallCallback_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, IBinding *pib) { - WCHAR tmp_dir[MAX_PATH]; - set_status(IDS_DOWNLOADING); - - GetTempPathW(sizeof(tmp_dir)/sizeof(WCHAR), tmp_dir); - - tmp_file_name = heap_alloc(MAX_PATH*sizeof(WCHAR)); - GetTempFileNameW(tmp_dir, NULL, 0, tmp_file_name); - - TRACE("creating temp file %s\n", debugstr_w(tmp_file_name)); - - tmp_file = CreateFileW(tmp_file_name, GENERIC_WRITE, 0, NULL, - CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - - if(tmp_file == INVALID_HANDLE_VALUE) { - ERR("Could not create file: %d\n", GetLastError()); - clean_up(); - return E_FAIL; - } - return S_OK; } @@ -366,17 +322,10 @@ static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface, { if(FAILED(hresult)) { ERR("Binding failed %08x\n", hresult); - clean_up(); return S_OK; } - CloseHandle(tmp_file); - tmp_file = INVALID_HANDLE_VALUE; - set_status(IDS_INSTALLING); - - install_cab(tmp_file_name); - return S_OK; } @@ -391,21 +340,8 @@ static HRESULT WINAPI InstallCallback_GetBindInfo(IBindStatusCallback *iface, static HRESULT WINAPI InstallCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed) { - IStream *str = pstgmed->u.pstm; - BYTE buf[1024]; - DWORD size; - HRESULT hres; - - do { - DWORD written; - - size = 0; - hres = IStream_Read(str, buf, sizeof(buf), &size); - if(size) - WriteFile(tmp_file, buf, size, &written, NULL); - }while(hres == S_OK); - - return S_OK; + ERR("\n"); + return E_NOTIMPL; } static HRESULT WINAPI InstallCallback_OnObjectAvailable(IBindStatusCallback *iface, @@ -477,27 +413,23 @@ static LPWSTR get_url(void) static DWORD WINAPI download_proc(PVOID arg) { - IMoniker *mon; - IBindCtx *bctx; - IStream *str = NULL; + WCHAR tmp_dir[MAX_PATH], tmp_file[MAX_PATH]; HRESULT hres; - CreateURLMoniker(NULL, url, &mon); - heap_free(url); - url = NULL; + GetTempPathW(sizeof(tmp_dir)/sizeof(WCHAR), tmp_dir); + GetTempFileNameW(tmp_dir, NULL, 0, tmp_file); - CreateAsyncBindCtx(0, &InstallCallback, 0, &bctx); + TRACE("using temp file %s\n", debugstr_w(tmp_file)); - hres = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&str); - IBindCtx_Release(bctx); + hres = URLDownloadToFileW(NULL, url, tmp_file, 0, &InstallCallback); if(FAILED(hres)) { - ERR("BindToStorage failed: %08x\n", hres); + ERR("URLDownloadToFile failed: %08x\n", hres); return 0; } - if(str) - IStream_Release(str); - + install_cab(tmp_file); + DeleteFileW(tmp_file); + EndDialog(install_dialog, 0); return 0; } @@ -552,6 +484,8 @@ BOOL install_wine_gecko(BOOL silent) DialogBoxW(hInst, MAKEINTRESOURCEW(ID_DWL_DIALOG), 0, installer_proc); } + heap_free(url); + url = NULL; ReleaseSemaphore(hsem, 1, NULL); CloseHandle(hsem);
1
0
0
0
Jacek Caban : mshtml: Try installing Gecko from hardcoded '/usr/share/wine/ gecko/' location.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: 1f716bcbf4b7784587a2cb3870041c4a032f1039 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f716bcbf4b7784587a2cb387…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 1 15:30:19 2010 +0200 mshtml: Try installing Gecko from hardcoded '/usr/share/wine/gecko/' location. --- dlls/mshtml/install.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/install.c b/dlls/mshtml/install.c index 1079713..243788e 100644 --- a/dlls/mshtml/install.c +++ b/dlls/mshtml/install.c @@ -283,7 +283,10 @@ static BOOL install_from_default_dir(void) ret = install_from_unix_file(file_name); heap_free(file_name); - return ret; + if(ret) + return TRUE; + + return install_from_unix_file("/usr/share/wine/gecko/" GECKO_FILE_NAME); } static HRESULT WINAPI InstallCallback_QueryInterface(IBindStatusCallback *iface,
1
0
0
0
Nikolay Sivov : comctl32/tab: Fix DRAWITEMSTRUCT filling when extra item data of a custom size is used.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: f08938c381b2dfadceebfbd657b2e3987c2d1fd1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f08938c381b2dfadceebfbd65…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Oct 3 01:58:12 2010 +0400 comctl32/tab: Fix DRAWITEMSTRUCT filling when extra item data of a custom size is used. --- dlls/comctl32/tab.c | 36 +++++++----- dlls/comctl32/tests/tab.c | 137 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 155 insertions(+), 18 deletions(-) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index 0ecbb63..fe82d59 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -83,8 +83,10 @@ typedef struct BYTE extra[1]; /* Space for caller supplied info, variable size */ } TAB_ITEM; -/* The size of a tab item depends on how much extra data is requested */ -#define TAB_ITEM_SIZE(infoPtr) (FIELD_OFFSET(TAB_ITEM, extra[(infoPtr)->cbInfo])) +/* The size of a tab item depends on how much extra data is requested. + TCM_INSERTITEM always stores at least LPARAM sized data. */ +#define EXTRA_ITEM_SIZE(infoPtr) (max((infoPtr)->cbInfo, sizeof(LPARAM))) +#define TAB_ITEM_SIZE(infoPtr) FIELD_OFFSET(TAB_ITEM, extra[EXTRA_ITEM_SIZE(infoPtr)]) typedef struct { @@ -1728,7 +1730,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect /* * if owner draw, tell the owner to draw */ - if ((infoPtr->dwStyle & TCS_OWNERDRAWFIXED) && GetParent(infoPtr->hwnd)) + if ((infoPtr->dwStyle & TCS_OWNERDRAWFIXED) && IsWindow(infoPtr->hwndNotify)) { DRAWITEMSTRUCT dis; UINT id; @@ -1741,14 +1743,9 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect drawRect->left += 1; } - /* - * get the control id - */ id = (UINT)GetWindowLongPtrW( infoPtr->hwnd, GWLP_ID ); - /* - * put together the DRAWITEMSTRUCT - */ + /* fill DRAWITEMSTRUCT */ dis.CtlType = ODT_TAB; dis.CtlID = id; dis.itemID = iItem; @@ -1761,11 +1758,18 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect dis.hwndItem = infoPtr->hwnd; dis.hDC = hdc; CopyRect(&dis.rcItem,drawRect); - dis.itemData = (ULONG_PTR)TAB_GetItem(infoPtr, iItem)->extra; - /* - * send the draw message - */ + /* when extra data fits ULONG_PTR, store it directly */ + if (infoPtr->cbInfo > sizeof(LPARAM)) + dis.itemData = (ULONG_PTR) TAB_GetItem(infoPtr, iItem)->extra; + else + { + /* this could be considered broken on 64 bit, but that's how it works - + only first 4 bytes are copied */ + memcpy(&dis.itemData, (ULONG_PTR*)TAB_GetItem(infoPtr, iItem)->extra, 4); + } + + /* draw notification */ SendMessageW( infoPtr->hwndNotify, WM_DRAWITEM, id, (LPARAM)&dis ); } else @@ -2686,10 +2690,10 @@ TAB_InsertItemT (TAB_INFO *infoPtr, INT iItem, const TCITEMW *pti, BOOL bUnicode item->iImage = -1; if (pti->mask & TCIF_PARAM) - memcpy(item->extra, &pti->lParam, infoPtr->cbInfo); + memcpy(item->extra, &pti->lParam, EXTRA_ITEM_SIZE(infoPtr)); else - memset(item->extra, 0, infoPtr->cbInfo); - + memset(item->extra, 0, EXTRA_ITEM_SIZE(infoPtr)); + TAB_SetItemBounds(infoPtr); if (infoPtr->uNumItem > 1) TAB_InvalidateTabArea(infoPtr); diff --git a/dlls/comctl32/tests/tab.c b/dlls/comctl32/tests/tab.c index d74155d..03c4390 100644 --- a/dlls/comctl32/tests/tab.c +++ b/dlls/comctl32/tests/tab.c @@ -61,7 +61,8 @@ "%s: Expected [%d,%d] got [%d,%d]\n", msg, (int)width, (int)height,\ rTab.right - rTab.left, rTab.bottom - rTab.top); -static HFONT hFont = 0; +static HFONT hFont; +static DRAWITEMSTRUCT g_drawitem; static struct msg_sequence *sequences[NUM_MSG_SEQUENCES]; @@ -337,6 +338,10 @@ static LRESULT WINAPI parentWindowProcess(HWND hwnd, UINT message, WPARAM wParam add_message(sequences, PARENT_SEQ_INDEX, &msg); } + /* dump sent structure data */ + if (message == WM_DRAWITEM) + g_drawitem = *(DRAWITEMSTRUCT*)lParam; + defwndproc_counter++; ret = DefWindowProcA(hwnd, message, wParam, lParam); defwndproc_counter--; @@ -790,11 +795,43 @@ static void test_unicodeformat(HWND parent_wnd, INT nTabs) static void test_getset_item(HWND parent_wnd, INT nTabs) { + char szText[32] = "New Label"; TCITEM tcItem; + LPARAM lparam; DWORD ret; - char szText[32] = "New Label"; HWND hTab; + hTab = CreateWindowA( + WC_TABCONTROLA, + "TestTab", + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TCS_FOCUSNEVER | TCS_FIXEDWIDTH | TCS_OWNERDRAWFIXED, + 10, 10, 300, 100, + parent_wnd, NULL, NULL, 0); + + ok(GetParent(hTab) == NULL, "got %p, expected null parent\n", GetParent(hTab)); + + ret = SendMessageA(hTab, TCM_SETITEMEXTRA, sizeof(LPARAM)-1, 0); + ok(ret == TRUE, "got %d\n", ret); + + /* set some item data */ + tcItem.lParam = ~0; + tcItem.mask = TCIF_PARAM; + + ret = SendMessageA(hTab, TCM_INSERTITEMA, 0, (LPARAM)&tcItem); + ok(ret == 0, "got %d\n", ret); + + /* all sizeof(LPARAM) returned anyway when using sizeof(LPARAM)-1 size */ + memset(&lparam, 0xaa, sizeof(lparam)); + tcItem.lParam = lparam; + tcItem.mask = TCIF_PARAM; + ret = SendMessage(hTab, TCM_GETITEM, 0, (LPARAM)&tcItem); + expect(TRUE, ret); + /* everything higher specified size is preserved */ + memset(&lparam, 0xff, sizeof(lparam)-1); + ok(tcItem.lParam == lparam, "Expected 0x%lx, got 0x%lx\n", lparam, tcItem.lParam); + + DestroyWindow(hTab); + hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, TCIF_TEXT|TCIF_IMAGE, nTabs); ok(hTab != NULL, "Failed to create tab control\n"); @@ -1233,6 +1270,101 @@ static void test_TCM_SETITEMEXTRA(HWND parent_wnd) DestroyWindow(hTab); } +static void test_TCS_OWNERDRAWFIXED(HWND parent_wnd) +{ + LPARAM lparam, lparam2; + TCITEMA item; + HWND hTab; + BOOL ret; + + hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH|TCS_OWNERDRAWFIXED, TCIF_TEXT|TCIF_IMAGE, 4); + ok(hTab != NULL, "Failed to create tab control\n"); + + ok(GetParent(hTab) == NULL, "got %p, expected null parent\n", GetParent(hTab)); + + /* set some item data */ + memset(&lparam, 0xde, sizeof(LPARAM)); + + item.mask = TCIF_PARAM; + item.lParam = lparam; + ret = SendMessageA(hTab, TCM_SETITEMA, 0, (LPARAM)&item); + ok(ret == TRUE, "got %d\n", ret); + + memset(&g_drawitem, 0, sizeof(g_drawitem)); + + ShowWindow(hTab, SW_SHOW); + RedrawWindow(hTab, NULL, 0, RDW_UPDATENOW); + + lparam = 0; + memset(&lparam, 0xde, 4); + ok(g_drawitem.itemData == lparam, "got %lx, expected %lx\n", g_drawitem.itemData, lparam); + + DestroyWindow(hTab); + + /* now with custom extra data length */ + hTab = CreateWindowA( + WC_TABCONTROLA, + "TestTab", + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TCS_FOCUSNEVER | TCS_FIXEDWIDTH | TCS_OWNERDRAWFIXED, + 10, 10, 300, 100, + parent_wnd, NULL, NULL, 0); + + ok(GetParent(hTab) == NULL, "got %p, expected null parent\n", GetParent(hTab)); + + ret = SendMessageA(hTab, TCM_SETITEMEXTRA, sizeof(LPARAM)+1, 0); + ok(ret == TRUE, "got %d\n", ret); + + /* set some item data */ + memset(&lparam, 0xde, sizeof(LPARAM)); + item.mask = TCIF_PARAM; + item.lParam = lparam; + + ret = SendMessageA(hTab, TCM_INSERTITEMA, 0, (LPARAM)&item); + ok(ret == 0, "got %d\n", ret); + + memset(&g_drawitem, 0, sizeof(g_drawitem)); + + ShowWindow(hTab, SW_SHOW); + RedrawWindow(hTab, NULL, 0, RDW_UPDATENOW); + + ok(*(ULONG_PTR*)g_drawitem.itemData == lparam, "got %lx, expected %lx\n", g_drawitem.itemData, lparam); + + DestroyWindow(hTab); + + /* same thing, but size smaller than default */ + hTab = CreateWindowA( + WC_TABCONTROLA, + "TestTab", + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | TCS_FOCUSNEVER | TCS_FIXEDWIDTH | TCS_OWNERDRAWFIXED, + 10, 10, 300, 100, + parent_wnd, NULL, NULL, 0); + + ok(GetParent(hTab) == NULL, "got %p, expected null parent\n", GetParent(hTab)); + + ret = SendMessageA(hTab, TCM_SETITEMEXTRA, sizeof(LPARAM)-1, 0); + ok(ret == TRUE, "got %d\n", ret); + + memset(&lparam, 0xde, sizeof(lparam)); + item.mask = TCIF_PARAM; + item.lParam = lparam; + + ret = SendMessageA(hTab, TCM_INSERTITEMA, 0, (LPARAM)&item); + ok(ret == 0, "got %d\n", ret); + + memset(&g_drawitem, 0, sizeof(g_drawitem)); + + ShowWindow(hTab, SW_SHOW); + RedrawWindow(hTab, NULL, 0, RDW_UPDATENOW); + + lparam = 0; + memset(&lparam, 0xde, 4); + memset(&lparam2, 0xde, sizeof(LPARAM)-1); + ok(g_drawitem.itemData == lparam || broken(g_drawitem.itemData == lparam2) /* win98 */, + "got 0x%lx, expected 0x%lx\n", g_drawitem.itemData, lparam); + + DestroyWindow(hTab); +} + START_TEST(tab) { HWND parent_wnd; @@ -1278,6 +1410,7 @@ START_TEST(tab) test_delete_selection(parent_wnd); test_removeimage(parent_wnd); test_TCM_SETITEMEXTRA(parent_wnd); + test_TCS_OWNERDRAWFIXED(parent_wnd); DestroyWindow(parent_wnd); }
1
0
0
0
Nikolay Sivov : comctl32/treeview: Prevent item height to be calculated to zero value.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: 66bad889f42431f98418a1518cee2cacd9ea0d24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66bad889f42431f98418a1518…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Oct 4 03:59:51 2010 +0400 comctl32/treeview: Prevent item height to be calculated to zero value. --- dlls/comctl32/tests/treeview.c | 26 ++++++++++++++++++++++++++ dlls/comctl32/treeview.c | 15 ++++++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c index 906a12d..1de63c6 100644 --- a/dlls/comctl32/tests/treeview.c +++ b/dlls/comctl32/tests/treeview.c @@ -713,6 +713,32 @@ static void test_get_set_itemheight(void) ok_sequence(sequences, TREEVIEW_SEQ_INDEX, test_get_set_itemheight_seq, "test get set item height", FALSE); + /* without TVS_NONEVENHEIGHT */ + SetWindowLong(hTree, GWL_STYLE, GetWindowLong(hTree, GWL_STYLE) & ~TVS_NONEVENHEIGHT); + /* odd value */ + ulOldHeight = SendMessage( hTree, TVM_SETITEMHEIGHT, 3, 0); + ok(ulOldHeight == 8, "got %d, expected %d\n", ulOldHeight, 8); + ulNewHeight = (int) SendMessage( hTree, TVM_GETITEMHEIGHT, 0, 0 ); + ok(ulNewHeight == 2, "got %d, expected %d\n", ulNewHeight, 2); + + ulOldHeight = SendMessage( hTree, TVM_SETITEMHEIGHT, 4, 0); + ok(ulOldHeight == 2, "got %d, expected %d\n", ulOldHeight, 2); + ulNewHeight = (int) SendMessage( hTree, TVM_GETITEMHEIGHT, 0, 0 ); + ok(ulNewHeight == 4, "got %d, expected %d\n", ulNewHeight, 4); + + /* with TVS_NONEVENHEIGHT */ + SetWindowLong(hTree, GWL_STYLE, GetWindowLong(hTree, GWL_STYLE) | TVS_NONEVENHEIGHT); + /* odd value */ + ulOldHeight = SendMessage( hTree, TVM_SETITEMHEIGHT, 3, 0); + ok(ulOldHeight == 4, "got %d, expected %d\n", ulOldHeight, 4); + ulNewHeight = (int) SendMessage( hTree, TVM_GETITEMHEIGHT, 0, 0 ); + ok(ulNewHeight == 3, "got %d, expected %d\n", ulNewHeight, 3); + /* even value */ + ulOldHeight = SendMessage( hTree, TVM_SETITEMHEIGHT, 10, 0); + ok(ulOldHeight == 3, "got %d, expected %d\n", ulOldHeight, 3); + ulNewHeight = (int) SendMessage( hTree, TVM_GETITEMHEIGHT, 0, 0 ); + ok(ulNewHeight == 10, "got %d, expected %d\n", ulNewHeight, 10); + DestroyWindow(hTree); } diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 9609336..1ffcf64 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -1828,7 +1828,7 @@ TREEVIEW_SetItemHeight(TREEVIEW_INFO *infoPtr, INT newHeight) { INT prevHeight = infoPtr->uItemHeight; - TRACE("%d\n", newHeight); + TRACE("new=%d, old=%d\n", newHeight, prevHeight); if (newHeight == -1) { infoPtr->uItemHeight = TREEVIEW_NaturalHeight(infoPtr); @@ -1836,13 +1836,17 @@ TREEVIEW_SetItemHeight(TREEVIEW_INFO *infoPtr, INT newHeight) } else { - infoPtr->uItemHeight = newHeight; - infoPtr->bHeightSet = TRUE; + if (newHeight == 0) newHeight = 1; + infoPtr->uItemHeight = newHeight; + infoPtr->bHeightSet = TRUE; } /* Round down, unless we support odd ("non even") heights. */ - if (!(infoPtr->dwStyle & TVS_NONEVENHEIGHT)) - infoPtr->uItemHeight &= ~1; + if (!(infoPtr->dwStyle & TVS_NONEVENHEIGHT) && infoPtr->uItemHeight != 1) + { + infoPtr->uItemHeight &= ~1; + TRACE("after rounding=%d\n", infoPtr->uItemHeight); + } if (infoPtr->uItemHeight != prevHeight) { @@ -2062,6 +2066,7 @@ static inline LRESULT TREEVIEW_GetVisibleCount(const TREEVIEW_INFO *infoPtr) { /* Surprise! This does not take integral height into account. */ + TRACE("client=%d, item=%d\n", infoPtr->clientHeight, infoPtr->uItemHeight); return infoPtr->clientHeight / infoPtr->uItemHeight; }
1
0
0
0
Nikolay Sivov : comctl32/listview: Use actual edit box contents to calculate initial control size.
by Alexandre Julliard
04 Oct '10
04 Oct '10
Module: wine Branch: master Commit: 03bd3c8040d2609af4b6d1d32b76b72dd5737951 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=03bd3c8040d2609af4b6d1d32…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Oct 3 16:31:39 2010 +0400 comctl32/listview: Use actual edit box contents to calculate initial control size. --- dlls/comctl32/listview.c | 24 +++++++++++------------- 1 files changed, 11 insertions(+), 13 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index c144a49..6c4165d 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -6,7 +6,7 @@ * Copyright 2000 Jason Mawdsley * Copyright 2001 CodeWeavers Inc. * Copyright 2002 Dimitrie O. Paun - * Copyright 2009 Nikolay Sivov + * Copyright 2009, 2010 Nikolay Sivov * Copyright 2009 Owen Rudge for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -5840,7 +5840,7 @@ static HWND CreateEditLabelT(LISTVIEW_INFO *infoPtr, LPCWSTR text, BOOL isW) TRACE("(%p, text=%s, isW=%d)\n", infoPtr, debugtext_t(text, isW), isW); - /* Window will be resized and positioned after LVN_BEGINLABELEDIT */ + /* window will be resized and positioned after LVN_BEGINLABELEDIT */ if (isW) hedit = CreateWindowW(WC_EDITW, text, style, 0, 0, 0, 0, infoPtr->hwndSelf, 0, hinst, 0); else @@ -5872,7 +5872,7 @@ static HWND CreateEditLabelT(LISTVIEW_INFO *infoPtr, LPCWSTR text, BOOL isW) */ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *infoPtr, INT nItem, BOOL isW) { - WCHAR szDispText[DISP_TEXT_SIZE] = { 0 }; + WCHAR disptextW[DISP_TEXT_SIZE] = { 0 }; HWND hwndSelf = infoPtr->hwndSelf; NMLVDISPINFOW dispInfo; HFONT hOldFont = NULL; @@ -5908,7 +5908,7 @@ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *infoPtr, INT nItem, BOOL isW) dispInfo.item.iItem = nItem; dispInfo.item.iSubItem = 0; dispInfo.item.stateMask = ~0; - dispInfo.item.pszText = szDispText; + dispInfo.item.pszText = disptextW; dispInfo.item.cchTextMax = DISP_TEXT_SIZE; if (!LISTVIEW_GetItemT(infoPtr, &dispInfo.item, isW)) return 0; @@ -5924,6 +5924,8 @@ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *infoPtr, INT nItem, BOOL isW) return 0; } + TRACE("disp text=%s\n", debugtext_t(dispInfo.item.pszText, isW)); + /* position and display edit box */ hdc = GetDC(infoPtr->hwndSelf); @@ -5931,16 +5933,12 @@ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *infoPtr, INT nItem, BOOL isW) if (infoPtr->hFont) hOldFont = SelectObject(hdc, infoPtr->hFont); - /* get string length in pixels */ - TRACE("text=%s\n", debugtext_t(dispInfo.item.pszText, isW)); + /* use real edit box content, it could be altered during LVN_BEGINLABELEDIT notification */ + GetWindowTextW(infoPtr->hwndEdit, disptextW, DISP_TEXT_SIZE); + TRACE("edit box text=%s\n", debugstr_w(disptextW)); - if (isW) - GetTextExtentPoint32W(hdc, dispInfo.item.pszText, lstrlenW(dispInfo.item.pszText), &sz); - else - { - const CHAR *textA = (CHAR*)dispInfo.item.pszText; - GetTextExtentPoint32A(hdc, textA, lstrlenA(textA), &sz); - } + /* get string length in pixels */ + GetTextExtentPoint32W(hdc, disptextW, lstrlenW(disptextW), &sz); /* add extra spacing for the next character */ GetTextMetricsW(hdc, &tm);
1
0
0
0
← Newer
1
...
104
105
106
107
108
109
110
...
118
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Results per page:
10
25
50
100
200