Module: wine
Branch: master
Commit: 77981d45488d2d4458b90eee5e8acb7a17e84100
URL: https://gitlab.winehq.org/wine/wine/-/commit/77981d45488d2d4458b90eee5e8acb…
Author: Zebediah Figura <zfigura(a)codeweavers.com>
Date: Thu Jul 13 18:01:28 2023 -0500
opengl32: Copy to the wow64 buffer even for write maps.
GL_MAP_WRITE_BIT does not mean that the buffer will be filled, unless an
INVALIDATE bit is explicitly set. The application is free to partially update
the buffer, even if it does not read from it.
Thanks to Aida Jonikienė for doing most of the debugging here.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55045
---
dlls/opengl32/unix_wgl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c
index e58e5b5d9b5..92a77b78f18 100644
--- a/dlls/opengl32/unix_wgl.c
+++ b/dlls/opengl32/unix_wgl.c
@@ -1827,7 +1827,7 @@ static NTSTATUS wow64_map_buffer( TEB *teb, GLint buffer, GLenum target, void *p
{
if (*ret) /* wow64 pointer provided, map buffer to it */
{
- if (access & GL_MAP_READ_BIT)
+ if (!(access & (GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT)))
{
TRACE( "Copying %#zx from buffer at %p to wow64 buffer %p\n", size, ptr, UlongToPtr(*ret) );
memcpy( UlongToPtr(*ret), ptr, size );
Module: wine
Branch: master
Commit: 548d7179e3b2b9961321a4df50644c9b3874a295
URL: https://gitlab.winehq.org/wine/wine/-/commit/548d7179e3b2b9961321a4df50644c…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com>
Date: Thu Jul 13 20:50:27 2023 +0900
riched20: Don't call wrap_marked_paras_dc() before the editor is fully initialized.
Today, CreateTextServices() sometimes triggers an assertion failure in
select_style().
When ME_MakeEditor() calls ME_MakeFirstParagraph(), the editor
(ME_TextEditor) is not in a fully initialized state. For example, the
font cache (pFontCache) is not fully initialized, which sometimes makes
select_style() believe that the cache slots are fully occupied.
Fix this by delaying the call to wrap_marked_paras_dc() until the editor
is fully initialized.
Also, delay the call to ITextHost::TxReleaseDC() until after
wrap_marked_paras_dc(), since we need the device context a bit longer.
Fixes: b70eb32c5f3e506181d9e1e9fbef62e9baf3674d
---
dlls/riched20/editor.c | 4 +++-
dlls/riched20/para.c | 1 -
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index d1819482b28..2b0d6533659 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -2961,7 +2961,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
hdc = ITextHost_TxGetDC( ed->texthost );
ME_MakeFirstParagraph( ed, hdc );
- ITextHost_TxReleaseDC( ed->texthost, hdc );
/* The four cursors are for:
* 0 - The position where the caret is shown
* 1 - The anchored end of the selection (for normal selection)
@@ -3061,6 +3060,9 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
list_init( &ed->reobj_list );
OleInitialize(NULL);
+ wrap_marked_paras_dc( ed, hdc, FALSE );
+ ITextHost_TxReleaseDC( ed->texthost, hdc );
+
return ed;
}
diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index 50a1073397a..a380f45e556 100644
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -221,7 +221,6 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor, HDC hdc)
wine_rb_init( &editor->marked_paras, para_mark_compare );
para_mark_add( editor, para );
ME_DestroyContext(&c);
- wrap_marked_paras_dc( editor, hdc, FALSE );
}
static void para_mark_rewrap_paras( ME_TextEditor *editor, ME_Paragraph *first, const ME_Paragraph *end )