From f2d516866c748df25a0b4dbc3c5c98370d01af3c Mon Sep 17 00:00:00 2001 From: dextero Date: Tue, 13 May 2014 19:09:35 +0200 Subject: [PATCH] x11vnc: adjust blackout region coordinates to the clipping region --- x11vnc/xinerama.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/x11vnc/xinerama.c b/x11vnc/xinerama.c index 001e2ca..0d2ca71 100644 --- a/x11vnc/xinerama.c +++ b/x11vnc/xinerama.c @@ -98,6 +98,13 @@ static void initialize_blackouts(char *list) { if (y > Y) { t = Y; Y = y; y = t; } + + /* take clipping region into account */ + x = nfix(x - coff_x, wdpy_x); + X = nfix(X - coff_x, wdpy_x); + y = nfix(y - coff_y, wdpy_y); + Y = nfix(Y - coff_y, wdpy_y); + if (x < 0 || x > dpy_x || y < 0 || y > dpy_y || X < 0 || X > dpy_x || Y < 0 || Y > dpy_y || x == X || y == Y) {