X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=driver%2Fxscreensaver-command.c;fp=driver%2Fxscreensaver-command.c;h=0057438a37ede9125fabb77fde0b5b53b1aa2fc7;hp=f35a30d933228c477e9a9d0b8f2e17c64048ce57;hb=2762a7d7cf8d83e68b8f635941f6609119d630ae;hpb=4ade52359b6eba3621566dac79793a33aa4c915f diff --git a/driver/xscreensaver-command.c b/driver/xscreensaver-command.c index f35a30d9..0057438a 100644 --- a/driver/xscreensaver-command.c +++ b/driver/xscreensaver-command.c @@ -324,8 +324,12 @@ main (int argc, char **argv) if (*cmd == XA_ACTIVATE || *cmd == XA_LOCK || *cmd == XA_NEXT || *cmd == XA_PREV || *cmd == XA_SELECT) /* People never guess that KeyRelease deactivates the screen saver too, - so if we're issuing an activation command, wait a second. */ - sleep (1); + so if we're issuing an activation command, wait a second. + No need to do this if stdin is not a tty, meaning we're not being + run from the command line. + */ + if (isatty(0)) + sleep (1); i = xscreensaver_command (dpy, *cmd, arg, True, NULL); if (i < 0) exit (i);