Commit 21df602d authored by Christian Beier's avatar Christian Beier Committed by Johannes Schindelin

x11vnc/screen.c: fix -sid mode by adjusting off_x and off_y.

if the window was shifted into view, these offsets also change.
Signed-off-by: 's avatarChristian Beier <dontmind@freeshell.org>
parent a92f7f46
...@@ -2379,19 +2379,19 @@ if (0) fprintf(stderr, "DefaultDepth: %d visial_id: %d\n", depth, (int) visual_ ...@@ -2379,19 +2379,19 @@ if (0) fprintf(stderr, "DefaultDepth: %d visial_id: %d\n", depth, (int) visual_
if (subwin_x + wdpy_x > disp_x) { if (subwin_x + wdpy_x > disp_x) {
shift = 1; shift = 1;
subwin_x = disp_x - wdpy_x - 3; subwin_x = off_x = disp_x - wdpy_x - 3;
} }
if (subwin_y + wdpy_y > disp_y) { if (subwin_y + wdpy_y > disp_y) {
shift = 1; shift = 1;
subwin_y = disp_y - wdpy_y - 3; subwin_y = off_y = disp_y - wdpy_y - 3;
} }
if (subwin_x < 0) { if (subwin_x < 0) {
shift = 1; shift = 1;
subwin_x = 1; subwin_x = off_x = 1;
} }
if (subwin_y < 0) { if (subwin_y < 0) {
shift = 1; shift = 1;
subwin_y = 1; subwin_y = off_y = 1;
} }
if (shift) { if (shift) {
......
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