[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    riched20:  block recursive notification
From:       Clinton Stimpson <cjstimpson () utwire ! net>
Date:       2006-12-30 15:29:41
Message-ID: 459685E5.2020307 () utwire ! net
[Download RAW message or body]

This patch blocks riched20 from recursivly sending an EN_CHANGE 
notification.
Fixes bug 6985.

Thanks,
Clinton Stimpson

ChangeLog
    Block recursive EN_CHANGE notifications.


["riched20.patch" (text/x-diff)]

Index: dlls/riched20/editstr.h
===================================================================
RCS file: /home/wine/wine/dlls/riched20/editstr.h,v
retrieving revision 1.33
diff -u -r1.33 editstr.h
--- dlls/riched20/editstr.h	11 Sep 2006 11:05:46 -0000	1.33
+++ dlls/riched20/editstr.h	30 Dec 2006 15:24:01 -0000
@@ -321,6 +321,7 @@
   BOOL bHideSelection;
   BOOL AutoURLDetect_bEnable;
   WCHAR cPasswordMask;
+  int notify;
 } ME_TextEditor;
 
 typedef struct tagME_Context
Index: dlls/riched20/paint.c
===================================================================
RCS file: /home/wine/wine/dlls/riched20/paint.c,v
retrieving revision 1.33
diff -u -r1.33 paint.c
--- dlls/riched20/paint.c	27 Nov 2006 13:13:40 -0000	1.33
+++ dlls/riched20/paint.c	30 Dec 2006 15:24:01 -0000
@@ -118,9 +118,11 @@
   ME_EnsureVisible(editor, pCursor->pRun);
   
   /* send EN_CHANGE if the event mask asks for it */
-  if(editor->nEventMask & ENM_CHANGE)
+  if(!(editor->notify & ENM_CHANGE) && editor->nEventMask & ENM_CHANGE)
   {
+    editor->notify |= ENM_CHANGE;
     ME_SendOldNotify(editor, EN_CHANGE);
+    editor->notify &= ~ENM_CHANGE;
   }
   ME_Repaint(editor);
   ME_SendSelChange(editor);




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic