summaryrefslogtreecommitdiffstats
path: root/x11vnc/userinput.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/userinput.c')
-rw-r--r--x11vnc/userinput.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/x11vnc/userinput.c b/x11vnc/userinput.c
index ecd71e7..bc6a16c 100644
--- a/x11vnc/userinput.c
+++ b/x11vnc/userinput.c
@@ -4385,6 +4385,19 @@ if (db) fprintf(stderr, " frame: x: %d y: %d w: %d h: %d px: %d py: %d fr
if (! try_it && wireframe_mod_state()) {
try_it = 1;
}
+ if (try_it && clipshift) {
+ sraRegionPtr r1, r2;
+ int xc = off_x + coff_x;
+ int yc = off_y + coff_y;
+ r1 = sraRgnCreateRect(x, y, x+w, y+h);
+ r2 = sraRgnCreateRect(xc, yc, xc+dpy_x, yc+dpy_y);
+ if (!sraRgnAnd(r1, r2)) {
+if (db) fprintf(stderr, "OUTSIDE CLIPSHIFT\n");
+ try_it = 0;
+ }
+ sraRgnDestroy(r1);
+ sraRgnDestroy(r2);
+ }
if (! try_it) {
if (db) fprintf(stderr, "INTERIOR\n");
#ifdef MACOSX