On Fri, 2 Feb 2001, Alexander Larsson wrote:
> I think it will work, but only testing will show.
Alright. The exposure event compression patch is in. Here it is for
people who would like to try it with their copy of dia (I would be
interested if it makes dia more usable on this X terminal)
James.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/dia/ChangeLog,v
retrieving revision 1.506
retrieving revision 1.507
diff -u -r1.506 -r1.507
--- ChangeLog 2001/01/31 17:46:46 1.506
+++ ChangeLog 2001/02/02 15:33:50 1.507
@@ -1,3 +1,14 @@
+2001-02-02 James Henstridge <[EMAIL PROTECTED]>
+
+ * app/display.c (new_display): set update id to 0 here.
+ (ddisplay_update_handler): rename from ddisplay_flush, and set
+ update_id to 0 at end of processing.
+ (ddisplay_flush): new implementation that simply sets an idle
+ handler to perform the actual drawing.
+
+ * app/display.h: add structure member to hold the redraw idle
+ handler id.
+
2001-01-31 Lars Clausen <Lars R. Clausen <[EMAIL PROTECTED]>>
* objects/standard/ellipse.c (ellipse_copy):
Index: app/display.c
===================================================================
RCS file: /cvs/gnome/dia/app/display.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- app/display.c 2001/01/05 16:36:40 1.41
+++ app/display.c 2001/02/02 15:33:52 1.42
@@ -180,6 +180,7 @@
ddisp->update_areas = NULL;
ddisp->display_areas = NULL;
+ ddisp->update_id = 0;
filename = strrchr(dia->filename, G_DIR_SEPARATOR);
if (filename==NULL) {
@@ -381,8 +382,8 @@
}
}
-void
-ddisplay_flush(DDisplay *ddisp)
+static gint
+ddisplay_update_handler(DDisplay *ddisp)
{
GSList *l;
IRectangle *ir;
@@ -450,6 +451,18 @@
}
g_slist_free(ddisp->display_areas);
ddisp->display_areas = NULL;
+
+ ddisp->update_id = 0;
+ return FALSE;
+}
+
+void
+ddisplay_flush(DDisplay *ddisp)
+{
+ /* if no update is queued, queue update */
+ if (!ddisp->update_id)
+ ddisp->update_id =
gtk_idle_add((GtkFunction) ddisplay_update_handler,
+ ddisp);
}
static void
Index: app/display.h
===================================================================
RCS file: /cvs/gnome/dia/app/display.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- app/display.h 2000/10/25 22:13:36 1.15
+++ app/display.h 2001/02/02 15:33:52 1.16
@@ -64,6 +64,7 @@
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
+ guint update_id; /* idle handler ID for redraws */
/* input contexts */
GdkIC *ic;