Commit 03666d6a authored by runge's avatar runge

x11vnc: Fix off-screen bug for -ncache_cr copyrect.

parent e2874d34
2009-03-12 Karl Runge <runge@karlrunge.com>
* x11vnc: Fix off-screen bug for -ncache_cr copyrect.
2009-03-07 Karl Runge <runge@karlrunge.com>
* x11vnc: allow range for X11VNC_SKIP_DISPLAY, document grab
Xserver issue. Add progress_client() to proceed more quickly
......
This diff is collapsed.
......@@ -1063,7 +1063,7 @@ void vnc_reflect_got_copyrect(rfbClient *cl, int src_x, int src_y, int w, int h,
if (dx != last_dx || dy != last_dy) {
rc = fb_push_wait(0.05, FB_COPY|FB_MOD);
}
if (1) fprintf(stderr, "vnc_reflect_got_copyrect: %03dx%03d+%03d+%03d %3d %3d rc=%d\n", dest_x, dest_y, w, h, dx, dy, rc);
if (0) fprintf(stderr, "vnc_reflect_got_copyrect: %03dx%03d+%03d+%03d %3d %3d rc=%d\n", dest_x, dest_y, w, h, dx, dy, rc);
reg = sraRgnCreateRect(dest_x, dest_y, dest_x + w, dest_y + h);
do_copyregion(reg, dx, dy, 0);
sraRgnDestroy(reg);
......
......@@ -3825,7 +3825,8 @@ void ncache_pre_portions(Window orig_frame, Window frame, int *nidx_in, int try_
dx = 0;
dy = dpy_y;
sraRgnOffset(r2, dx, dy);
if (ncdb) fprintf(stderr, "FB_COPY: %.4f 1) offscreen check:\n", dnow() - ntim);
if (ncdb) fprintf(stderr, "FB_COPY: %.4f 1) offscreen: dx, dy: %d, %d -> %d, %d orig %dx%d+%d+%d bs_xy: %d %d\n",
dnow() - ntim, bs_x - orig_x, bs_y - orig_y, dx, dy, orig_w, orig_h, orig_x, orig_y, bs_x, bs_y);
/* 0) save it in the invalid (offscreen) SU portion */
if (! *use_batch) {
......@@ -4107,8 +4108,20 @@ void do_copyrect_drag_move(Window orig_frame, Window frame, int *nidx, int try_b
int dx, dy;
int use_batch = 0;
double ntim = dnow();
static int nob = -1;
sraRegionPtr r0, r1;
if (nob < 0) {
if (getenv("NOCRBATCH")) {
nob = 1;
} else {
nob = 0;
}
}
if (nob) {
try_batch = 0;
}
dx = x - now_x;
dy = y - now_y;
if (dx == 0 && dy == 0) {
......@@ -4125,6 +4138,13 @@ if (ncdb) fprintf(stderr, "do_COPY: now_xy: %d %d, orig_wh: %d %d, xy: %d %d, wh
dx = x - now_x;
dy = y - now_y;
/* make sure the source is on-screen too */
sraRgnOffset(r1, -dx, -dy);
sraRgnAnd(r1, r0);
sraRgnOffset(r1, +dx, +dy);
sraRgnAnd(r1, r0); /* just to be sure, problably not needed */
if (! use_batch) {
do_copyregion(r1, dx, dy, 0);
if (!fb_push_wait(0.2, FB_COPY)) {
......
......@@ -2,7 +2,7 @@
.TH X11VNC "1" "March 2009" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.9.7, lastmod: 2009-03-07
version: 0.9.7, lastmod: 2009-03-08
.SH SYNOPSIS
.B x11vnc
[OPTION]...
......
......@@ -1824,7 +1824,8 @@ char msg2[] =
"\n"
" x11vnc -ncache 10 ...\n"
"\n"
"more info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching\n"
"One can also add -ncache_cr for smooth 'copyrect' window motion.\n"
"More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching\n"
"\n"
;
......
......@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int xdamage_base_event_type = 0;
/* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.9.7 lastmod: 2009-03-07";
char lastmod[] = "0.9.7 lastmod: 2009-03-08";
/* X display info */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment