diff options
author | Bert <ber.t@gmx.com> | 2011-02-17 17:30:38 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-02-17 17:30:38 +0100 |
commit | fbfec45b3360d4d0d4011bad182fc2a21f8da6ae (patch) | |
tree | 51a625bbf3c4d05b3fd79f62d598090b3a9eb1a4 /main.c | |
parent | 1ac330292378c92aeaab68b12aec43eef522b843 (diff) |
Variable timeout
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -230,7 +230,7 @@ void read_dir_rec(const char *dirname) { /* event handling */ -unsigned char timeout; +int timeout; int mox, moy; void on_keypress(XKeyEvent *kev) { @@ -436,7 +436,7 @@ void on_motionnotify(XMotionEvent *mev) { if (mev->x >= 0 && mev->x <= win.w && mev->y >= 0 && mev->y <= win.h) { if (img_move(&img, &win, mev->x - mox, mev->y - moy)) - timeout = 1; + timeout = 1000; mox = mev->x; moy = mev->y; @@ -454,7 +454,7 @@ void run() { while (1) { if (timeout) { t.tv_sec = 0; - t.tv_usec = 75000; + t.tv_usec = timeout; xfd = ConnectionNumber(win.env.dpy); FD_ZERO(&fds); FD_SET(xfd, &fds); @@ -483,7 +483,7 @@ void run() { case ConfigureNotify: if (win_configure(&win, &ev.xconfigure)) { img.checkpan = 1; - timeout = 1; + timeout = 75000; } break; case ClientMessage: |