Commit f2d51686 authored by dextero's avatar dextero

x11vnc: adjust blackout region coordinates to the clipping region

parent 646f844f
...@@ -98,6 +98,13 @@ static void initialize_blackouts(char *list) { ...@@ -98,6 +98,13 @@ static void initialize_blackouts(char *list) {
if (y > Y) { if (y > Y) {
t = Y; Y = y; y = t; 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 || if (x < 0 || x > dpy_x || y < 0 || y > dpy_y ||
X < 0 || X > dpy_x || Y < 0 || Y > dpy_y || X < 0 || X > dpy_x || Y < 0 || Y > dpy_y ||
x == X || y == Y) { x == X || y == Y) {
......
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