summaryrefslogtreecommitdiffstats
path: root/x11vnc/util.c
diff options
context:
space:
mode:
authorrunge <[email protected]>2010-12-29 10:05:52 -0500
committerrunge <[email protected]>2010-12-29 10:05:52 -0500
commit596331a5c3124f080cdcbb400c188c095048ef35 (patch)
tree66eb904b6c0181703d8f3c9ec81352a970d52601 /x11vnc/util.c
parent0c03b989407f9e5ea66b403011baaaad09fcd536 (diff)
downloadlibtdevnc-596331a5c3124f080cdcbb400c188c095048ef35.tar.gz
libtdevnc-596331a5c3124f080cdcbb400c188c095048ef35.zip
x11vnc: Use opengl to read screen on macosx. non-deprecated macosx interfaces for input injection.
Diffstat (limited to 'x11vnc/util.c')
-rw-r--r--x11vnc/util.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/x11vnc/util.c b/x11vnc/util.c
index 9c8c294..80b1607 100644
--- a/x11vnc/util.c
+++ b/x11vnc/util.c
@@ -594,6 +594,9 @@ int rfbPE(long usec) {
if (ipv6_listen) {
check_ipv6_listen(usec);
}
+ if (unix_sock) {
+ check_unix_sock(usec);
+ }
if (check_rate != 0) {
if (check_rate < 0) {
if (getenv("CHECK_RATE")) {
@@ -713,9 +716,31 @@ char *choose_title(char *display) {
if (display == NULL) {
display = getenv("DISPLAY");
}
+
+#ifdef MACOSX
+ if (display == NULL || strstr(display, "/tmp/") == display) {
+ char *u = get_user_name();
+ char *th = this_host();
+ if (strlen(u) > MAXN/4) {
+ u = "someone";
+ }
+ strcpy(title, u);
+ if (th == NULL && UT.nodename) {
+ th = UT.nodename;
+ }
+ if (th) {
+ strcat(title, "@");
+ strncat(title, th, MAXN - strlen(title));
+ }
+ return title;
+ }
+#endif
+
if (display == NULL) {
return title;
}
+
+ /* use display: */
title[0] = '\0';
if (display[0] == ':') {
char *th = this_host();