emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/w32xfns.c,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/w32xfns.c,v
Date: Fri, 01 Feb 2008 16:01:55 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     08/02/01 16:01:31

Index: src/w32xfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32xfns.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- src/w32xfns.c       8 Jan 2008 20:44:16 -0000       1.27
+++ src/w32xfns.c       1 Feb 2008 16:00:44 -0000       1.28
@@ -192,6 +192,47 @@
       }
 
       nQueue--;
+      /* Consolidate WM_PAINT messages to optimise redrawing.  */
+      if (lpmsg->msg.message == WM_PAINT && nQueue)
+        {
+          int_msg * lpCur = lpHead;
+          int_msg * lpPrev = NULL;
+          int_msg * lpNext = NULL;
+
+          while (lpCur && nQueue)
+            {
+              lpNext = lpCur->lpNext;
+              if (lpCur->w32msg.msg.message == WM_PAINT)
+                {
+                  /* Remove this message from the queue.  */
+                  if (lpPrev)
+                    lpPrev->lpNext = lpNext;
+                  else
+                    lpHead = lpNext;
+
+                  if (lpCur == lpTail)
+                    lpTail = lpPrev;
+
+                  /* Adjust clip rectangle to cover both.  */
+                  if (!UnionRect (&(lpmsg->rect), &(lpmsg->rect),
+                                  &(lpCur->w32msg.rect)))
+                    {
+                      SetRectEmpty(&(lpmsg->rect));
+                    }
+
+                  myfree (lpCur);
+
+                  nQueue--;
+
+                  lpCur = lpNext;
+                }
+              else
+                {
+                  lpPrev = lpCur;
+                  lpCur = lpNext;
+                }
+            }
+        }
 
       bRet = TRUE;
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]