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 2020
----- 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
1 participants
796 discussions
Start a n
N
ew thread
Nikolay Sivov : mf/evr: Implement NotifyPreroll().
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: 4e11368295174a7dc39647b19fb172bb0770e9b3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4e11368295174a7dc39647b1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Oct 16 16:38:10 2020 +0300 mf/evr: Implement NotifyPreroll(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/evr.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c index ac80193ddd6..0cd13c25501 100644 --- a/dlls/mf/evr.c +++ b/dlls/mf/evr.c @@ -35,6 +35,12 @@ enum video_renderer_flags EVR_PRESENTER_INITED_SERVICES = 0x8, }; +enum video_stream_flags +{ + EVR_STREAM_PREROLLING = 0x1, + EVR_STREAM_PREROLLED = 0x2, +}; + struct video_renderer; struct video_stream @@ -44,6 +50,7 @@ struct video_stream IMFGetService IMFGetService_iface; LONG refcount; unsigned int id; + unsigned int flags; struct video_renderer *parent; IMFMediaEventQueue *event_queue; IMFVideoSampleAllocator *allocator; @@ -318,8 +325,19 @@ static HRESULT WINAPI video_stream_sink_GetMediaTypeHandler(IMFStreamSink *iface static HRESULT WINAPI video_stream_sink_ProcessSample(IMFStreamSink *iface, IMFSample *sample) { + struct video_stream *stream = impl_from_IMFStreamSink(iface); + FIXME("%p, %p.\n", iface, sample); + EnterCriticalSection(&stream->cs); + if (stream->flags & EVR_STREAM_PREROLLING) + { + IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, MEStreamSinkPrerolled, &GUID_NULL, S_OK, NULL); + stream->flags &= ~EVR_STREAM_PREROLLING; + stream->flags |= EVR_STREAM_PREROLLED; + } + LeaveCriticalSection(&stream->cs); + return E_NOTIMPL; } @@ -958,9 +976,34 @@ static ULONG WINAPI video_renderer_preroll_Release(IMFMediaSinkPreroll *iface) static HRESULT WINAPI video_renderer_preroll_NotifyPreroll(IMFMediaSinkPreroll *iface, MFTIME start_time) { - FIXME("%p, %s.\n", iface, debugstr_time(start_time)); + struct video_renderer *renderer = impl_from_IMFMediaSinkPreroll(iface); + HRESULT hr = S_OK; + size_t i; - return E_NOTIMPL; + TRACE("%p, %s.\n", iface, debugstr_time(start_time)); + + EnterCriticalSection(&renderer->cs); + if (renderer->flags & EVR_SHUT_DOWN) + hr = MF_E_SHUTDOWN; + else + { + for (i = 0; i < renderer->stream_count; ++i) + { + struct video_stream *stream = renderer->streams[i]; + + EnterCriticalSection(&stream->cs); + if (!(stream->flags & (EVR_STREAM_PREROLLING | EVR_STREAM_PREROLLED))) + { + IMFMediaEventQueue_QueueEventParamVar(stream->event_queue, MEStreamSinkRequestSample, + &GUID_NULL, S_OK, NULL); + stream->flags |= EVR_STREAM_PREROLLING; + } + LeaveCriticalSection(&stream->cs); + } + } + LeaveCriticalSection(&renderer->cs); + + return hr; } static const IMFMediaSinkPrerollVtbl video_renderer_preroll_vtbl =
1
0
0
0
Nikolay Sivov : mf/evr: Add per-stream lock.
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: bd86e9341657f47a19f608c47f488f39d3703c86 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bd86e9341657f47a19f608c4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Oct 16 16:38:09 2020 +0300 mf/evr: Add per-stream lock. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/evr.c | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c index af9bd9e0e42..ac80193ddd6 100644 --- a/dlls/mf/evr.c +++ b/dlls/mf/evr.c @@ -47,6 +47,7 @@ struct video_stream struct video_renderer *parent; IMFMediaEventQueue *event_queue; IMFVideoSampleAllocator *allocator; + CRITICAL_SECTION cs; }; struct video_renderer @@ -213,6 +214,7 @@ static ULONG WINAPI video_stream_sink_Release(IMFStreamSink *iface) IMFMediaEventQueue_Release(stream->event_queue); if (stream->allocator) IMFVideoSampleAllocator_Release(stream->allocator); + DeleteCriticalSection(&stream->cs); heap_free(stream); } @@ -260,20 +262,23 @@ static HRESULT WINAPI video_stream_sink_QueueEvent(IMFStreamSink *iface, MediaEv static HRESULT WINAPI video_stream_sink_GetMediaSink(IMFStreamSink *iface, IMFMediaSink **sink) { struct video_stream *stream = impl_from_IMFStreamSink(iface); + HRESULT hr = S_OK; TRACE("%p, %p.\n", iface, sink); + EnterCriticalSection(&stream->cs); if (!stream->parent) - return MF_E_STREAMSINK_REMOVED; - - if (!sink) - return E_POINTER; - - /* FIXME: not entirely safe if sink is being shut down. */ - *sink = &stream->parent->IMFMediaSink_iface; - IMFMediaSink_AddRef(*sink); + hr = MF_E_STREAMSINK_REMOVED; + else if (!sink) + hr = E_POINTER; + else + { + *sink = &stream->parent->IMFMediaSink_iface; + IMFMediaSink_AddRef(*sink); + } + LeaveCriticalSection(&stream->cs); - return S_OK; + return hr; } static HRESULT WINAPI video_stream_sink_GetIdentifier(IMFStreamSink *iface, DWORD *id) @@ -533,6 +538,7 @@ static HRESULT video_renderer_stream_create(struct video_renderer *renderer, uns stream->IMFMediaTypeHandler_iface.lpVtbl = &video_stream_type_handler_vtbl; stream->IMFGetService_iface.lpVtbl = &video_stream_get_service_vtbl; stream->refcount = 1; + InitializeCriticalSection(&stream->cs); if (FAILED(hr = MFCreateEventQueue(&stream->event_queue))) goto failed; @@ -894,10 +900,15 @@ static HRESULT WINAPI video_renderer_sink_Shutdown(IMFMediaSink *iface) /* Detach streams from the sink. */ for (i = 0; i < renderer->stream_count; ++i) { - IMFMediaSink_Release(&renderer->streams[i]->parent->IMFMediaSink_iface); - renderer->streams[i]->parent = NULL; - IMFMediaEventQueue_Shutdown(renderer->streams[i]->event_queue); - IMFStreamSink_Release(&renderer->streams[i]->IMFStreamSink_iface); + struct video_stream *stream = renderer->streams[i]; + + EnterCriticalSection(&stream->cs); + stream->parent = NULL; + LeaveCriticalSection(&stream->cs); + + IMFMediaEventQueue_Shutdown(stream->event_queue); + IMFStreamSink_Release(&stream->IMFStreamSink_iface); + IMFMediaSink_Release(iface); renderer->streams[i] = NULL; } heap_free(renderer->streams);
1
0
0
0
Nikolay Sivov : mf/tests: Add a test for EVRConfig_ handling for already initialized presenter.
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: bfeae85fdd210ebecd69923ad172fb490c784f21 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfeae85fdd210ebecd69923a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Oct 16 16:38:08 2020 +0300 mf/tests: Add a test for EVRConfig_ handling for already initialized presenter. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/tests/mf.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 465bd7e3c43..7dc325424a6 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -39,6 +39,7 @@ DEFINE_GUID(MFVideoFormat_ABGR32, 0x00000020, 0x0000, 0x0010, 0x80, 0x00, 0x00, #include "mferror.h" #include "mfidl.h" #include "initguid.h" +#include "uuids.h" #include "mmdeviceapi.h" #include "audioclient.h" #include "evr.h" @@ -3237,6 +3238,7 @@ static void test_evr(void) { IMFVideoSampleAllocatorCallback *allocator_callback; IMFStreamSink *stream_sink, *stream_sink2; + IMFVideoDisplayControl *display_control; IMFMediaType *media_type, *media_type2; IMFMediaEventGenerator *ev_generator; IMFVideoSampleAllocator *allocator; @@ -3292,6 +3294,15 @@ static void test_evr(void) hr = IMFAttributes_GetCount(attributes, &count); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(!!count, "Unexpected count %u.\n", count); + /* Rendering preferences are not immediately propagated to the presenter. */ + hr = IMFAttributes_SetUINT32(attributes, &EVRConfig_ForceBob, 1); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + hr = MFGetService((IUnknown *)sink, &MR_VIDEO_RENDER_SERVICE, &IID_IMFVideoDisplayControl, (void **)&display_control); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, &flags); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(!flags, "Unexpected flags %#x.\n", flags); + IMFVideoDisplayControl_Release(display_control); IMFAttributes_Release(attributes); /* Primary stream type handler. */
1
0
0
0
Huw Davies : riched20: Pass and return a paragraph ptr in the paragraph joining function.
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: 434feab6a29706797d61499989b5ce445e02a3b3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=434feab6a29706797d614999…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 16 12:08:10 2020 +0100 riched20: Pass and return a paragraph ptr in the paragraph joining function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/caret.c | 2 +- dlls/riched20/editor.h | 3 +- dlls/riched20/para.c | 129 ++++++++++++++++++++++--------------------------- dlls/riched20/undo.c | 2 +- 4 files changed, 62 insertions(+), 74 deletions(-) diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c index cce4755257c..22da616731f 100644 --- a/dlls/riched20/caret.c +++ b/dlls/riched20/caret.c @@ -369,7 +369,7 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start, keepFirstParaFormat = TRUE; } } - ME_JoinParagraphs(editor, c.pPara, keepFirstParaFormat); + para_join( editor, &c.pPara->member.para, keepFirstParaFormat ); /* ME_SkipAndPropagateCharOffset(p->pRun, shift); */ ME_CheckCharOffsets(editor); nChars -= (eollen < nChars) ? eollen : nChars; diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index b0c3ec46214..ad7978c1f9d 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -198,8 +198,6 @@ void ME_SendRequestResize(ME_TextEditor *editor, BOOL force) DECLSPEC_HIDDEN; ME_DisplayItem *ME_GetParagraph(ME_DisplayItem *run) DECLSPEC_HIDDEN; void ME_GetSelectionParas(ME_TextEditor *editor, ME_DisplayItem **para, ME_DisplayItem **para_end) DECLSPEC_HIDDEN; void ME_MakeFirstParagraph(ME_TextEditor *editor) DECLSPEC_HIDDEN; -ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, - BOOL keepFirstParaFormat) DECLSPEC_HIDDEN; void ME_DumpParaStyle(ME_Paragraph *s) DECLSPEC_HIDDEN; void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048]) DECLSPEC_HIDDEN; BOOL ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN; @@ -209,6 +207,7 @@ void ME_SetDefaultParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPEC_ int get_total_width(ME_TextEditor *editor) DECLSPEC_HIDDEN; ME_Run *para_end_run( ME_Paragraph *para ) DECLSPEC_HIDDEN; ME_Run *para_first_run( ME_Paragraph *para ) DECLSPEC_HIDDEN; +ME_Paragraph *para_join( ME_TextEditor *editor, ME_Paragraph *para, BOOL use_first_fmt ) DECLSPEC_HIDDEN; void para_mark_add( ME_TextEditor *editor, ME_Paragraph *para ) DECLSPEC_HIDDEN; void para_mark_remove( ME_TextEditor *editor, ME_Paragraph *para ) DECLSPEC_HIDDEN; void para_mark_rewrap( ME_TextEditor *editor, ME_Paragraph *para ) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 7251d1620a6..41debcac1bd 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -654,66 +654,60 @@ ME_Paragraph *para_split( ME_TextEditor *editor, ME_Run *run, ME_Style *style, return new_para; } -/* join tp with tp->member.para.next_para, keeping tp's style; this - * is consistent with the original */ -ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, - BOOL keepFirstParaFormat) +/* join para with the next para keeping para's style using the paragraph fmt + specified in use_first_fmt */ +ME_Paragraph *para_join( ME_TextEditor *editor, ME_Paragraph *para, BOOL use_first_fmt ) { - ME_DisplayItem *pNext, *pFirstRunInNext, *pRun, *pTmp, *pCell = NULL; + ME_DisplayItem *tmp, *pCell = NULL; + ME_Paragraph *next = para_next( para ); + ME_Run *end_run, *next_first_run, *tmp_run; int i, shift; int end_len; CHARFORMAT2W fmt; ME_Cursor startCur, endCur; ME_String *eol_str; - assert(tp->type == diParagraph); - assert(tp->member.para.next_para); - assert(tp->member.para.next_para->type == diParagraph); + assert( next && para_next( next ) ); /* Clear any cached para numbering following this paragraph */ - if (tp->member.para.fmt.wNumbering) - para_num_clear_list( editor, &tp->member.para, &tp->member.para.fmt ); + if (para->fmt.wNumbering) para_num_clear_list( editor, para, ¶->fmt ); - pNext = tp->member.para.next_para; + end_run = para_end_run( para ); + next_first_run = para_first_run( next ); - /* Need to locate end-of-paragraph run here, in order to know end_len */ - pRun = ME_FindItemBack(pNext, diRunOrParagraph); - - assert(pRun); - assert(pRun->type == diRun); - assert(pRun->member.run.nFlags & MERF_ENDPARA); - - end_len = pRun->member.run.len; - eol_str = ME_VSplitString( tp->member.para.text, pRun->member.run.nCharOfs ); - ME_AppendString( tp->member.para.text, pNext->member.para.text->szData, pNext->member.para.text->nLen ); + end_len = end_run->len; + eol_str = ME_VSplitString( para->text, end_run->nCharOfs ); + ME_AppendString( para->text, next->text->szData, next->text->nLen ); /* null char format operation to store the original char format for the ENDPARA run */ ME_InitCharFormat2W(&fmt); - endCur.pPara = pNext; - endCur.pRun = ME_FindItemFwd(pNext, diRun); - endCur.nOffset = 0; - startCur = endCur; - ME_PrevRun(&startCur.pPara, &startCur.pRun, TRUE); + startCur.pPara = para_get_di( para ); + startCur.pRun = run_get_di( end_run ); + endCur.pPara = para_get_di( next ); + endCur.pRun = run_get_di( next_first_run ); + startCur.nOffset = endCur.nOffset = 0; + ME_SetCharFormat(editor, &startCur, &endCur, &fmt); - if (!editor->bEmulateVersion10) { /* v4.1 */ + if (!editor->bEmulateVersion10) /* v4.1 */ + { /* Table cell/row properties are always moved over from the removed para. */ - tp->member.para.nFlags = pNext->member.para.nFlags; - tp->member.para.pCell = pNext->member.para.pCell; + para->nFlags = next->nFlags; + para->pCell = next->pCell; /* Remove cell boundary if it is between the end paragraph run and the next * paragraph display item. */ - for (pTmp = pRun->next; pTmp != pNext; pTmp = pTmp->next) + for (tmp = run_get_di( end_run ); tmp != para_get_di( next ); tmp = tmp->next) { - if (pTmp->type == diCell) + if (tmp->type == diCell) { - pCell = pTmp; + pCell = tmp; break; } } } - add_undo_split_para( editor, &pNext->member.para, eol_str, pCell ? &pCell->member.cell : NULL ); + add_undo_split_para( editor, next, eol_str, pCell ? &pCell->member.cell : NULL ); if (pCell) { @@ -725,63 +719,58 @@ ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, ME_DestroyDisplayItem( pCell ); } - if (!keepFirstParaFormat) + if (!use_first_fmt) { - add_undo_set_para_fmt( editor, &tp->member.para ); - tp->member.para.fmt = pNext->member.para.fmt; - tp->member.para.border = pNext->member.para.border; + add_undo_set_para_fmt( editor, para ); + para->fmt = next->fmt; + para->border = next->border; } - shift = pNext->member.para.nCharOfs - tp->member.para.nCharOfs - end_len; - - pFirstRunInNext = ME_FindItemFwd(pNext, diRunOrParagraph); - - assert(pFirstRunInNext->type == diRun); + shift = next->nCharOfs - para->nCharOfs - end_len; /* Update selection cursors so they don't point to the removed end * paragraph run, and point to the correct paragraph. */ - for (i=0; i < editor->nCursors; i++) { - if (editor->pCursors[i].pRun == pRun) { - editor->pCursors[i].pRun = pFirstRunInNext; + for (i = 0; i < editor->nCursors; i++) + { + if (editor->pCursors[i].pRun == run_get_di( end_run )) + { + editor->pCursors[i].pRun = run_get_di( next_first_run ); editor->pCursors[i].nOffset = 0; - } else if (editor->pCursors[i].pPara == pNext) { - editor->pCursors[i].pPara = tp; } + else if (editor->pCursors[i].pPara == para_get_di( next )) + editor->pCursors[i].pPara = para_get_di( para ); } - pTmp = pNext; - do { - pTmp = ME_FindItemFwd(pTmp, diRunOrParagraphOrEnd); - if (pTmp->type != diRun) - break; - TRACE("shifting %s by %d (previous %d)\n", debugstr_run( &pTmp->member.run ), shift, pTmp->member.run.nCharOfs); - pTmp->member.run.nCharOfs += shift; - pTmp->member.run.para = &tp->member.para; - } while(1); + for (tmp_run = next_first_run; tmp_run; tmp_run = run_next( tmp_run )) + { + TRACE( "shifting %s by %d (previous %d)\n", debugstr_run( tmp_run ), shift, tmp_run->nCharOfs ); + tmp_run->nCharOfs += shift; + tmp_run->para = para; + } /* Fix up the para's eop_run ptr */ - tp->member.para.eop_run = pNext->member.para.eop_run; + para->eop_run = next->eop_run; - ME_Remove(pRun); - ME_DestroyDisplayItem(pRun); + ME_Remove( run_get_di( end_run ) ); + ME_DestroyDisplayItem( run_get_di( end_run) ); - if (editor->pLastSelStartPara == pNext) - editor->pLastSelStartPara = tp; - if (editor->pLastSelEndPara == pNext) - editor->pLastSelEndPara = tp; + if (editor->pLastSelStartPara == para_get_di( next )) + editor->pLastSelStartPara = para_get_di( para ); + if (editor->pLastSelEndPara == para_get_di( next )) + editor->pLastSelEndPara = para_get_di( para ); - tp->member.para.next_para = pNext->member.para.next_para; - pNext->member.para.next_para->member.para.prev_para = tp; - ME_Remove(pNext); - destroy_para(editor, pNext); + para->next_para = next->next_para; + next->next_para->member.para.prev_para = para_get_di( para ); + ME_Remove( para_get_di(next) ); + destroy_para( editor, para_get_di( next ) ); - ME_PropagateCharOffset(tp->member.para.next_para, -end_len); + ME_PropagateCharOffset( para->next_para, -end_len ); ME_CheckCharOffsets(editor); editor->nParagraphs--; - para_mark_rewrap( editor, &tp->member.para ); - return tp; + para_mark_rewrap( editor, para ); + return para; } ME_DisplayItem *ME_GetParagraph(ME_DisplayItem *item) { diff --git a/dlls/riched20/undo.c b/dlls/riched20/undo.c index 5616c64005a..72e3b74f4c8 100644 --- a/dlls/riched20/undo.c +++ b/dlls/riched20/undo.c @@ -373,7 +373,7 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, struct undo_item *undo) { ME_Cursor tmp; cursor_from_char_ofs( editor, undo->u.join_paras.pos, &tmp ); - ME_JoinParagraphs(editor, tmp.pPara, TRUE); + para_join( editor, &tmp.pPara->member.para, TRUE ); break; } case undo_split_para:
1
0
0
0
Huw Davies : riched20: Pass a run ptr to, and return a para ptr from, the para splitting function.
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: f758d1effd0869c43ad82910dd3bd2e30f0807f8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f758d1effd0869c43ad82910…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 16 12:08:09 2020 +0100 riched20: Pass a run ptr to, and return a para ptr from, the para splitting function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/caret.c | 2 +- dlls/riched20/editor.h | 14 ++++++++------ dlls/riched20/para.c | 38 +++++++++++++++++++------------------- dlls/riched20/table.c | 10 +++++----- dlls/riched20/undo.c | 20 ++++++++++---------- 5 files changed, 43 insertions(+), 41 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f758d1effd0869c43ad8…
1
0
0
0
Huw Davies : riched20: Use paragraph and run ptrs in the paragraph splitting function.
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: d3fb8b29c111c3d383e461bf58e305699e10330f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d3fb8b29c111c3d383e461bf…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 16 12:08:08 2020 +0100 riched20: Use paragraph and run ptrs in the paragraph splitting function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/para.c | 98 +++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 49cf4ad3063..e9246fa7cf7 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -516,12 +516,9 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, ME_Style *style, const WCHAR *eol_str, int eol_len, int paraFlags) { - ME_DisplayItem *next_para = NULL; - ME_DisplayItem *run_para = NULL; - ME_Paragraph *new_para = para_create( editor ); - ME_Run *end_run; + ME_Paragraph *new_para = para_create( editor ), *old_para, *next_para; + ME_Run *end_run, *next_run; int ofs, i; - ME_DisplayItem *pp; int run_flags = MERF_ENDPARA; if (!editor->bEmulateVersion10) { /* v4.1 */ @@ -536,66 +533,67 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, assert(!(paraFlags & (MEPF_CELL|MEPF_ROWSTART|MEPF_ROWEND))); } assert(run->type == diRun); - run_para = ME_GetParagraph(run); - assert(run_para->member.para.fmt.cbSize == sizeof(PARAFORMAT2)); + old_para = &ME_GetParagraph( run )->member.para; + assert( old_para->fmt.cbSize == sizeof(PARAFORMAT2) ); /* Clear any cached para numbering following this paragraph */ - if (run_para->member.para.fmt.wNumbering) - para_num_clear_list( editor, &run_para->member.para, &run_para->member.para.fmt ); + if (old_para->fmt.wNumbering) + para_num_clear_list( editor, old_para, &old_para->fmt ); - new_para->text = ME_VSplitString( run_para->member.para.text, run->member.run.nCharOfs ); + new_para->text = ME_VSplitString( old_para->text, run->member.run.nCharOfs ); end_run = run_create( style, run_flags ); ofs = end_run->nCharOfs = run->member.run.nCharOfs; end_run->len = eol_len; end_run->para = run->member.run.para; - ME_AppendString( run_para->member.para.text, eol_str, eol_len ); - next_para = run_para->member.para.next_para; - assert(next_para == ME_FindItemFwd(run_para, diParagraphOrEnd)); + ME_AppendString( old_para->text, eol_str, eol_len ); + next_para = &old_para->next_para->member.para; - add_undo_join_paras( editor, run_para->member.para.nCharOfs + ofs ); + add_undo_join_paras( editor, old_para->nCharOfs + ofs ); /* Update selection cursors to point to the correct paragraph. */ - for (i = 0; i < editor->nCursors; i++) { - if (editor->pCursors[i].pPara == run_para && + for (i = 0; i < editor->nCursors; i++) + { + if (editor->pCursors[i].pPara == para_get_di( old_para ) && run->member.run.nCharOfs <= editor->pCursors[i].pRun->member.run.nCharOfs) { editor->pCursors[i].pPara = para_get_di( new_para ); } } - /* the new paragraph will have a different starting offset, so let's update its runs */ - pp = run; - while(pp->type == diRun) { - pp->member.run.nCharOfs -= ofs; - pp->member.run.para = new_para; - pp = ME_FindItemFwd(pp, diRunOrParagraphOrEnd); + /* the new paragraph will have a different starting offset, so update its runs */ + for (next_run = &run->member.run; next_run; next_run = run_next( next_run )) + { + next_run->nCharOfs -= ofs; + next_run->para = new_para; } - new_para->nCharOfs = run_para->member.para.nCharOfs + ofs; + + new_para->nCharOfs = old_para->nCharOfs + ofs; new_para->nCharOfs += eol_len; new_para->nFlags = 0; para_mark_rewrap( editor, new_para ); /* FIXME initialize format style and call ME_SetParaFormat blah blah */ - new_para->fmt = run_para->member.para.fmt; - new_para->border = run_para->member.para.border; + new_para->fmt = old_para->fmt; + new_para->border = old_para->border; /* insert paragraph into paragraph double linked list */ - new_para->prev_para = run_para; - new_para->next_para = next_para; - run_para->member.para.next_para = para_get_di( new_para ); - next_para->member.para.prev_para = para_get_di( new_para ); + new_para->prev_para = para_get_di( old_para ); + new_para->next_para = para_get_di( next_para ); + old_para->next_para = para_get_di( new_para ); + next_para->prev_para = para_get_di( new_para ); /* insert end run of the old paragraph, and new paragraph, into DI double linked list */ ME_InsertBefore( run, para_get_di( new_para ) ); ME_InsertBefore( para_get_di( new_para ), run_get_di( end_run ) ); /* Fix up the paras' eop_run ptrs */ - new_para->eop_run = run_para->member.para.eop_run; - run_para->member.para.eop_run = end_run; + new_para->eop_run = old_para->eop_run; + old_para->eop_run = end_run; - if (!editor->bEmulateVersion10) { /* v4.1 */ - if (paraFlags & (MEPF_ROWSTART|MEPF_CELL)) + if (!editor->bEmulateVersion10) /* v4.1 */ + { + if (paraFlags & (MEPF_ROWSTART | MEPF_CELL)) { ME_DisplayItem *cell = ME_MakeDI(diCell); ME_InsertBefore( para_get_di( new_para ), cell ); @@ -603,32 +601,32 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, cell->member.cell.next_cell = NULL; if (paraFlags & MEPF_ROWSTART) { - run_para->member.para.nFlags |= MEPF_ROWSTART; + old_para->nFlags |= MEPF_ROWSTART; cell->member.cell.prev_cell = NULL; - cell->member.cell.parent_cell = run_para->member.para.pCell; - if (run_para->member.para.pCell) - cell->member.cell.nNestingLevel = run_para->member.para.pCell->member.cell.nNestingLevel + 1; + cell->member.cell.parent_cell = old_para->pCell; + if (old_para->pCell) + cell->member.cell.nNestingLevel = old_para->pCell->member.cell.nNestingLevel + 1; else cell->member.cell.nNestingLevel = 1; } else { - cell->member.cell.prev_cell = run_para->member.para.pCell; + cell->member.cell.prev_cell = old_para->pCell; assert(cell->member.cell.prev_cell); cell->member.cell.prev_cell->member.cell.next_cell = cell; - assert(run_para->member.para.nFlags & MEPF_CELL); - assert(!(run_para->member.para.nFlags & MEPF_ROWSTART)); + assert( old_para->nFlags & MEPF_CELL ); + assert( !(old_para->nFlags & MEPF_ROWSTART) ); cell->member.cell.nNestingLevel = cell->member.cell.prev_cell->member.cell.nNestingLevel; cell->member.cell.parent_cell = cell->member.cell.prev_cell->member.cell.parent_cell; } } else if (paraFlags & MEPF_ROWEND) { - run_para->member.para.nFlags |= MEPF_ROWEND; - run_para->member.para.pCell = run_para->member.para.pCell->member.cell.parent_cell; - new_para->pCell = run_para->member.para.pCell; - assert(run_para->member.para.prev_para->member.para.nFlags & MEPF_CELL); - assert(!(run_para->member.para.prev_para->member.para.nFlags & MEPF_ROWSTART)); + old_para->nFlags |= MEPF_ROWEND; + old_para->pCell = old_para->pCell->member.cell.parent_cell; + new_para->pCell = old_para->pCell; + assert( old_para->prev_para->member.para.nFlags & MEPF_CELL ); + assert( !(old_para->prev_para->member.para.nFlags & MEPF_ROWSTART) ); if (new_para->pCell != new_para->next_para->member.para.pCell && new_para->next_para->member.para.pCell && !new_para->next_para->member.para.pCell->member.cell.prev_cell) @@ -637,20 +635,20 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, new_para->nFlags |= MEPF_ROWSTART; } } - else new_para->pCell = run_para->member.para.pCell; + else new_para->pCell = old_para->pCell; - table_update_flags( &run_para->member.para ); + table_update_flags( old_para ); table_update_flags( new_para ); } /* force rewrap of the */ - if (run_para->member.para.prev_para->type == diParagraph) - para_mark_rewrap( editor, &run_para->member.para.prev_para->member.para ); + if (old_para->prev_para->type == diParagraph) + para_mark_rewrap( editor, &old_para->prev_para->member.para ); para_mark_rewrap( editor, &new_para->prev_para->member.para ); /* we've added the end run, so we need to modify nCharOfs in the next paragraphs */ - ME_PropagateCharOffset(next_para, eol_len); + ME_PropagateCharOffset( para_get_di( next_para ), eol_len ); editor->nParagraphs++; return para_get_di( new_para );
1
0
0
0
Huw Davies : riched20: Return a paragraph ptr from the paragraph creation function.
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: 9b3a538c35628e069a2b7af8439e19cc91e4d66c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b3a538c35628e069a2b7af8…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 16 12:08:07 2020 +0100 riched20: Return a paragraph ptr from the paragraph creation function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/para.c | 92 +++++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 2d5072e232e..49cf4ad3063 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -29,14 +29,14 @@ void para_mark_rewrap( ME_TextEditor *editor, ME_Paragraph *para ) para_mark_add( editor, para ); } -static ME_DisplayItem *make_para(ME_TextEditor *editor) +static ME_Paragraph *para_create( ME_TextEditor *editor ) { ME_DisplayItem *item = ME_MakeDI(diParagraph); ME_SetDefaultParaFormat(editor, &item->member.para.fmt); item->member.para.nFlags = MEPF_REWRAP; - return item; + return &item->member.para; } void destroy_para(ME_TextEditor *editor, ME_DisplayItem *item) @@ -130,7 +130,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor) LOGFONTW lf; HFONT hf; ME_TextBuffer *text = editor->pBuffer; - ME_DisplayItem *para = make_para(editor); + ME_Paragraph *para = para_create( editor ); ME_Run *run; ME_Style *style; int eol_len; @@ -175,25 +175,25 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor) } eol_len = editor->bEmulateVersion10 ? 2 : 1; - para->member.para.text = ME_MakeStringN( cr_lf, eol_len ); + para->text = ME_MakeStringN( cr_lf, eol_len ); run = run_create( style, MERF_ENDPARA ); run->nCharOfs = 0; run->len = eol_len; - run->para = ¶->member.para; - para->member.para.eop_run = run; + run->para = para; + para->eop_run = run; - ME_InsertBefore(text->pLast, para); - ME_InsertBefore(text->pLast, run_get_di( run )); - para->member.para.prev_para = text->pFirst; - para->member.para.next_para = text->pLast; - text->pFirst->member.para.next_para = para; - text->pLast->member.para.prev_para = para; + ME_InsertBefore( text->pLast, para_get_di( para) ); + ME_InsertBefore( text->pLast, run_get_di( run ) ); + para->prev_para = text->pFirst; + para->next_para = text->pLast; + text->pFirst->member.para.next_para = para_get_di( para ); + text->pLast->member.para.prev_para = para_get_di( para ); text->pLast->member.para.nCharOfs = editor->bEmulateVersion10 ? 2 : 1; wine_rb_init( &editor->marked_paras, para_mark_compare ); - para_mark_add( editor, ¶->member.para ); + para_mark_add( editor, para ); ME_DestroyContext(&c); } @@ -518,7 +518,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, { ME_DisplayItem *next_para = NULL; ME_DisplayItem *run_para = NULL; - ME_DisplayItem *new_para = make_para(editor); + ME_Paragraph *new_para = para_create( editor ); ME_Run *end_run; int ofs, i; ME_DisplayItem *pp; @@ -543,7 +543,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, if (run_para->member.para.fmt.wNumbering) para_num_clear_list( editor, &run_para->member.para, &run_para->member.para.fmt ); - new_para->member.para.text = ME_VSplitString( run_para->member.para.text, run->member.run.nCharOfs ); + new_para->text = ME_VSplitString( run_para->member.para.text, run->member.run.nCharOfs ); end_run = run_create( style, run_flags ); ofs = end_run->nCharOfs = run->member.run.nCharOfs; @@ -560,7 +560,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, if (editor->pCursors[i].pPara == run_para && run->member.run.nCharOfs <= editor->pCursors[i].pRun->member.run.nCharOfs) { - editor->pCursors[i].pPara = new_para; + editor->pCursors[i].pPara = para_get_di( new_para ); } } @@ -568,38 +568,38 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, pp = run; while(pp->type == diRun) { pp->member.run.nCharOfs -= ofs; - pp->member.run.para = &new_para->member.para; + pp->member.run.para = new_para; pp = ME_FindItemFwd(pp, diRunOrParagraphOrEnd); } - new_para->member.para.nCharOfs = run_para->member.para.nCharOfs + ofs; - new_para->member.para.nCharOfs += eol_len; - new_para->member.para.nFlags = 0; - para_mark_rewrap( editor, &new_para->member.para ); + new_para->nCharOfs = run_para->member.para.nCharOfs + ofs; + new_para->nCharOfs += eol_len; + new_para->nFlags = 0; + para_mark_rewrap( editor, new_para ); /* FIXME initialize format style and call ME_SetParaFormat blah blah */ - new_para->member.para.fmt = run_para->member.para.fmt; - new_para->member.para.border = run_para->member.para.border; + new_para->fmt = run_para->member.para.fmt; + new_para->border = run_para->member.para.border; /* insert paragraph into paragraph double linked list */ - new_para->member.para.prev_para = run_para; - new_para->member.para.next_para = next_para; - run_para->member.para.next_para = new_para; - next_para->member.para.prev_para = new_para; + new_para->prev_para = run_para; + new_para->next_para = next_para; + run_para->member.para.next_para = para_get_di( new_para ); + next_para->member.para.prev_para = para_get_di( new_para ); /* insert end run of the old paragraph, and new paragraph, into DI double linked list */ - ME_InsertBefore(run, new_para); - ME_InsertBefore( new_para, run_get_di( end_run )); + ME_InsertBefore( run, para_get_di( new_para ) ); + ME_InsertBefore( para_get_di( new_para ), run_get_di( end_run ) ); /* Fix up the paras' eop_run ptrs */ - new_para->member.para.eop_run = run_para->member.para.eop_run; + new_para->eop_run = run_para->member.para.eop_run; run_para->member.para.eop_run = end_run; if (!editor->bEmulateVersion10) { /* v4.1 */ if (paraFlags & (MEPF_ROWSTART|MEPF_CELL)) { ME_DisplayItem *cell = ME_MakeDI(diCell); - ME_InsertBefore(new_para, cell); - new_para->member.para.pCell = cell; + ME_InsertBefore( para_get_di( new_para ), cell ); + new_para->pCell = cell; cell->member.cell.next_cell = NULL; if (paraFlags & MEPF_ROWSTART) { @@ -610,7 +610,9 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, cell->member.cell.nNestingLevel = run_para->member.para.pCell->member.cell.nNestingLevel + 1; else cell->member.cell.nNestingLevel = 1; - } else { + } + else + { cell->member.cell.prev_cell = run_para->member.para.pCell; assert(cell->member.cell.prev_cell); cell->member.cell.prev_cell->member.cell.next_cell = cell; @@ -619,37 +621,39 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, cell->member.cell.nNestingLevel = cell->member.cell.prev_cell->member.cell.nNestingLevel; cell->member.cell.parent_cell = cell->member.cell.prev_cell->member.cell.parent_cell; } - } else if (paraFlags & MEPF_ROWEND) { + } + else if (paraFlags & MEPF_ROWEND) + { run_para->member.para.nFlags |= MEPF_ROWEND; run_para->member.para.pCell = run_para->member.para.pCell->member.cell.parent_cell; - new_para->member.para.pCell = run_para->member.para.pCell; + new_para->pCell = run_para->member.para.pCell; assert(run_para->member.para.prev_para->member.para.nFlags & MEPF_CELL); assert(!(run_para->member.para.prev_para->member.para.nFlags & MEPF_ROWSTART)); - if (new_para->member.para.pCell != new_para->member.para.next_para->member.para.pCell - && new_para->member.para.next_para->member.para.pCell - && !new_para->member.para.next_para->member.para.pCell->member.cell.prev_cell) + if (new_para->pCell != new_para->next_para->member.para.pCell + && new_para->next_para->member.para.pCell + && !new_para->next_para->member.para.pCell->member.cell.prev_cell) { /* Row starts just after the row that was ended. */ - new_para->member.para.nFlags |= MEPF_ROWSTART; + new_para->nFlags |= MEPF_ROWSTART; } - } else { - new_para->member.para.pCell = run_para->member.para.pCell; } + else new_para->pCell = run_para->member.para.pCell; + table_update_flags( &run_para->member.para ); - table_update_flags( &new_para->member.para ); + table_update_flags( new_para ); } /* force rewrap of the */ if (run_para->member.para.prev_para->type == diParagraph) para_mark_rewrap( editor, &run_para->member.para.prev_para->member.para ); - para_mark_rewrap( editor, &new_para->member.para.prev_para->member.para ); + para_mark_rewrap( editor, &new_para->prev_para->member.para ); /* we've added the end run, so we need to modify nCharOfs in the next paragraphs */ ME_PropagateCharOffset(next_para, eol_len); editor->nParagraphs++; - return new_para; + return para_get_di( new_para ); } /* join tp with tp->member.para.next_para, keeping tp's style; this
1
0
0
0
Huw Davies : riched20: Pass a paragraph ptr to the table update flags function.
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: 77f1894f21a872394e3d92872cbf78e705c8b470 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=77f1894f21a872394e3d9287…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 16 12:08:06 2020 +0100 riched20: Pass a paragraph ptr to the table update flags function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/para.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 431f89faed3..2d5072e232e 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -211,23 +211,20 @@ void ME_MarkAllForWrapping(ME_TextEditor *editor) ME_MarkForWrapping(editor, editor->pBuffer->pFirst->member.para.next_para, editor->pBuffer->pLast); } -static void ME_UpdateTableFlags(ME_DisplayItem *para) +static void table_update_flags( ME_Paragraph *para ) { - para->member.para.fmt.dwMask |= PFM_TABLE|PFM_TABLEROWDELIMITER; - if (para->member.para.pCell) { - para->member.para.nFlags |= MEPF_CELL; - } else { - para->member.para.nFlags &= ~MEPF_CELL; - } - if (para->member.para.nFlags & MEPF_ROWEND) { - para->member.para.fmt.wEffects |= PFE_TABLEROWDELIMITER; - } else { - para->member.para.fmt.wEffects &= ~PFE_TABLEROWDELIMITER; - } - if (para->member.para.nFlags & (MEPF_ROWSTART|MEPF_CELL|MEPF_ROWEND)) - para->member.para.fmt.wEffects |= PFE_TABLE; - else - para->member.para.fmt.wEffects &= ~PFE_TABLE; + para->fmt.dwMask |= PFM_TABLE | PFM_TABLEROWDELIMITER; + + if (para->pCell) para->nFlags |= MEPF_CELL; + else para->nFlags &= ~MEPF_CELL; + + if (para->nFlags & MEPF_ROWEND) para->fmt.wEffects |= PFE_TABLEROWDELIMITER; + else para->fmt.wEffects &= ~PFE_TABLEROWDELIMITER; + + if (para->nFlags & (MEPF_ROWSTART | MEPF_CELL | MEPF_ROWEND)) + para->fmt.wEffects |= PFE_TABLE; + else + para->fmt.wEffects &= ~PFE_TABLE; } static inline BOOL para_num_same_list( const PARAFORMAT2 *item, const PARAFORMAT2 *base ) @@ -638,8 +635,8 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, } else { new_para->member.para.pCell = run_para->member.para.pCell; } - ME_UpdateTableFlags(run_para); - ME_UpdateTableFlags(new_para); + table_update_flags( &run_para->member.para ); + table_update_flags( &new_para->member.para ); } /* force rewrap of the */
1
0
0
0
Paul Gofman : wined3d: Add GPU information for NVIDIA GeForce GTX 1080 Mobile.
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: 18d1b2453f5f45ee694a1c4ffaa9e5448e3c3e73 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=18d1b2453f5f45ee694a1c4f…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Thu Oct 15 01:21:53 2020 +0300 wined3d: Add GPU information for NVIDIA GeForce GTX 1080 Mobile. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 1 + dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 2 insertions(+) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 108a190bf61..c11fa22cc38 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -441,6 +441,7 @@ static const struct wined3d_gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1060, "NVIDIA GeForce GTX 1060", DRIVER_NVIDIA_KEPLER, 6144}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1070, "NVIDIA GeForce GTX 1070", DRIVER_NVIDIA_KEPLER, 8192}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1080, "NVIDIA GeForce GTX 1080", DRIVER_NVIDIA_KEPLER, 8192}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1080M, "NVIDIA GeForce GTX 1080M", DRIVER_NVIDIA_KEPLER, 8192}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX1080TI, "NVIDIA GeForce GTX 1080 Ti", DRIVER_NVIDIA_KEPLER, 11264}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_TITANX_PASCAL, "NVIDIA TITAN X (Pascal)", DRIVER_NVIDIA_KEPLER, 12288}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_TITANV, "NVIDIA TITAN V", DRIVER_NVIDIA_KEPLER, 12288}, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 901c809d875..6d7dcbc91dd 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2967,6 +2967,7 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX1060 = 0x1c03, CARD_NVIDIA_GEFORCE_GTX1070 = 0x1b81, CARD_NVIDIA_GEFORCE_GTX1080 = 0x1b80, + CARD_NVIDIA_GEFORCE_GTX1080M = 0x1be0, CARD_NVIDIA_GEFORCE_GTX1080TI = 0x1b06, CARD_NVIDIA_TITANX_PASCAL = 0x1b00, CARD_NVIDIA_TITANV = 0x1d81,
1
0
0
0
Michael Stefaniuc : taskmgr: SwitchToThisWindow() is available, remove alternate code path.
by Alexandre Julliard
16 Oct '20
16 Oct '20
Module: wine Branch: master Commit: ef10cd8b6da2ff4a032aebd0f345cdcb8b42d1c4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef10cd8b6da2ff4a032aebd0…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Thu Oct 15 23:09:40 2020 +0200 taskmgr: SwitchToThisWindow() is available, remove alternate code path. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/taskmgr/applpage.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/programs/taskmgr/applpage.c b/programs/taskmgr/applpage.c index 6b2e04077c2..b35881c2323 100644 --- a/programs/taskmgr/applpage.c +++ b/programs/taskmgr/applpage.c @@ -47,8 +47,6 @@ static int nApplicationPageHeight; static HANDLE hApplicationPageEvent = NULL; /* When this event becomes signaled then we refresh the app list */ static BOOL bSortAscending = TRUE; -static const WCHAR wszUser32[] = {'U','S','E','R','3','2','.','D','L','L',0}; - static void ApplicationPageUpdate(void) { /* Enable or disable the "End Task" & "Switch To" buttons */ @@ -743,19 +741,7 @@ void ApplicationPage_OnSwitchTo(void) } } if (pAPLI) { - typedef void (WINAPI *PROCSWITCHTOTHISWINDOW) (HWND, BOOL); - PROCSWITCHTOTHISWINDOW SwitchToThisWindow; - - HMODULE hUser32 = GetModuleHandleW(wszUser32); - SwitchToThisWindow = (PROCSWITCHTOTHISWINDOW)GetProcAddress(hUser32, "SwitchToThisWindow"); - if (SwitchToThisWindow) { - SwitchToThisWindow(pAPLI->hWnd, TRUE); - } else { - if (IsIconic(pAPLI->hWnd)) - ShowWindow(pAPLI->hWnd, SW_RESTORE); - BringWindowToTop(pAPLI->hWnd); - SetForegroundWindow(pAPLI->hWnd); - } + SwitchToThisWindow(pAPLI->hWnd, TRUE); if (TaskManagerSettings.MinimizeOnUse) ShowWindow(hMainWnd, SW_MINIMIZE); }
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
80
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
Results per page:
10
25
50
100
200