summaryrefslogtreecommitdiffstats
path: root/x11vnc/xevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/xevents.c')
-rw-r--r--x11vnc/xevents.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/x11vnc/xevents.c b/x11vnc/xevents.c
index 9dbdd27..e54c106 100644
--- a/x11vnc/xevents.c
+++ b/x11vnc/xevents.c
@@ -13,6 +13,7 @@
#include "connections.h"
#include "unixpw.h"
#include "cleanup.h"
+#include "macosx.h"
/* XXX CHECK BEFORE RELEASE */
int grab_buster = 0;
@@ -639,11 +640,10 @@ void check_keycode_state(void) {
if (! client_count) {
return;
}
+ if (unixpw_in_progress) return;
RAWFB_RET_VOID
- if (unixpw_in_progress) return;
-
/*
* periodically update our model of the keycode_state[]
* by correlating with the Xserver. wait for a pause in
@@ -744,13 +744,13 @@ void check_xevents(int reset) {
static double last_request = 0.0;
XErrorHandler old_handler;
+ if (unixpw_in_progress) return;
+
RAWFB_RET_VOID
#if NO_X11
return;
#else
- if (unixpw_in_progress) return;
-
if (now > last_init_check+1 || reset) {
last_init_check = now;
initialize_xevents(reset);
@@ -1119,11 +1119,6 @@ void check_xevents(int reset) {
void xcut_receive(char *text, int len, rfbClientPtr cl) {
allowed_input_t input;
- RAWFB_RET_VOID
-#if NO_X11
- return;
-#else
-
if (unixpw_in_progress) {
rfbLog("xcut_receive: unixpw_in_progress, skipping.\n");
return;
@@ -1147,6 +1142,18 @@ void xcut_receive(char *text, int len, rfbClientPtr cl) {
return;
}
+#ifdef MACOSX
+ if (macosx_console) {
+ return macosx_set_sel(text, len);
+ }
+#endif
+
+ RAWFB_RET_VOID
+
+#if NO_X11
+ return;
+#else
+
X_LOCK;
/* associate this text with PRIMARY (and SECONDARY...) */