summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordscho <johannes.schindelin@gmx.de>2014-05-14 12:52:58 -0500
committerdscho <johannes.schindelin@gmx.de>2014-05-14 12:52:58 -0500
commit8c21b31cefc73d5da230deffe0b3a292f1b24b7a (patch)
tree34c2bf8cf27a21826e1f75b9a0e43f0563cdd69f
parent646f844f69cc74b8eebf25cc76663b2ee851e5d3 (diff)
parentf2d516866c748df25a0b4dbc3c5c98370d01af3c (diff)
downloadlibtdevnc-8c21b31cefc73d5da230deffe0b3a292f1b24b7a.tar.gz
libtdevnc-8c21b31cefc73d5da230deffe0b3a292f1b24b7a.zip
Merge pull request #4 from dextero/master
x11vnc: adjust blackout region coordinates to the clipping region
-rw-r--r--x11vnc/xinerama.c7
1 files changed, 7 insertions, 0 deletions
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) {