aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/vnc/files/0001-replaced-pointer-with-x11vnc_pointer.patch
blob: 12122995a2256f36c6c0a28bde6f24e4b501742f (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
From e1b41de977fef61a957ab871ed1f23c05cc2fd75 Mon Sep 17 00:00:00 2001
From: Jason Kridner <jkridner@beagleboard.org>
Date: Wed, 18 Aug 2010 00:15:24 -0500
Subject: [PATCH] replaced pointer() with x11vnc_pointer()

Avoids conflict with pointer definition in /usr/include/X11/Xdefs.h.

Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
---
 x11vnc/connections.c |    2 +-
 x11vnc/keyboard.c    |    4 ++--
 x11vnc/pointer.c     |   16 ++++++++--------
 x11vnc/pointer.h     |    2 +-
 x11vnc/remote.c      |    6 +++---
 x11vnc/scan.c        |    4 ++--
 x11vnc/screen.c      |    2 +-
 x11vnc/userinput.c   |    8 ++++----
 8 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/x11vnc/connections.c b/x11vnc/connections.c
index 7c549ec..71a2bd1 100644
--- a/x11vnc/connections.c
+++ b/x11vnc/connections.c
@@ -3145,7 +3145,7 @@ static void pmove(int x, int y) {
 		return;
 	}
 	rfbLog("pmove: x y: %d %d\n", x, y);
-	pointer(0, x, y, NULL);
+	x11vnc_pointer(0, x, y, NULL);
 	X_LOCK;
 	XFlush_wr(dpy);
 	X_UNLOCK;
diff --git a/x11vnc/keyboard.c b/x11vnc/keyboard.c
index 58e866d..613b8ab 100644
--- a/x11vnc/keyboard.c
+++ b/x11vnc/keyboard.c
@@ -2898,9 +2898,9 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
 			t[1] = '\0';
 			if (sscanf(t, "%d", &butt) == 1) {
 				mask = 1<<(butt-1);
-				pointer(mask, x, y, client);
+				x11vnc_pointer(mask, x, y, client);
 				mask = 0;
-				pointer(mask, x, y, client);
+				x11vnc_pointer(mask, x, y, client);
 			}
 			b++;
 		}
diff --git a/x11vnc/pointer.c b/x11vnc/pointer.c
index 5e11ed4..45cf47e 100644
--- a/x11vnc/pointer.c
+++ b/x11vnc/pointer.c
@@ -54,7 +54,7 @@ int pointer_queued_sent = 0;
 
 void initialize_pointer_map(char *pointer_remap);
 void do_button_mask_change(int mask, int button);
-void pointer(int mask, int x, int y, rfbClientPtr client);
+void x11vnc_pointer(int mask, int x, int y, rfbClientPtr client);
 void initialize_pipeinput(void);
 int check_pipeinput(void);
 void update_x11_pointer_position(int x, int y);
