[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XMakemol-bugs] Ignoring repeated expose events
From: |
Jay Catherwood |
Subject: |
[XMakemol-bugs] Ignoring repeated expose events |
Date: |
Wed, 8 Aug 2007 17:16:39 -0700 |
User-agent: |
Mutt/1.4.2.2i |
This patch ignores repeated expose events, reducing the very long periods
of nonresponsiveness I see with systems of thousands of atoms.
--
Jay
--- xmakemol-5.15/xmakemol.c 2005-03-06 12:04:34.000000000 -0500
+++ xmakemol-5.15.jc/xmakemol.c 2007-08-08 19:04:23.000000000 -0400
@@ -456,8 +456,14 @@ canvas_expose_cb(Widget widget, XtPointe
{
void canvas_cb(Widget, XtPointer, XtPointer);
- redraw=1;
- canvas_cb(canvas, NULL, NULL);
+ XmDrawingAreaCallbackStruct *dacs =
+ (XmDrawingAreaCallbackStruct *) call_data;
+ XExposeEvent *event = (XExposeEvent *) dacs->event;
+
+ if (!event->count) {
+ redraw=1;
+ canvas_cb(canvas, NULL, NULL);
+ }
}
void
- [XMakemol-bugs] Ignoring repeated expose events,
Jay Catherwood <=