x11vnc: remove build errors, get -ncache working on macosx again.

pull/1/head
runge 17 years ago
parent ca56c41c9c
commit 3f0f799d20

File diff suppressed because it is too large Load Diff

@ -133,7 +133,7 @@ void set_dpms_mode(char *mode) {
return;
}
if (DPMSInfo(dpy, &level, &enabled)) {
char *from;
char *from = "unk";
if (enabled && level != want) {
XErrorHandler old_handler = XSetErrorHandler(trap_xerror);
trapped_xerror = 0;

@ -2867,7 +2867,8 @@ static int scan_display(int ystart, int rescan) {
xd_check = 0;
if (xdamage_hint_skip(y)) {
if (xd_do_check && dpy && use_xdamage == 1) {
xd_tck = (xd_tck++) % xd_freq;
xd_tck++;
xd_tck = xd_tck % xd_freq;
if (xd_tck == 0) {
xd_check = 1;
xd_samples++;
@ -3164,7 +3165,7 @@ int scan_for_updates(int count_only) {
SCAN_FATAL(tile_count);
last_xd_check = time(NULL);
if (xd_samples > 200) {
static bad = 0;
static int bad = 0;
if (xd_misses > (5 * xd_samples) / 100) {
rfbLog("XDAMAGE is not working well... misses: %d/%d\n", xd_misses, xd_samples);
rfbLog("Maybe a OpenGL app like Beryl is the problem? Use -noxdamage\n");

@ -13,6 +13,7 @@
#include "keyboard.h"
#include "cursor.h"
#include "remote.h"
#include "avahi.h"
void check_switched_user(void);
void lurk_loop(char *str);
@ -1796,7 +1797,7 @@ if (db) fprintf(stderr, "%d -- %s -- %s\n", i, proc, buf);
}
}
}
if (7 <= vt && vt <= 128) {
if (7 <= vt && vt <= 12) {
char chvt[100];
sprintf(chvt, "chvt %d >/dev/null 2>/dev/null &", vt);
rfbLog("running: %s\n", chvt);

@ -21,6 +21,7 @@
#include "macosxCGS.h"
#include "cursor.h"
#include "screen.h"
#include "connections.h"
/*
* user input handling heuristics
@ -3153,11 +3154,7 @@ static int try_copyrect(Window orig_frame, Window frame, int x, int y, int w, in
}
if (db2) fprintf(stderr, "try_copyrect: 0x%lx/0x%lx bad: %d stack_list_num: %d\n", orig_frame, frame, dt_bad, stack_list_num);
#if 0
/* XXX Y */
//dt_bad = 0;
#endif
/* XXX Y dt_bad = 0 */
if (dt_bad && wireframe_in_progress) {
sraRegionPtr rect;
/* send the whole thing... */
@ -5835,7 +5832,7 @@ int lookup_win_index(Window win) {
int k2 = recidx[k];
if (cache_list[k2].win == win) {
idx = k2;
if (0) fprintf(stderr, "recentA(shortcut): %d 0x%x\n", idx, win);
if (0) fprintf(stderr, "recentA(shortcut): %d 0x%lx\n", idx, win);
s1++;
break;
}
@ -5849,7 +5846,7 @@ if (0) fprintf(stderr, "recentA(shortcut): %d 0x%x\n", idx, win);
}
if (cache_list[k].win == win) {
idx = k;
if (0) fprintf(stderr, "recentB(normal): %d 0x%x\n", idx, win);
if (0) fprintf(stderr, "recentB(normal): %d 0x%lx\n", idx, win);
s2++;
break;
}
@ -6968,7 +6965,7 @@ int clipped(int idx) {
r2 = sraRgnCreateRect(xc, yc, xc+wc, yc+hc);
sraRgnAnd(r2, r0);
if (sraRgnAnd(r2, r1)) {
if (0) fprintf(stderr, "clip[0x%x]: 0x%x, %d/%d\n", win, cache_list[idx2].win, ic, idx2);
if (0) fprintf(stderr, "clip[0x%lx]: 0x%lx, %d/%d\n", win, cache_list[idx2].win, ic, idx2);
clip = 1;
}
sraRgnDestroy(r2);
@ -6978,7 +6975,7 @@ if (0) fprintf(stderr, "clip[0x%x]: 0x%x, %d/%d\n", win, cache_list[idx2].win, i
}
sraRgnDestroy(r0);
sraRgnDestroy(r1);
if (0) fprintf(stderr, "clip[0x%x]: %s\n", win, clip ? "clipped" : "no-clipped");
if (0) fprintf(stderr, "clip[0x%lx]: %s\n", win, clip ? "clipped" : "no-clipped");
return clip;
}
@ -6988,7 +6985,7 @@ void clip_region(sraRegionPtr r, Window win) {
for (ic = old_stack_n - 1; ic >= 0; ic--) {
int xc, yc, wc, hc;
if (0) fprintf(stderr, "----[0x%x]: 0x%x, %d %d\n", win, old_stack[ic], ic, old_stack_mapped[ic]);
if (0) fprintf(stderr, "----[0x%lx]: 0x%lx, %d %d\n", win, old_stack[ic], ic, old_stack_mapped[ic]);
if (old_stack[ic] == win) {
break;
}
@ -7012,7 +7009,7 @@ if (0) fprintf(stderr, "----[0x%x]: 0x%x, %d %d\n", win, old_stack[ic], ic, old
r1 = sraRgnCreateRect(xc, yc, xc+wc, yc+hc);
if (sraRgnAnd(r1, r)) {
sraRgnSubtract(r, r1);
if (0) fprintf(stderr, "clip[0x%x]: 0x%x, %d/%d\n", win, cache_list[idx2].win, ic, idx2);
if (0) fprintf(stderr, "clip[0x%lx]: 0x%lx, %d/%d\n", win, cache_list[idx2].win, ic, idx2);
}
sraRgnDestroy(r1);
}
@ -8066,7 +8063,7 @@ void set_ncache_xrootpmap(void) {
if (use_solid_bg) {
image = solid_image(NULL);
} else if (pmap != None) {
Pixmap pixmap;
Pixmap pixmap = None;
unsigned char *d_pmap;
XGetWindowProperty(dpy, rootwin, pmap, 0L, 1L, False,
@ -8792,13 +8789,15 @@ int check_ncache(int reset, int mode) {
if (! macosx_console) {
RAWFB_RET(-1)
}
if (! screen) {
return -1;
}
#else
RAWFB_RET(-1)
#endif
if (! screen || ! dpy) {
return -1;
}
#endif
now = dnow();

@ -16,6 +16,8 @@
#include "macosx.h"
#include "screen.h"
#include "pm.h"
#include "pointer.h"
#include "remote.h"
/* XXX CHECK BEFORE RELEASE */
int grab_buster = 0;
@ -1373,7 +1375,6 @@ void set_server_input(rfbClientPtr cl, int grab) {
#endif
}
void set_text_chat(rfbClientPtr cl, int len, char *txt) {
char buf[100];
int dochat = 1;
rfbClientIteratorPtr iter;
rfbClientPtr cl2;
@ -1393,14 +1394,15 @@ void set_text_chat(rfbClientPtr cl, int len, char *txt) {
}
iter = rfbGetClientIterator(screen);
while( (cl2 = rfbClientIteratorNext(iter)) ) {
unsigned int ulen = (unsigned int) len;
if (cl2 == cl) {
continue;
}
if (len == rfbTextChatOpen) {
if (ulen == rfbTextChatOpen) {
rfbSendTextChatMessage(cl2, rfbTextChatOpen, "");
} else if (len == rfbTextChatClose) {
} else if (ulen == rfbTextChatClose) {
rfbSendTextChatMessage(cl2, rfbTextChatClose, "");
} else if (len == rfbTextChatFinished) {
} else if (ulen == rfbTextChatFinished) {
rfbSendTextChatMessage(cl2, rfbTextChatFinished, "");
} else if (len <= rfbTextMaxSize) {
rfbSendTextChatMessage(cl2, len, txt);
@ -1410,6 +1412,7 @@ void set_text_chat(rfbClientPtr cl, int len, char *txt) {
}
int get_keyboard_led_state_hook(rfbScreenInfoPtr s) {
if (s) {}
if (unixpw_in_progress) {
rfbLog("get_keyboard_led_state_hook: unixpw_in_progress, skipping.\n");
return 0;

Loading…
Cancel
Save