[2/6] richedit: EN_UPDATE notification is sent on WM_PAINT.

Dylan Smith dylan.ah.smith at gmail.com
Tue Jul 27 07:49:19 CDT 2010


On Mon, Jul 26, 2010 at 3:48 PM, Dylan Smith <dylan.ah.smith at gmail.com>wrote:

> On Mon, Jul 26, 2010 at 3:26 PM, James Mckenzie <
> jjmckenzie51 at earthlink.net> wrote:
>
>>
>> Just a question, I don't see 1/6 in this sequence. Was it submitted
>> earlier?
>>
>> I sent it, but somehow it must have gotten lost along its digital path.
>  It shows up in my gmail sent mail folder.
>

I have tried re-submitting the patch two more times, and both times the
email didn't turn up in the wine-patches archive.

I'm attaching the patch in case it gets through here, but I don't know how
to get it to not get filtered as spam on wine-patches.

changelog:
richedit: Only get cursor coordinates if we need them in ME_MoveCaret.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20100727/7e295f13/attachment.htm>
-------------- next part --------------
diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index 5750db9..ce8e36e 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -252,18 +252,16 @@ ME_GetCursorCoordinates(ME_TextEditor *editor, ME_Cursor *pCursor,
 }
 
 
-void
-ME_MoveCaret(ME_TextEditor *editor)
+void ME_MoveCaret(ME_TextEditor *editor)
 {
   int x, y, height;
 
+  if (!editor->bHaveFocus || ME_IsSelection(editor))
+    return;
   ME_GetCursorCoordinates(editor, &editor->pCursors[0], &x, &y, &height);
-  if(editor->bHaveFocus && !ME_IsSelection(editor))
-  {
-    x = min(x, editor->rcFormat.right-1);
-    ITextHost_TxCreateCaret(editor->texthost, NULL, 0, height);
-    ITextHost_TxSetCaretPos(editor->texthost, x, y);
-  }
+  x = min(x, editor->rcFormat.right - 1);
+  ITextHost_TxCreateCaret(editor->texthost, NULL, 0, height);
+  ITextHost_TxSetCaretPos(editor->texthost, x, y);
 }
 
 


More information about the wine-devel mailing list