summaryrefslogtreecommitdiff
path: root/graphics/xart/patches/patch-ab
blob: 30d426713a62cc7ca4e3596b70c0d74283157e88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-ab,v 1.3 2012/11/01 19:53:04 joerg Exp $

--- dynPenOp.c.orig	1998-04-12 15:07:04.000000000 +0000
+++ dynPenOp.c
@@ -24,11 +24,12 @@
 #include <X11/Intrinsic.h>
 #include <X11/StringDefs.h>
 #include <X11/cursorfont.h>
+#include <time.h>
 #include "xpaint.h"
 #include "misc.h"
 #include "Paint.h"
 
-#define XTIMEOUT ((unsigned long)(1.5*1000/HZ)) /* ms, should be larger than 1000/HZ */
+#define XTIMEOUT ((unsigned long)(1.5*1000/CLK_TCK)) /* ms, should be larger than 1000/HZ */
 
 typedef struct {
 	float	startx, starty;
@@ -185,7 +186,7 @@ timeout(XtPointer client_data, XtInterva
 	XPeekIfEvent(XtDisplay(l->w), &ev, dummy_pred, NULL);
 	
 	if (ev.type == MotionNotify)
-		return;
+		return 0;
 
 	/* It's a PropertyNotify */
 	l->tid = 0;
@@ -194,6 +195,7 @@ timeout(XtPointer client_data, XtInterva
 	me.time = ev.xproperty.time;
 
 	motion(l->w, l, &me, l->opinfo);
+	return 0;
 }
 
 static void