Last active
August 29, 2015 14:01
-
-
Save dextero/bd2e22292a08417673e4 to your computer and use it in GitHub Desktop.
x11vnc patch to fix invalid blackout region coordinates when using -clip parameter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment