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
September 2017
----- 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
446 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll: Avoid accessing builtin views outside of the critical section.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: 8dc8b3e9c06008c646e822d38d3458853254620c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8dc8b3e9c06008c646e822d38…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 11 19:50:30 2017 +0200 ntdll: Avoid accessing builtin views outside of the critical section. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/virtual.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 0505617..6065b79 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1634,25 +1634,25 @@ NTSTATUS virtual_create_builtin_view( void *module ) server_enter_uninterrupted_section( &csVirtual, &sigset ); status = create_view( &view, base, size, SEC_IMAGE | SEC_FILE | VPROT_SYSTEM | VPROT_COMMITTED | VPROT_READ | VPROT_WRITECOPY | VPROT_EXEC ); - if (!status) TRACE( "created %p-%p\n", base, (char *)base + size ); - server_leave_uninterrupted_section( &csVirtual, &sigset ); - - if (status) return status; + if (!status) + { + TRACE( "created %p-%p\n", base, (char *)base + size ); - /* The PE header is always read-only, no write, no execute. */ - set_page_vprot( view->base, page_size, VPROT_COMMITTED | VPROT_READ ); + /* The PE header is always read-only, no write, no execute. */ + set_page_vprot( base, page_size, VPROT_COMMITTED | VPROT_READ ); - sec = (IMAGE_SECTION_HEADER *)((char *)&nt->OptionalHeader + nt->FileHeader.SizeOfOptionalHeader); - for (i = 0; i < nt->FileHeader.NumberOfSections; i++) - { - BYTE flags = VPROT_COMMITTED; + sec = (IMAGE_SECTION_HEADER *)((char *)&nt->OptionalHeader + nt->FileHeader.SizeOfOptionalHeader); + for (i = 0; i < nt->FileHeader.NumberOfSections; i++) + { + BYTE flags = VPROT_COMMITTED; - if (sec[i].Characteristics & IMAGE_SCN_MEM_EXECUTE) flags |= VPROT_EXEC; - if (sec[i].Characteristics & IMAGE_SCN_MEM_READ) flags |= VPROT_READ; - if (sec[i].Characteristics & IMAGE_SCN_MEM_WRITE) flags |= VPROT_WRITE; - set_page_vprot( (char *)view->base + sec[i].VirtualAddress, sec[i].Misc.VirtualSize, flags ); + if (sec[i].Characteristics & IMAGE_SCN_MEM_EXECUTE) flags |= VPROT_EXEC; + if (sec[i].Characteristics & IMAGE_SCN_MEM_READ) flags |= VPROT_READ; + if (sec[i].Characteristics & IMAGE_SCN_MEM_WRITE) flags |= VPROT_WRITE; + set_page_vprot( (char *)base + sec[i].VirtualAddress, sec[i].Misc.VirtualSize, flags ); + } } - + server_leave_uninterrupted_section( &csVirtual, &sigset ); return status; }
1
0
0
0
Dmitry Timoshkov : windowscodecs: Implement IWICBitmapFrameEncode:: SetPalette in JPEG encoder.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: a901fa9dc39b02049db9cebdfbae03369f08d5db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a901fa9dc39b02049db9cebdf…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Sep 11 11:40:27 2017 -0500 windowscodecs: Implement IWICBitmapFrameEncode::SetPalette in JPEG encoder. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/jpegformat.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index 014620f..69d1187 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -868,6 +868,8 @@ typedef struct JpegEncoder { double xres, yres; const jpeg_compress_format *format; IStream *stream; + WICColor palette[256]; + UINT colors; CRITICAL_SECTION lock; BYTE dest_buffer[1024]; } JpegEncoder; @@ -1070,10 +1072,24 @@ static HRESULT WINAPI JpegEncoder_Frame_SetColorContexts(IWICBitmapFrameEncode * } static HRESULT WINAPI JpegEncoder_Frame_SetPalette(IWICBitmapFrameEncode *iface, - IWICPalette *pIPalette) + IWICPalette *palette) { - FIXME("(%p,%p): stub\n", iface, pIPalette); - return WINCODEC_ERR_UNSUPPORTEDOPERATION; + JpegEncoder *This = impl_from_IWICBitmapFrameEncode(iface); + HRESULT hr; + + TRACE("(%p,%p)\n", iface, palette); + + if (!palette) return E_INVALIDARG; + + EnterCriticalSection(&This->lock); + + if (This->frame_initialized) + hr = IWICPalette_GetColors(palette, 256, This->palette, &This->colors); + else + hr = WINCODEC_ERR_NOTINITIALIZED; + + LeaveCriticalSection(&This->lock); + return hr; } static HRESULT WINAPI JpegEncoder_Frame_SetThumbnail(IWICBitmapFrameEncode *iface, @@ -1543,6 +1559,7 @@ HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv) This->xres = This->yres = 0.0; This->format = NULL; This->stream = NULL; + This->colors = 0; InitializeCriticalSection(&This->lock); This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JpegEncoder.lock");
1
0
0
0
Fabian Maurer : evr: Add interface definitions for EVR filter.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: 0f94101716c25703578e5737819b925bfca8374d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f94101716c25703578e57378…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Mon Sep 11 00:40:12 2017 +0200 evr: Add interface definitions for EVR filter. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/Makefile.in | 1 + include/evr.idl | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) diff --git a/include/Makefile.in b/include/Makefile.in index 8a774e9..2bd41e9 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -70,6 +70,7 @@ IDL_SRCS = \ dyngraph.idl \ endpointvolume.idl \ errrec.idl \ + evr.idl \ exdisp.idl \ fusion.idl \ gameux.idl \ diff --git a/include/evr.idl b/include/evr.idl new file mode 100644 index 0000000..22f745e --- /dev/null +++ b/include/evr.idl @@ -0,0 +1,98 @@ +/* + * COM Classes for evr + * + * Copyright 2017 Fabian Maurer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "propidl.idl"; +import "mfidl.idl"; +import "mftransform.idl"; +import "mediaobj.idl"; +import "strmif.idl"; + +typedef enum _MFVP_MESSAGE_TYPE { + MFVP_MESSAGE_FLUSH, + MFVP_MESSAGE_INVALIDATEMEDIATYPE, + MFVP_MESSAGE_PROCESSINPUTNOTIFY, + MFVP_MESSAGE_BEGINSTREAMING, + MFVP_MESSAGE_ENDSTREAMING, + MFVP_MESSAGE_ENDOFSTREAM, + MFVP_MESSAGE_STEP, + MFVP_MESSAGE_CANCELSTEP, +} MFVP_MESSAGE_TYPE; + +[ + object, + uuid(29aff080-182a-4a5d-af3b-448f3a6346cb), + local +] +interface IMFVideoPresenter : IMFClockStateSink +{ + HRESULT ProcessMessage( + [in] MFVP_MESSAGE_TYPE eMessage, + [in] ULONG_PTR ulParam + ); + HRESULT GetCurrentMediaType( + [out] IMFVideoMediaType **ppMediaType + ); +} + +[ + object, + uuid(83e91e85-82c1-4ea7-801d-85dc50b75086), + local +] +interface IEVRFilterConfig : IUnknown +{ + HRESULT SetNumberOfStreams( + [in] DWORD dwMaxStreams + ); + HRESULT GetNumberOfStreams( + [out] DWORD *pdwMaxStreams + ); +} + +[ + object, + uuid(1f6a9f17-e70b-4e24-8ae4-0b2c3ba7a4ae), + local +] +interface IMFVideoPositionMapper : IUnknown +{ + HRESULT MapOutputCoordinateToInputStream( + [in] float xOut, + [in] float yOut, + [in] DWORD dwOutputStreamIndex, + [in] DWORD dwInputStreamIndex, + [out] float *pxIn, + [out] float *pyIn + ); +} + +[ + object, + uuid(dfdfd197-a9ca-43d8-b341-6af3503792cd), + local +] +interface IMFVideoRenderer : IUnknown +{ + HRESULT InitializeRenderer( + [in] IMFTransform *pVideoMixer, + [in] IMFVideoPresenter *pVideoPresenter + ); +}
1
0
0
0
Fabian Maurer : dxva2api.idl: Add interface IDirectXVideoMemoryConfiguration.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: b713c7bc956431f4f817ea241fdd8ad1657ef9dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b713c7bc956431f4f817ea241…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Mon Sep 11 00:40:11 2017 +0200 dxva2api.idl: Add interface IDirectXVideoMemoryConfiguration. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/dxva2api.idl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/dxva2api.idl b/include/dxva2api.idl index 7a29157..8739b82 100644 --- a/include/dxva2api.idl +++ b/include/dxva2api.idl @@ -292,6 +292,13 @@ typedef struct _DXVA2_VideoSample DWORD SampleData; } DXVA2_VideoSample; +typedef enum +{ + DXVA2_SurfaceType_DecoderRenderTarget, + DXVA2_SurfaceType_ProcessorRenderTarget, + DXVA2_SurfaceType_D3DRenderTargetTexture, +} DXVA2_SurfaceType; + interface IDirectXVideoDecoder; interface IDirectXVideoProcessor; @@ -525,3 +532,21 @@ interface IDirectXVideoProcessor : IUnknown [in] UINT NumSamples, [out] HANDLE* pHandleCompleteIDirect3DDeviceManager9); }; + +/***************************************************************************** + * IDirectXVideoMemoryConfiguration interface + */ +[ + object, + uuid(b7f916dd-db3b-49c1-84d7-e45ef99ec726), + local +] +interface IDirectXVideoMemoryConfiguration : IUnknown +{ + HRESULT GetAvailableSurfaceTypeByIndex( + [in] DWORD wTypeIndex, + [out] DXVA2_SurfaceType *pdwType); + + HRESULT SetSurfaceType( + [in] DXVA2_SurfaceType dwType); +}
1
0
0
0
Fabian Maurer : mfidl.idl: Add interfaces IMFClockStateSink, IMFGetService.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: 5e1882fe1bbfeab69aa3e0bf7e90740566f0a0b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e1882fe1bbfeab69aa3e0bf7…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Mon Sep 11 00:40:10 2017 +0200 mfidl.idl: Add interfaces IMFClockStateSink, IMFGetService. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/mfidl.idl | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/include/mfidl.idl b/include/mfidl.idl index b0fadba..7e37396 100644 --- a/include/mfidl.idl +++ b/include/mfidl.idl @@ -212,6 +212,44 @@ interface IMFStreamDescriptor : IMFAttributes HRESULT GetMediaTypeHandler([out] IMFMediaTypeHandler **handler); } +[ + object, + uuid(f6696e82-74f7-4f3d-a178-8a5e09c3659f) +] +interface IMFClockStateSink : IUnknown +{ + HRESULT OnClockStart( + [in] MFTIME hnsSystemTime, + [in] LONGLONG llClockStartOffset + ); + HRESULT OnClockStop( + [in] MFTIME hnssSystemTime + ); + HRESULT OnClockPause( + [in] MFTIME hnsSystemTime + ); + HRESULT OnClockRestart( + [in] MFTIME hnsSystemTime + ); + HRESULT OnClockSetRate( + [in] MFTIME hnsSystemTime, + [in] float flRate + ); +} + +[ + object, + uuid(fa993888-4383-415a-a930-dd472a8cf6f7) +] +interface IMFGetService : IUnknown +{ + HRESULT GetService( + [in] REFGUID guidService, + [in] REFIID riid, + [out, iid_is(riid)] LPVOID *ppvObject + ); +} + cpp_quote("HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **session);") cpp_quote("HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);") cpp_quote("HRESULT WINAPI MFCreateTopology(IMFTopology **topology);")
1
0
0
0
Nikolay Sivov : qcap: Remove redundant filter state check.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: 87d1de6c625c079a32b401d6d3fa19092fe1d967 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=87d1de6c625c079a32b401d6d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 11 12:54:04 2017 +0300 qcap: Remove redundant filter state check. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/smartteefilter.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index 55fcde5..27aee47 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -149,9 +149,7 @@ static HRESULT WINAPI SmartTeeFilter_Stop(IBaseFilter *iface) SmartTeeFilter *This = impl_from_IBaseFilter(iface); TRACE("(%p)\n", This); EnterCriticalSection(&This->filter.csFilter); - if(This->filter.state != State_Stopped) { - This->filter.state = State_Stopped; - } + This->filter.state = State_Stopped; LeaveCriticalSection(&This->filter.csFilter); return S_OK; }
1
0
0
0
Nikolay Sivov : comctl32/tooltips: Calm down trace messages.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: 62daeec1e20090fd2c2e227cc657e5b35f929ec2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=62daeec1e20090fd2c2e227cc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 11 12:40:05 2017 +0300 comctl32/tooltips: Calm down trace messages. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tooltips.c | 63 +++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 030e775..bbf1693 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -403,7 +403,7 @@ static void TOOLTIPS_GetDispInfoA(const TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *too } } else { - ERR("recursive text callback!\n"); + ERR("recursive text callback\n"); buffer[0] = '\0'; } @@ -459,7 +459,7 @@ static void TOOLTIPS_GetDispInfoW(const TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *too } } else { - ERR("recursive text callback!\n"); + ERR("recursive text callback\n"); buffer[0] = '\0'; } @@ -594,7 +594,7 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate) { if (infoPtr->nTrackTool == -1) { - TRACE("invalid tracking tool (-1)!\n"); + TRACE("invalid tracking tool %d\n", infoPtr->nTrackTool); return; } nTool = infoPtr->nTrackTool; @@ -603,13 +603,13 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate) { if (infoPtr->nTool == -1) { - TRACE("invalid tool (-1)!\n"); - return; + TRACE("invalid tool %d\n", infoPtr->nTool); + return; } nTool = infoPtr->nTool; } - TRACE("Show tooltip pre %d! (%p)\n", nTool, infoPtr->hwndSelf); + TRACE("Show tooltip pre %d, %p\n", nTool, infoPtr->hwndSelf); current = infoPtr->nCurrentTool; if (!track_activate) @@ -625,7 +625,7 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate) toolPtr = &infoPtr->tools[nTool]; - TRACE("Show tooltip %d!\n", nTool); + TRACE("Show tooltip %d\n", nTool); hdr.hwndFrom = infoPtr->hwndSelf; hdr.idFrom = toolPtr->uId; @@ -835,9 +835,9 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate) if (!track_activate) { SetTimer (infoPtr->hwndSelf, ID_TIMERPOP, infoPtr->nAutoPopTime, 0); - TRACE("timer 2 started!\n"); + TRACE("timer 2 started\n"); SetTimer (infoPtr->hwndSelf, ID_TIMERLEAVE, infoPtr->nReshowTime, 0); - TRACE("timer 3 started!\n"); + TRACE("timer 3 started\n"); } } @@ -848,7 +848,7 @@ TOOLTIPS_Hide (TOOLTIPS_INFO *infoPtr) TTTOOL_INFO *toolPtr; NMHDR hdr; - TRACE("Hide tooltip %d! (%p)\n", infoPtr->nCurrentTool, infoPtr->hwndSelf); + TRACE("Hide tooltip %d, %p.\n", infoPtr->nCurrentTool, infoPtr->hwndSelf); if (infoPtr->nCurrentTool == -1) return; @@ -1039,8 +1039,7 @@ TOOLTIPS_Activate (TOOLTIPS_INFO *infoPtr, BOOL activate) { infoPtr->bActive = activate; - if (infoPtr->bActive) - TRACE("activate!\n"); + TRACE("activate %d\n", activate); if (!(infoPtr->bActive) && (infoPtr->nCurrentTool != -1)) TOOLTIPS_Hide (infoPtr); @@ -1057,9 +1056,8 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW) if (!ti) return FALSE; - TRACE("add tool (%p) %p %ld%s!\n", - infoPtr->hwndSelf, ti->hwnd, ti->uId, - (ti->uFlags & TTF_IDISHWND) ? " TTF_IDISHWND" : ""); + TRACE("add tool (%p) %p %ld%s\n", infoPtr->hwndSelf, ti->hwnd, ti->uId, + (ti->uFlags & TTF_IDISHWND) ? " TTF_IDISHWND" : ""); if (ti->cbSize >= TTTOOLINFOW_V2_SIZE && !ti->lpszText && isW) return FALSE; @@ -1095,18 +1093,18 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW) } else if (ti->lpszText) { if (TOOLTIPS_IsCallbackString(ti->lpszText, isW)) { - TRACE("add CALLBACK!\n"); + TRACE("add CALLBACK\n"); toolPtr->lpszText = LPSTR_TEXTCALLBACKW; } else if (isW) { INT len = lstrlenW (ti->lpszText); - TRACE("add text %s!\n", debugstr_w(ti->lpszText)); + TRACE("add text %s\n", debugstr_w(ti->lpszText)); toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR)); strcpyW (toolPtr->lpszText, ti->lpszText); } else { INT len = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, NULL, 0); - TRACE("add text \"%s\"!\n", (LPSTR)ti->lpszText); + TRACE("add text \"%s\"\n", debugstr_a((char *)ti->lpszText)); toolPtr->lpszText = Alloc (len * sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, toolPtr->lpszText, len); } @@ -1126,7 +1124,7 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW) SetWindowSubclass(toolPtr->hwnd, TOOLTIPS_SubclassProc, 1, (DWORD_PTR)infoPtr->hwndSelf); } - TRACE("subclassing installed!\n"); + TRACE("subclassing installed\n"); } nResult = SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT, @@ -1138,7 +1136,7 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW) toolPtr->bNotifyUnicode = TRUE; TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n"); } else { - TRACE (" -- WM_NOTIFYFORMAT returns: error!\n"); + TRACE (" -- WM_NOTIFYFORMAT returns: %d\n", nResult); } return TRUE; @@ -1423,7 +1421,7 @@ TOOLTIPS_HitTestT (const TOOLTIPS_INFO *infoPtr, LPTTHITTESTINFOW lptthit, if (nTool == -1) return FALSE; - TRACE("tool %d!\n", nTool); + TRACE("tool %d\n", nTool); /* copy tool data */ if (lptthit->ti.cbSize >= TTTOOLINFOW_V1_SIZE) @@ -1470,7 +1468,7 @@ TOOLTIPS_RelayEvent (TOOLTIPS_INFO *infoPtr, LPMSG lpMsg) INT nOldTool; if (!lpMsg) { - ERR("lpMsg == NULL!\n"); + ERR("lpMsg == NULL\n"); return 0; } @@ -1501,14 +1499,14 @@ TOOLTIPS_RelayEvent (TOOLTIPS_INFO *infoPtr, LPMSG lpMsg) } else if (nOldTool == -1) { /* Moved from outside */ if(infoPtr->bActive) { SetTimer(infoPtr->hwndSelf, ID_TIMERSHOW, infoPtr->nInitialTime, 0); - TRACE("timer 1 started!\n"); + TRACE("timer 1 started\n"); } } else { /* Moved from one to another */ TOOLTIPS_Hide (infoPtr); KillTimer(infoPtr->hwndSelf, ID_TIMERLEAVE); if(infoPtr->bActive) { SetTimer (infoPtr->hwndSelf, ID_TIMERSHOW, infoPtr->nReshowTime, 0); - TRACE("timer 1 started!\n"); + TRACE("timer 1 started\n"); } } } else if(infoPtr->nCurrentTool != -1) { /* restart autopop */ @@ -1518,7 +1516,7 @@ TOOLTIPS_RelayEvent (TOOLTIPS_INFO *infoPtr, LPMSG lpMsg) } else if(infoPtr->nTool != -1 && infoPtr->bActive) { /* previous show attempt didn't result in tooltip so try again */ SetTimer(infoPtr->hwndSelf, ID_TIMERSHOW, infoPtr->nInitialTime, 0); - TRACE("timer 1 started!\n"); + TRACE("timer 1 started\n"); } break; } @@ -1674,7 +1672,7 @@ TOOLTIPS_SetToolInfoT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW) toolPtr->hinst = ti->hinst; if (IS_INTRESOURCE(ti->lpszText)) { - TRACE("set string id %x!\n", LOWORD(ti->lpszText)); + TRACE("set string id %x\n", LOWORD(ti->lpszText)); toolPtr->lpszText = ti->lpszText; } else { @@ -1733,7 +1731,7 @@ TOOLTIPS_TrackActivate (TOOLTIPS_INFO *infoPtr, BOOL track_activate, const TTTOO /* activate */ infoPtr->nTrackTool = TOOLTIPS_GetToolFromInfoT (infoPtr, (const TTTOOLINFOW*)ti); if (infoPtr->nTrackTool != -1) { - TRACE("activated!\n"); + TRACE("activated\n"); infoPtr->bTrackActive = TRUE; TOOLTIPS_TrackShow (infoPtr); } @@ -1745,7 +1743,7 @@ TOOLTIPS_TrackActivate (TOOLTIPS_INFO *infoPtr, BOOL track_activate, const TTTOO infoPtr->bTrackActive = FALSE; infoPtr->nTrackTool = -1; - TRACE("deactivated!\n"); + TRACE("deactivated\n"); } return 0; @@ -1968,7 +1966,7 @@ TOOLTIPS_NCHitTest (const TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam) if ((nTool > -1) && (nTool < infoPtr->uNumTools)) { if (infoPtr->tools[nTool].uFlags & TTF_TRANSPARENT) { - TRACE("-- in transparent mode!\n"); + TRACE("-- in transparent mode\n"); return HTTRANSPARENT; } } @@ -2015,9 +2013,8 @@ TOOLTIPS_SetFont (TOOLTIPS_INFO *infoPtr, HFONT hFont, BOOL redraw) lf.lfWeight = FW_BOLD; infoPtr->hTitleFont = CreateFontIndirectW(&lf); - if (redraw && infoPtr->nCurrentTool != -1) { - FIXME("full redraw needed!\n"); - } + if (redraw && infoPtr->nCurrentTool != -1) + FIXME("full redraw needed\n"); return 0; } @@ -2066,7 +2063,7 @@ TOOLTIPS_Timer (TOOLTIPS_INFO *infoPtr, INT iTimer) { INT nOldTool; - TRACE("timer %d (%p) expired!\n", iTimer, infoPtr->hwndSelf); + TRACE("timer %d (%p) expired\n", iTimer, infoPtr->hwndSelf); switch (iTimer) { case ID_TIMERSHOW:
1
0
0
0
Nikolay Sivov : comctl32/tooltips: Set current tool before sending TTN_NEEDTEXT.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: 6bbea5d074e9543856f5b9cd734bd6716179bf52 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6bbea5d074e9543856f5b9cd7…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 11 12:40:04 2017 +0300 comctl32/tooltips: Set current tool before sending TTN_NEEDTEXT. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tooltips.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 41146f1..030e775 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -588,7 +588,7 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate) NMHDR hdr; int ptfx = 0; DWORD style = GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE); - INT nTool; + INT nTool, current; if (track_activate) { @@ -611,16 +611,20 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate) TRACE("Show tooltip pre %d! (%p)\n", nTool, infoPtr->hwndSelf); + current = infoPtr->nCurrentTool; + if (!track_activate) + infoPtr->nCurrentTool = infoPtr->nTool; + TOOLTIPS_GetTipText (infoPtr, nTool, infoPtr->szTipText); if (infoPtr->szTipText[0] == '\0') + { + infoPtr->nCurrentTool = current; return; + } toolPtr = &infoPtr->tools[nTool]; - if (!track_activate) - infoPtr->nCurrentTool = infoPtr->nTool; - TRACE("Show tooltip %d!\n", nTool); hdr.hwndFrom = infoPtr->hwndSelf;
1
0
0
0
Nikolay Sivov : comctl32/tooltips: Return full toolinfo from TTM_GETCURRENTTOOL.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: 5312cc6dc298165c855bcb4d49642cd0c8014108 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5312cc6dc298165c855bcb4d4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 11 12:40:03 2017 +0300 comctl32/tooltips: Return full toolinfo from TTM_GETCURRENTTOOL. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/tooltips.c | 37 ++++++++++-------- dlls/comctl32/tooltips.c | 87 +++++++++++++----------------------------- 2 files changed, 47 insertions(+), 77 deletions(-) diff --git a/dlls/comctl32/tests/tooltips.c b/dlls/comctl32/tests/tooltips.c index 1fb9579..be6ab40 100644 --- a/dlls/comctl32/tests/tooltips.c +++ b/dlls/comctl32/tests/tooltips.c @@ -151,8 +151,8 @@ static void test_customdraw(void) { DWORD iterationNumber; WNDCLASSA wc; - LRESULT lResult; POINT orig_pos; + LRESULT ret; /* Create a class to use the custom draw wndproc */ wc.style = CS_HREDRAW | CS_VREDRAW; @@ -216,8 +216,8 @@ static void test_customdraw(void) { toolInfo.lpszText = (LPSTR)"This is a test tooltip"; toolInfo.lParam = 0xdeadbeef; GetClientRect (parent, &toolInfo.rect); - lResult = SendMessageA(hwndTip, TTM_ADDTOOLA, 0, (LPARAM)&toolInfo); - ok(lResult, "Adding the tool to the tooltip failed\n"); + ret = SendMessageA(hwndTip, TTM_ADDTOOLA, 0, (LPARAM)&toolInfo); + ok(ret, "Failed to add the tool.\n"); /* Make tooltip appear quickly */ SendMessageA(hwndTip, TTM_SETDELAYTIME, TTDT_INITIAL, MAKELPARAM(1,0)); @@ -236,6 +236,20 @@ static void test_customdraw(void) { expectedResults[iterationNumber].ExpectedCalls); } + ret = SendMessageA(hwndTip, TTM_GETCURRENTTOOLA, 0, 0); + ok(ret, "Failed to get current tool %#lx.\n", ret); + + memset(&toolInfo, 0xcc, sizeof(toolInfo)); + toolInfo.cbSize = sizeof(toolInfo); + toolInfo.lpszText = NULL; + toolInfo.lpReserved = (void *)0xdeadbeef; + SendMessageA(hwndTip, TTM_GETCURRENTTOOLA, 0, (LPARAM)&toolInfo); + ok(toolInfo.hwnd == parent, "Unexpected hwnd %p.\n", toolInfo.hwnd); + ok(toolInfo.hinst == GetModuleHandleA(NULL), "Unexpected hinst %p.\n", toolInfo.hinst); + ok(toolInfo.uId == 0x1234abcd, "Unexpected uId %lx.\n", toolInfo.uId); + ok(toolInfo.lParam == 0, "Unexpected lParam %lx.\n", toolInfo.lParam); + ok(toolInfo.lpReserved == (void *)0xdeadbeef, "Unexpected lpReserved %p.\n", toolInfo.lpReserved); + /* Clean up */ DestroyWindow(hwndTip); DestroyWindow(parent); @@ -491,9 +505,8 @@ static void test_ttm_gettoolinfo(void) HWND hwnd; DWORD r; - hwnd = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0, - 10, 10, 300, 100, - NULL, NULL, NULL, 0); + hwnd = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0, 10, 10, 300, 100, NULL, NULL, NULL, 0); + ok(hwnd != NULL, "Failed to create tooltip control.\n"); ti.cbSize = TTTOOLINFOA_V2_SIZE; ti.hwnd = NULL; @@ -611,11 +624,7 @@ static void test_ttm_gettoolinfo(void) hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0, 10, 10, 300, 100, NULL, NULL, NULL, 0); - if(!hwnd) - { - win_skip("CreateWindowExW() not supported. Skipping.\n"); - return; - } + ok(hwnd != NULL, "Failed to create tooltip window.\n"); tiW.cbSize = TTTOOLINFOW_V1_SIZE - 1; tiW.hwnd = NULL; @@ -757,11 +766,7 @@ static void test_longtextW(void) hwnd = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0, 10, 10, 300, 100, NULL, NULL, NULL, 0); - if(!hwnd) - { - win_skip("CreateWindowExW() not supported. Skipping.\n"); - return; - } + ok(hwnd != NULL, "Failed to create tooltip window.\n"); toolinfoW.cbSize = TTTOOLINFOW_V2_SIZE; toolinfoW.hwnd = NULL; diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 56dc743..41146f1 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -953,8 +953,16 @@ TOOLTIPS_GetToolFromPoint (const TOOLTIPS_INFO *infoPtr, HWND hwnd, const POINT } static inline void -TOOLTIPS_CopyInfoT (const TTTOOL_INFO *toolPtr, TTTOOLINFOW *ti, BOOL isW) +TOOLTIPS_CopyInfoT (const TOOLTIPS_INFO *infoPtr, INT index, TTTOOLINFOW *ti, BOOL isW) { + const TTTOOL_INFO *toolPtr = &infoPtr->tools[index]; + + ti->uFlags = toolPtr->uFlags; + ti->hwnd = toolPtr->hwnd; + ti->uId = toolPtr->uId; + ti->rect = toolPtr->rect; + ti->hinst = toolPtr->hinst; + if (ti->lpszText) { if (toolPtr->lpszText == NULL || IS_INTRESOURCE(toolPtr->lpszText) || @@ -967,6 +975,11 @@ TOOLTIPS_CopyInfoT (const TTTOOL_INFO *toolPtr, TTTOOLINFOW *ti, BOOL isW) WideCharToMultiByte(CP_ACP, 0, toolPtr->lpszText, -1, (LPSTR)ti->lpszText, MAX_TEXT_SIZE_A, NULL, NULL); } + + if (ti->cbSize >= TTTOOLINFOW_V2_SIZE) + ti->lParam = toolPtr->lParam; + + /* lpReserved is intentionally not set. */ } static BOOL @@ -1220,28 +1233,14 @@ static LRESULT TOOLTIPS_EnumToolsT (const TOOLTIPS_INFO *infoPtr, UINT uIndex, TTTOOLINFOW *ti, BOOL isW) { - TTTOOL_INFO *toolPtr; - - if (!ti) return FALSE; - if (ti->cbSize < TTTOOLINFOW_V1_SIZE) + if (!ti || ti->cbSize < TTTOOLINFOW_V1_SIZE) return FALSE; if (uIndex >= infoPtr->uNumTools) return FALSE; TRACE("index=%u\n", uIndex); - toolPtr = &infoPtr->tools[uIndex]; - - /* copy tool data */ - ti->uFlags = toolPtr->uFlags; - ti->hwnd = toolPtr->hwnd; - ti->uId = toolPtr->uId; - ti->rect = toolPtr->rect; - ti->hinst = toolPtr->hinst; - TOOLTIPS_CopyInfoT (toolPtr, ti, isW); - - if (ti->cbSize >= TTTOOLINFOA_V2_SIZE) - ti->lParam = toolPtr->lParam; + TOOLTIPS_CopyInfoT (infoPtr, uIndex, ti, isW); return TRUE; } @@ -1271,31 +1270,15 @@ TOOLTIPS_GetBubbleSize (const TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *lpToolI static LRESULT TOOLTIPS_GetCurrentToolT (const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW) { - TTTOOL_INFO *toolPtr; - if (ti) { if (ti->cbSize < TTTOOLINFOW_V1_SIZE) return FALSE; - if (infoPtr->nCurrentTool > -1) { - toolPtr = &infoPtr->tools[infoPtr->nCurrentTool]; - - /* copy tool data */ - ti->uFlags = toolPtr->uFlags; - ti->rect = toolPtr->rect; - ti->hinst = toolPtr->hinst; - TOOLTIPS_CopyInfoT (toolPtr, ti, isW); - - if (ti->cbSize >= TTTOOLINFOW_V2_SIZE) - ti->lParam = toolPtr->lParam; - - return TRUE; - } - else - return FALSE; + if (infoPtr->nCurrentTool != -1) + TOOLTIPS_CopyInfoT (infoPtr, infoPtr->nCurrentTool, ti, isW); } - else - return (infoPtr->nCurrentTool != -1); + + return infoPtr->nCurrentTool != -1; } @@ -1400,8 +1383,8 @@ TOOLTIPS_GetToolCount (const TOOLTIPS_INFO *infoPtr) static LRESULT TOOLTIPS_GetToolInfoT (const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW) { - TTTOOL_INFO *toolPtr; INT nTool; + HWND hwnd; if (!ti) return FALSE; if (ti->cbSize < TTTOOLINFOW_V1_SIZE) @@ -1415,16 +1398,9 @@ TOOLTIPS_GetToolInfoT (const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW) TRACE("tool %d\n", nTool); - toolPtr = &infoPtr->tools[nTool]; - - /* copy tool data */ - ti->uFlags = toolPtr->uFlags; - ti->rect = toolPtr->rect; - ti->hinst = toolPtr->hinst; - TOOLTIPS_CopyInfoT (toolPtr, ti, isW); - - if (ti->cbSize >= TTTOOLINFOW_V2_SIZE) - ti->lParam = toolPtr->lParam; + hwnd = ti->hwnd; + TOOLTIPS_CopyInfoT (infoPtr, nTool, ti, isW); + ti->hwnd = hwnd; return TRUE; } @@ -1434,7 +1410,6 @@ static LRESULT TOOLTIPS_HitTestT (const TOOLTIPS_INFO *infoPtr, LPTTHITTESTINFOW lptthit, BOOL isW) { - TTTOOL_INFO *toolPtr; INT nTool; if (lptthit == 0) @@ -1447,18 +1422,8 @@ TOOLTIPS_HitTestT (const TOOLTIPS_INFO *infoPtr, LPTTHITTESTINFOW lptthit, TRACE("tool %d!\n", nTool); /* copy tool data */ - if (lptthit->ti.cbSize >= TTTOOLINFOW_V1_SIZE) { - toolPtr = &infoPtr->tools[nTool]; - - lptthit->ti.uFlags = toolPtr->uFlags; - lptthit->ti.hwnd = toolPtr->hwnd; - lptthit->ti.uId = toolPtr->uId; - lptthit->ti.rect = toolPtr->rect; - lptthit->ti.hinst = toolPtr->hinst; - TOOLTIPS_CopyInfoT (toolPtr, &lptthit->ti, isW); - if (lptthit->ti.cbSize >= TTTOOLINFOW_V2_SIZE) - lptthit->ti.lParam = toolPtr->lParam; - } + if (lptthit->ti.cbSize >= TTTOOLINFOW_V1_SIZE) + TOOLTIPS_CopyInfoT (infoPtr, nTool, &lptthit->ti, isW); return TRUE; }
1
0
0
0
Nikolay Sivov : dwrite: Support DWRITE_TRIMMING_GRANULARITY_WORD mode.
by Alexandre Julliard
11 Sep '17
11 Sep '17
Module: wine Branch: master Commit: 096df5f5baa11d8417309c5dc4a776b4c8bb89db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=096df5f5baa11d8417309c5dc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 11 12:37:14 2017 +0300 dwrite: Support DWRITE_TRIMMING_GRANULARITY_WORD mode. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 9109107..4b67ce0 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -1879,7 +1879,15 @@ static void layout_add_line(struct dwrite_textlayout *layout, UINT32 first_clust while (last_cluster > first_cluster) { if (trimmed_width + sign_metrics.width <= layout->metrics.layoutWidth) break; - trimmed_width -= layout->clustermetrics[last_cluster--].width; + if (layout->format.trimming.granularity == DWRITE_TRIMMING_GRANULARITY_CHARACTER) + trimmed_width -= layout->clustermetrics[last_cluster--].width; + else { + while (last_cluster > first_cluster) { + trimmed_width -= layout->clustermetrics[last_cluster].width; + if (layout->clustermetrics[last_cluster--].canWrapLineAfter) + break; + } + } } append_trimming_run = TRUE; }
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
45
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
Results per page:
10
25
50
100
200