@@ -408,7 +408,7 @@ void do_button_mask_change(int mask, int button) {
 				continue;
 			}
 			if (debug_pointer) {
-				rfbLog("pointer(): sending button %d"
+				rfbLog("x11vnc_pointer(): sending button %d"
 				    " %s (event %d)\n", mb, bmask
 				    ? "down" : "up", k+1);
 			}
@@ -427,7 +427,7 @@ void do_button_mask_change(int mask, int button) {
 			if (debug_pointer && dpy) {
 				char *str = XKeysymToString(XKeycodeToKeysym(
                                     dpy, key, 0));
-				rfbLog("pointer(): sending button %d "
+				rfbLog("x11vnc_pointer(): sending button %d "
 				    "down as keycode 0x%x (event %d)\n",
 				    i+1, key, k+1);
 				rfbLog("           down=%d up=%d keysym: "
@@ -560,7 +560,7 @@ if (debug_scroll > 1) fprintf(stderr, "internal scrollbar: %dx%d\n", w, h);
 	for (i=0; i < MAX_BUTTONS; i++) {
 	    if ( (button_mask & (1<<i)) != (mask & (1<<i)) ) {
 		if (debug_pointer) {
-			rfbLog("pointer(): mask change: mask: 0x%x -> "
+			rfbLog("x11vnc_pointer(): mask change: mask: 0x%x -> "
 			    "0x%x button: %d\n", button_mask, mask,i+1);
 		}
 		do_button_mask_change(mask, i+1);	/* button # is i+1 */
@@ -659,7 +659,7 @@ static void pipe_pointer(int mask, int x, int y, rfbClientPtr client) {
  * This may queue pointer events rather than sending them immediately
  * to the X server. (see update_x11_pointer*())
  */
-void pointer(int mask, int x, int y, rfbClientPtr client) {
+void x11vnc_pointer(int mask, int x, int y, rfbClientPtr client) {
 	allowed_input_t input;
 	int sent = 0, buffer_it = 0;
 	double now;
@@ -780,7 +780,7 @@ void pointer(int mask, int x, int y, rfbClientPtr client) {
 			}
 			if (! ok) {
 				if (debug_pointer) {
-				    rfbLog("pointer(): blackout_ptr skipping "
+				    rfbLog("x11vnc_pointer(): blackout_ptr skipping "
 					"x=%d y=%d in rectangle %d,%d %d,%d\n", x, y,
 					blackr[b].x1, blackr[b].y1,
 					blackr[b].x2, blackr[b].y2);
@@ -911,7 +911,7 @@ void pointer(int mask, int x, int y, rfbClientPtr client) {
 	}
 	if (mask < 0) {		/* -1 just means flush the event queue */
 		if (debug_pointer) {
-			rfbLog("pointer(): flush only.  %.4f\n",
+			rfbLog("x11vnc_pointer(): flush only.  %.4f\n",
 			    dnowx());
 		}
 		INPUT_UNLOCK;
@@ -944,7 +944,7 @@ void pointer(int mask, int x, int y, rfbClientPtr client) {
 		X_UNLOCK;
 	} else if (buffer_it) {
 		if (debug_pointer) {
-			rfbLog("pointer(): calling XFlush+"
+			rfbLog("x11vnc_pointer(): calling XFlush+"
 			    "%.4f\n", dnowx());
 		}
 		X_LOCK;
diff --git a/x11vnc/pointer.h b/x11vnc/pointer.h
index 558f381..061af49 100644
--- a/x11vnc/pointer.h
+++ b/x11vnc/pointer.h
@@ -39,7 +39,7 @@ extern int pointer_queued_sent;
 
 extern void initialize_pointer_map(char *pointer_remap);
 extern void do_button_mask_change(int mask, int button);
-extern void pointer(int mask, int x, int y, rfbClientPtr client);
+extern void x11vnc_pointer(int mask, int x, int y, rfbClientPtr client);
 extern int check_pipeinput(void);
 extern void initialize_pipeinput(void);
 extern void update_x11_pointer_position(int x, int y);
diff --git a/x11vnc/remote.c b/x11vnc/remote.c
index cad70f5..61706ae 100644
--- a/x11vnc/remote.c
+++ b/x11vnc/remote.c
@@ -4444,9 +4444,9 @@ char *process_remote_cmd(char *cmd, int stringonly) {
 		p += strlen("ptr:");
 		rfbLog("remote_cmd: insert pointer event: %s\n", p);
 		if (sscanf(p, "%d,%d,%d", &x, &y, &m) == 3) {
-			pointer(m, x, y, NULL);
+			x11vnc_pointer(m, x, y, NULL);
 		} else if (sscanf(p, "%d,%d", &x, &y) == 2) {
-			pointer(m, x, y, NULL);
+			x11vnc_pointer(m, x, y, NULL);
 		} else {
 			rfbLog("remote_cmd: bad ptr:x,y,mask\n");
 		}
@@ -4611,7 +4611,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
 		} else if (strstr(res, "GRAB_FAIL") && try < max_tries) {
 			rfbLog("bcx_xattach: failed grab check for '%s': %s.  Retrying[%d]...\n", p, res, try);
 			free(res);
-			pointer(0, dpy_x/2 + try, dpy_y/2 + try, NULL);
+			x11vnc_pointer(0, dpy_x/2 + try, dpy_y/2 + try, NULL);
 #if !NO_X11
 			X_LOCK;
 			XFlush_wr(dpy);
diff --git a/x11vnc/scan.c b/x11vnc/scan.c
index 7ef931c..d7722eb 100644
--- a/x11vnc/scan.c
+++ b/x11vnc/scan.c
@@ -3550,7 +3550,7 @@ int scan_for_updates(int count_only) {
 			fb_copy_in_progress = 0;
 			SCAN_FATAL(cs);
 			if (use_threads && pointer_mode != 1) {
-				pointer(-1, 0, 0, NULL);
+				x11vnc_pointer(-1, 0, 0, NULL);
 			}
 			nap_check(tile_count);
 			return tile_count;
@@ -3637,7 +3637,7 @@ if (tile_count) fprintf(stderr, "XX copytile: %.4f  tile_count: %d\n", dnow() -
 		 * tell the pointer handler it can process any queued
 		 * pointer events:
 		 */
-		pointer(-1, 0, 0, NULL);
+		x11vnc_pointer(-1, 0, 0, NULL);
 	}
 
 	if (blackouts) {
diff --git a/x11vnc/screen.c b/x11vnc/screen.c
index 3389da1..0627f5a 100644
--- a/x11vnc/screen.c
+++ b/x11vnc/screen.c
@@ -3616,7 +3616,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
 	/* event callbacks: */
 	screen->newClientHook = new_client;
 	screen->kbdAddEvent = keyboard;
-	screen->ptrAddEvent = pointer;
+	screen->ptrAddEvent = x11vnc_pointer;
 	screen->setXCutText = xcut_receive;
 	screen->setTranslateFunction = set_xlate_wrapper;
 
diff --git a/x11vnc/userinput.c b/x11vnc/userinput.c
index 8c83080..76909da 100644
--- a/x11vnc/userinput.c
+++ b/x11vnc/userinput.c
@@ -3008,12 +3008,12 @@ if (db) fprintf(stderr, "check_xrecord: BUTTON-UP-KEEP-GOING:  %.3f/%.3f %d/%d %
 	pointer_queued_sent = 0;
 	last_x = cursor_x;
 	last_y = cursor_y;
-	pointer(-1, 0, 0, NULL);
+	x11vnc_pointer(-1, 0, 0, NULL);
 	pointer_flush_delay = 0.0;
 
 	if (xrecording && pointer_queued_sent && button_mask_save &&
 	    (last_x != cursor_x || last_y != cursor_y) ) {
-if (db) fprintf(stderr, "  pointer() push yields events on: ret=%d\n", ret);
+if (db) fprintf(stderr, "  x11vnc_pointer() push yields events on: ret=%d\n", ret);
 		if (ret == 2) {
 if (db) fprintf(stderr, "  we decide to send ret=3\n");
 			want_back_in = 1;
@@ -4509,7 +4509,7 @@ if (db) fprintf(stderr, "INTERIOR\n");
 	}
 
 	/*
-	 * pointer() should have snapped the stacking list for us, if
+	 * x11vnc_pointer() should have snapped the stacking list for us, if
 	 * not, do it now (if the XFakeButtonEvent has been flushed by
 	 * now the stacking order may be incorrect).
 	 */
@@ -4565,7 +4565,7 @@ if (db) fprintf(stderr, "INTERIOR\n");
 	/* -threads support for check_wireframe() is rough... crash? */
 	if (use_threads) {
 		/* purge any stored up pointer events: */
-		pointer(-1, 0, 0, NULL);
+		x11vnc_pointer(-1, 0, 0, NULL);
 	}
 
 	if (cursor_noshape_updates_clients(screen)) {
-- 
1.5.6.4