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 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1348 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Added Math.random implementation.
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: a20a9166a2b0cde1ad2d04a67b19434becd76fef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a20a9166a2b0cde1ad2d04a67…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jan 22 13:47:00 2009 +0100 jscript: Added Math.random implementation. --- dlls/jscript/Makefile.in | 2 +- dlls/jscript/math.c | 16 ++++++++++++++-- dlls/jscript/tests/api.js | 8 ++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/dlls/jscript/Makefile.in b/dlls/jscript/Makefile.in index 5d4506a..5d7ee69 100644 --- a/dlls/jscript/Makefile.in +++ b/dlls/jscript/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = jscript.dll -IMPORTS = oleaut32 kernel32 +IMPORTS = oleaut32 advapi32 kernel32 RC_SRCS = rsrc.rc diff --git a/dlls/jscript/math.c b/dlls/jscript/math.c index f2a3d0c..9c1a56b 100644 --- a/dlls/jscript/math.c +++ b/dlls/jscript/math.c @@ -20,8 +20,10 @@ #include "wine/port.h" #include <math.h> +#include <limits.h> #include "jscript.h" +#include "ntsecapi.h" #include "wine/debug.h" @@ -352,11 +354,21 @@ static HRESULT Math_pow(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d return S_OK; } +/* ECMA-262 3rd Edition 15.8.2.14 */ static HRESULT Math_random(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + UINT r; + + TRACE("\n"); + + if(!RtlGenRandom(&r, sizeof(r))) + return E_UNEXPECTED; + + if(retv) + num_set_val(retv, (DOUBLE)r/(DOUBLE)UINT_MAX); + + return S_OK; } /* ECMA-262 3rd Edition 15.8.2.15 */ diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 16fba15..7fd20a6 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -585,6 +585,14 @@ ok(tmp === 2, "Math.pow(2, 2) = " + tmp); tmp = Math.pow(2, 2, 3); ok(tmp === 4, "Math.pow(2, 2, 3) = " + tmp); +tmp = Math.random(); +ok(typeof(tmp) == "number", "typeof(tmp) = " + typeof(tmp)); +ok(0 <= tmp && tmp <= 1, "Math.random() = " + tmp); + +tmp = Math.random(100); +ok(typeof(tmp) == "number", "typeof(tmp) = " + typeof(tmp)); +ok(0 <= tmp && tmp <= 1, "Math.random(100) = " + tmp); + var func = function (a) { var a = 1; if(a) return;
1
0
0
0
Anders Jonsson : progman: Add Swedish translation.
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: 890a48adc507f7fbe30411ebe622e0cf46f221fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=890a48adc507f7fbe30411ebe…
Author: Anders Jonsson <anders.jonsson(a)norsjonet.se> Date: Thu Jan 22 00:16:45 2009 +0100 progman: Add Swedish translation. --- programs/progman/Sv.rc | 245 ++++++++++++++++++++++++++++++++++++++++++++++ programs/progman/rsrc.rc | 1 + 2 files changed, 246 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=890a48adc507f7fbe3041…
1
0
0
0
Vincent Pelletier : dinput: Add test to show that effects are stopped after Unacquire + Acquire and preserved in dinput .
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: 7d0ee98716504d6b10ade39c2403643151f7511e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d0ee98716504d6b10ade39c2…
Author: Vincent Pelletier <plr.vincent(a)gmail.com> Date: Wed Jan 21 23:25:53 2009 +0100 dinput: Add test to show that effects are stopped after Unacquire + Acquire and preserved in dinput. --- dlls/dinput/tests/joystick.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c index 286c168..133ff58 100644 --- a/dlls/dinput/tests/joystick.c +++ b/dlls/dinput/tests/joystick.c @@ -373,6 +373,8 @@ static BOOL CALLBACK EnumJoysticks( if (effect) { + DWORD effect_status; + hr = IDirectInputEffect_Initialize(effect, hInstance, data->version, &GUID_ConstantForce); ok(hr==DI_OK,"IDirectInputEffect_Initialize failed: %08x\n", hr); @@ -389,6 +391,44 @@ static BOOL CALLBACK EnumJoysticks( hr = IDirectInputEffect_SetParameters(effect, &eff, DIEP_GAIN); ok(hr==DI_OK,"IDirectInputEffect_SetParameters failed: %08x\n", hr); } + + /* Check effect status. + * State: initialy stopped + * start + * State: started + * unacquire, acquire, download + * State: stopped + * start + * State: started + * + * Shows that: + * - effects are stopped after Unacquire + Acquire + * - effects are preserved (Download + Start doesn't complain + * about incomplete effect) + */ + hr = IDirectInputEffect_GetEffectStatus(effect, &effect_status); + ok(hr==DI_OK,"IDirectInputEffect_GetEffectStatus() failed: %08x\n", hr); + ok(effect_status==0,"IDirectInputEffect_GetEffectStatus() reported effect as started\n"); + hr = IDirectInputEffect_SetParameters(effect, &eff, DIEP_START); + ok(hr==DI_OK,"IDirectInputEffect_SetParameters failed: %08x\n", hr); + hr = IDirectInputEffect_GetEffectStatus(effect, &effect_status); + ok(hr==DI_OK,"IDirectInputEffect_GetEffectStatus() failed: %08x\n", hr); + todo_wine ok(effect_status!=0,"IDirectInputEffect_GetEffectStatus() reported effect as stopped\n"); + hr = IDirectInputDevice_Unacquire(pJoystick); + ok(hr==DI_OK,"IDirectInputDevice_Unacquire() failed: %08x\n", hr); + hr = IDirectInputDevice_Acquire(pJoystick); + ok(hr==DI_OK,"IDirectInputDevice_Acquire() failed: %08x\n", hr); + hr = IDirectInputEffect_Download(effect); + ok(hr==DI_OK,"IDirectInputEffect_Download() failed: %08x\n", hr); + hr = IDirectInputEffect_GetEffectStatus(effect, &effect_status); + ok(hr==DI_OK,"IDirectInputEffect_GetEffectStatus() failed: %08x\n", hr); + ok(effect_status==0,"IDirectInputEffect_GetEffectStatus() reported effect as started\n"); + hr = IDirectInputEffect_Start(effect, 1, 0); + ok(hr==DI_OK,"IDirectInputEffect_Start() failed: %08x\n", hr); + hr = IDirectInputEffect_GetEffectStatus(effect, &effect_status); + ok(hr==DI_OK,"IDirectInputEffect_GetEffectStatus() failed: %08x\n", hr); + todo_wine ok(effect_status!=0,"IDirectInputEffect_GetEffectStatus() reported effect as stopped\n"); + ref = IUnknown_Release(effect); ok(ref == 0, "IDirectInputDevice_Release() reference count = %d\n", ref); }
1
0
0
0
Vincent Pelletier : dinput: On Unacquire, stop all effects and unload them.
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: 41be1096c0c23da208d45e253eff10b16277ebf7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41be1096c0c23da208d45e253…
Author: Vincent Pelletier <plr.vincent(a)gmail.com> Date: Wed Jan 21 23:01:42 2009 +0100 dinput: On Unacquire, stop all effects and unload them. --- dlls/dinput/joystick_linuxinput.c | 12 ++++++++++++ dlls/dinput/tests/joystick.c | 2 +- 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index be5dccf..da2d0bc 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -678,6 +678,18 @@ static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface) TRACE("(this=%p)\n",This); res = IDirectInputDevice2AImpl_Unacquire(iface); if (res==DI_OK && This->joyfd!=-1) { + effect_list_item *itr; + + /* For each known effect: + * - stop it + * - unload it + * But, unlike DISFFC_RESET, do not release the effect. + */ + LIST_FOR_EACH_ENTRY(itr, &This->ff_effects, effect_list_item, entry) { + IDirectInputEffect_Stop(itr->ref); + IDirectInputEffect_Unload(itr->ref); + } + close(This->joyfd); This->joyfd = -1; } diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c index 0d5a34b..286c168 100644 --- a/dlls/dinput/tests/joystick.c +++ b/dlls/dinput/tests/joystick.c @@ -387,7 +387,7 @@ static BOOL CALLBACK EnumJoysticks( hr = IDirectInputDevice_Acquire(pJoystick); ok(hr==DI_OK,"IDirectInputDevice_Acquire() failed: %08x\n", hr); hr = IDirectInputEffect_SetParameters(effect, &eff, DIEP_GAIN); - todo_wine ok(hr==DI_OK,"IDirectInputEffect_SetParameters failed: %08x\n", hr); + ok(hr==DI_OK,"IDirectInputEffect_SetParameters failed: %08x\n", hr); } ref = IUnknown_Release(effect); ok(ref == 0, "IDirectInputDevice_Release() reference count = %d\n", ref);
1
0
0
0
Vincent Pelletier : dinput: Use tested DirectInput version instead of latest.
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: a0c10c2af2c30542cb21321adc5b8e109c7ef609 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0c10c2af2c30542cb21321ad…
Author: Vincent Pelletier <plr.vincent(a)gmail.com> Date: Wed Jan 21 23:00:25 2009 +0100 dinput: Use tested DirectInput version instead of latest. --- dlls/dinput/tests/joystick.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dinput/tests/joystick.c b/dlls/dinput/tests/joystick.c index 77cfa4c..0d5a34b 100644 --- a/dlls/dinput/tests/joystick.c +++ b/dlls/dinput/tests/joystick.c @@ -373,7 +373,7 @@ static BOOL CALLBACK EnumJoysticks( if (effect) { - hr = IDirectInputEffect_Initialize(effect, hInstance, DIRECTINPUT_VERSION, + hr = IDirectInputEffect_Initialize(effect, hInstance, data->version, &GUID_ConstantForce); ok(hr==DI_OK,"IDirectInputEffect_Initialize failed: %08x\n", hr); hr = IDirectInputEffect_SetParameters(effect, &eff, DIEP_AXES | DIEP_DIRECTION |
1
0
0
0
Nikolay Sivov : richedit: Update EM_GETOLEINTERFACE documentation status.
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: e49cb3bfcbc9180ec58f89e84d2f25f761eef406 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e49cb3bfcbc9180ec58f89e84…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Wed Jan 21 19:08:31 2009 +0300 richedit: Update EM_GETOLEINTERFACE documentation status. --- dlls/riched20/editor.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 2666c64..f10dddc 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -56,7 +56,7 @@ + EM_GETLINE + EM_GETLINECOUNT returns number of rows, not of paragraphs + EM_GETMODIFY - - EM_GETOLEINTERFACE + + EM_GETOLEINTERFACE + EM_GETOPTIONS + EM_GETPARAFORMAT + EM_GETPASSWORDCHAR 2.0 @@ -3045,7 +3045,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, UNSUPPORTED_MSG(EM_GETIMESTATUS) UNSUPPORTED_MSG(EM_SETIMESTATUS) UNSUPPORTED_MSG(EM_GETLANGOPTIONS) - /* UNSUPPORTED_MSG(EM_GETOLEINTERFACE) separate stub */ UNSUPPORTED_MSG(EM_GETREDONAME) UNSUPPORTED_MSG(EM_GETTEXTMODE) UNSUPPORTED_MSG(EM_GETTYPOGRAPHYOPTIONS)
1
0
0
0
Dylan Smith : richedit: Implemented ITextServices_TxGetVScroll & TxGetHScroll.
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: 8f7a99fb96df73c694b4bc696593d7286d5b0777 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f7a99fb96df73c694b4bc696…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Wed Jan 21 10:13:56 2009 -0500 richedit: Implemented ITextServices_TxGetVScroll & TxGetHScroll. --- dlls/riched20/txtsrv.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index 2d5ff81..0c3fc55 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -190,8 +190,12 @@ HRESULT WINAPI fnTextSrv_TxGetHScroll(ITextServices *iface, { ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface); - FIXME("%p: STUB\n", This); - return E_NOTIMPL; + *plMin = This->editor->horz_si.nMin; + *plMax = This->editor->horz_si.nMax; + *plPos = This->editor->horz_si.nPos; + *plPage = This->editor->horz_si.nPage; + *pfEnabled = (This->editor->styleFlags & WS_HSCROLL) != 0; + return S_OK; } HRESULT WINAPI fnTextSrv_TxGetVScroll(ITextServices *iface, @@ -203,8 +207,12 @@ HRESULT WINAPI fnTextSrv_TxGetVScroll(ITextServices *iface, { ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface); - FIXME("%p: STUB\n", This); - return E_NOTIMPL; + *plMin = This->editor->vert_si.nMin; + *plMax = This->editor->vert_si.nMax; + *plPos = This->editor->vert_si.nPos; + *plPage = This->editor->vert_si.nPage; + *pfEnabled = (This->editor->styleFlags & WS_VSCROLL) != 0; + return S_OK; } HRESULT WINAPI fnTextSrv_OnTxSetCursor(ITextServices *iface,
1
0
0
0
Dylan Smith : richedit: Removed some unused invalidation code.
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: 94146a72ad80c182ba9ac53840eede78178336e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=94146a72ad80c182ba9ac5384…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Wed Jan 21 10:10:10 2009 -0500 richedit: Removed some unused invalidation code. The ME_InvalidateFromOfs and ME_QueueInvalidateFromCursor functions are never called, and the nInvalidOfs variable had its value set but never used. --- dlls/riched20/editor.c | 1 - dlls/riched20/editor.h | 1 - dlls/riched20/editstr.h | 1 - dlls/riched20/paint.c | 25 ------------------------- 4 files changed, 0 insertions(+), 28 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 33964d6..2666c64 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2725,7 +2725,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) ed->pLastSelStartPara = ed->pLastSelEndPara = ME_FindItemFwd(ed->pBuffer->pFirst, diParagraph); ed->bWordWrap = (props & TXTBIT_WORDWRAP) != 0; ed->bHideSelection = FALSE; - ed->nInvalidOfs = -1; ed->pfnWordBreak = NULL; ed->lpOleCallback = NULL; ed->mode = TM_RICHTEXT | TM_MULTILEVELUNDO | TM_MULTICODEPAGE; diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 53d6295..484acfb 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -233,7 +233,6 @@ void ME_RewrapRepaint(ME_TextEditor *editor); void ME_UpdateRepaint(ME_TextEditor *editor); void ME_EnsureVisible(ME_TextEditor *editor, ME_Cursor *pCursor); void ME_InvalidateSelection(ME_TextEditor *editor); -void ME_QueueInvalidateFromCursor(ME_TextEditor *editor, int nCursor); BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator); int ME_twips2pointsX(ME_Context *c, int x); int ME_twips2pointsY(ME_Context *c, int y); diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index 7ac476d..ccdf51d 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -363,7 +363,6 @@ typedef struct tagME_TextEditor RECT rcFormat; BOOL bDefaultFormatRect; BOOL bWordWrap; - int nInvalidOfs; int nTextLimit; EDITWORDBREAKPROCW pfnWordBreak; LPRICHEDITOLECALLBACK lpOleCallback; diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 728b623..3de26e1 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -1241,24 +1241,6 @@ void ME_EnsureVisible(ME_TextEditor *editor, ME_Cursor *pCursor) void -ME_InvalidateFromOfs(ME_TextEditor *editor, int nCharOfs) -{ - RECT rc; - int x, y, height; - ME_Cursor tmp; - - ME_RunOfsFromCharOfs(editor, nCharOfs, &tmp.pRun, &tmp.nOffset); - ME_GetCursorCoordinates(editor, &tmp, &x, &y, &height); - - rc.left = 0; - rc.top = y; - rc.bottom = y + height; - rc.right = editor->rcFormat.right; - ITextHost_TxInvalidateRect(editor->texthost, &rc, FALSE); -} - - -void ME_InvalidateSelection(ME_TextEditor *editor) { ME_DisplayItem *para1, *para2; @@ -1306,13 +1288,6 @@ ME_InvalidateSelection(ME_TextEditor *editor) assert(editor->pLastSelEndPara->type == diParagraph); } -void -ME_QueueInvalidateFromCursor(ME_TextEditor *editor, int nCursor) -{ - editor->nInvalidOfs = ME_GetCursorOfs(editor, nCursor); -} - - BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator) {
1
0
0
0
Dylan Smith : richedit: Typing is ignored while mouse is captured.
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: a6c7b6fdb278ef5c99d343894a188a80db849cb7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6c7b6fdb278ef5c99d343894…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Wed Jan 21 10:10:04 2009 -0500 richedit: Typing is ignored while mouse is captured. I noticed a while ago that on Windows XP richedit controls ignored characters typed while the mouse is captured (e.g. from holding the left or middle button down). Arrow keys, delete, and backspace, copying, cutting, pasting, and everything else handled on WM_CHAR and WM_KEYDOWN messages are also ignored. --- dlls/riched20/editor.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 09f3fb3..33964d6 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2155,6 +2155,8 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) BOOL ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000; BOOL shift_is_down = GetKeyState(VK_SHIFT) & 0x8000; + if (editor->bMouseCaptured) + return FALSE; if (nKey != VK_SHIFT && nKey != VK_CONTROL && nKey != VK_MENU) editor->nSelectionType = stPosition; @@ -2400,6 +2402,9 @@ static LRESULT ME_Char(ME_TextEditor *editor, WPARAM charCode, { WCHAR wstr; + if (editor->bMouseCaptured) + return 0; + if (unicode) wstr = (WCHAR)charCode; else
1
0
0
0
Dylan Smith : richedit: Added test for scroll position after EM_SETTEXTEX.
by Alexandre Julliard
22 Jan '09
22 Jan '09
Module: wine Branch: master Commit: 9b7825f6f66fd8264d8c0600fab95c540ae0dec0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b7825f6f66fd8264d8c0600f…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Wed Jan 21 10:09:58 2009 -0500 richedit: Added test for scroll position after EM_SETTEXTEX. --- dlls/riched20/tests/editor.c | 74 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 73 insertions(+), 1 deletions(-) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index aa78e2a..244ab09 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -3345,7 +3345,9 @@ static void test_EM_STREAMOUT(void) static void test_EM_SETTEXTEX(void) { - HWND hwndRichEdit = new_richedit(NULL); + HWND hwndRichEdit, parent; + SCROLLINFO si; + int sel_start, sel_end; SETTEXTEX setText; GETTEXTEX getText; WCHAR TestItem1[] = {'T', 'e', 's', 't', @@ -3392,6 +3394,76 @@ static void test_EM_SETTEXTEX(void) int result; CHARRANGE cr; EDITSTREAM es; + WNDCLASSA cls; + + /* Test the scroll position with and without a parent window. + * + * For some reason the scroll position is 0 after EM_SETTEXTEX + * with the ST_SELECTION flag only when the control has a parent + * window, even though the selection is at the end. */ + cls.style = 0; + cls.lpfnWndProc = DefWindowProcA; + cls.cbClsExtra = 0; + cls.cbWndExtra = 0; + cls.hInstance = GetModuleHandleA(0); + cls.hIcon = 0; + cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW); + cls.hbrBackground = GetStockObject(WHITE_BRUSH); + cls.lpszMenuName = NULL; + cls.lpszClassName = "ParentTestClass"; + if(!RegisterClassA(&cls)) assert(0); + + parent = CreateWindow(cls.lpszClassName, NULL, WS_POPUP|WS_VISIBLE, + 0, 0, 200, 60, NULL, NULL, NULL, NULL); + ok (parent != 0, "Failed to create parent window\n"); + + hwndRichEdit = CreateWindowEx(0, + RICHEDIT_CLASS, NULL, + ES_MULTILINE|WS_VSCROLL|WS_VISIBLE|WS_CHILD, + 0, 0, 200, 60, parent, NULL, + hmoduleRichEdit, NULL); + + setText.codepage = CP_ACP; + setText.flags = ST_SELECTION; + SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, + (LPARAM)"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}"); + si.cbSize = sizeof(si); + si.fMask = SIF_ALL; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + todo_wine ok(si.nPos == 0, "Position is incorrectly at %d\n", si.nPos); + SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); + ok(sel_start == 18, "Selection start incorrectly at %d\n", sel_start); + ok(sel_end == 18, "Selection end incorrectly at %d\n", sel_end); + + DestroyWindow(parent); + + /* Test without a parent window */ + hwndRichEdit = new_richedit(NULL); + setText.codepage = CP_ACP; + setText.flags = ST_SELECTION; + SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, + (LPARAM)"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}"); + si.cbSize = sizeof(si); + si.fMask = SIF_ALL; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok(si.nPos != 0, "Position is incorrectly at %d\n", si.nPos); + SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); + ok(sel_start == 18, "Selection start incorrectly at %d\n", sel_start); + ok(sel_end == 18, "Selection end incorrectly at %d\n", sel_end); + + /* The scroll position should also be 0 after EM_SETTEXTEX with ST_DEFAULT, + * but this time it is because the selection is at the beginning. */ + setText.codepage = CP_ACP; + setText.flags = ST_DEFAULT; + SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, + (LPARAM)"{\\rtf 1\\par 2\\par 3\\par 4\\par 5\\par 6\\par 7\\par 8\\par 9\\par}"); + si.cbSize = sizeof(si); + si.fMask = SIF_ALL; + GetScrollInfo(hwndRichEdit, SB_VERT, &si); + ok(si.nPos == 0, "Position is incorrectly at %d\n", si.nPos); + SendMessage(hwndRichEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); + ok(sel_start == 0, "Selection start incorrectly at %d\n", sel_start); + ok(sel_end == 0, "Selection end incorrectly at %d\n", sel_end); setText.codepage = 1200; /* no constant for unicode */ getText.codepage = 1200; /* no constant for unicode */
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
135
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Results per page:
10
25
50
100
200