summaryrefslogtreecommitdiffstats
path: root/x11vnc/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/scan.c')
-rw-r--r--x11vnc/scan.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/x11vnc/scan.c b/x11vnc/scan.c
index b8fa645..1fb7883 100644
--- a/x11vnc/scan.c
+++ b/x11vnc/scan.c
@@ -2961,7 +2961,17 @@ static void nap_check(int tile_cnt) {
now = time(NULL);
if (screen_blank > 0) {
- int dt_ev, dt_fbu, ms = 2000;
+ int dt_ev, dt_fbu;
+ static int ms = 0;
+ if (ms == 0) {
+ ms = 2000;
+ if (getenv("X11VNC_SB_FACTOR")) {
+ ms = ms * atof(getenv("X11VNC_SB_FACTOR"));
+ }
+ if (ms <= 0) {
+ ms = 2000;
+ }
+ }
/* if no activity, pause here for a second or so. */
dt_ev = (int) (now - last_event);