aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-10-19 20:32:16 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-10-19 20:32:16 +0000
commit7dcfb00b4f61a9775887eeca2362450a761ab2ed (patch)
tree8f41c9c1d81bad7eb56aedf7f5c7e293c6a04c89
parent0fe1594e082a990370a4603aae70d7eeb4f5d824 (diff)
add TraceOnce
-rw-r--r--DisplayP.h1
-rw-r--r--Sgraph.c11
2 files changed, 8 insertions, 4 deletions
diff --git a/DisplayP.h b/DisplayP.h
index 2944b50..b09b643 100644
--- a/DisplayP.h
+++ b/DisplayP.h
@@ -31,7 +31,6 @@ typedef struct _DisplayClassRec {
typedef struct {
Dimension maxWidth;
- XtPointer extension;
} DisplayConstraintPart;
typedef struct _DisplayConstraintRec {
diff --git a/Sgraph.c b/Sgraph.c
index cbcabf3..20091d7 100644
--- a/Sgraph.c
+++ b/Sgraph.c
@@ -24,6 +24,13 @@
#include <stdint.h>
#define Trace(w) warnx("%s.%s", XtClass(w)->core_class.class_name, __func__)
+#define TraceOnce(w) do { \
+ static int once = 1; \
+ if (once) { \
+ Trace(w); \
+ once = 0; \
+ } \
+} while (0)
static void Initialize(Widget request, Widget w, ArgList args, Cardinal *nargs);
static void Realize(Widget w, XtValueMask *mask, XSetWindowAttributes *attr);
@@ -192,9 +199,7 @@ Redisplay(Widget w, XEvent *event, Region r)
if (!XtIsRealized(w))
return;
-#if 0
- Trace(w);
-#endif
+ TraceOnce(w);
width = sw->core.width;
if (width > sw->sgraph.size)