diff options
author | Bert <ber.t@gmx.com> | 2011-02-17 17:32:29 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-02-17 17:32:29 +0100 |
commit | e2ef9b8323a475f5e9f1a5692578e59df47eeb9b (patch) | |
tree | 0cc9260114d97cb51b227b32b5d1935ddd3044a1 /main.c | |
parent | 6adbb3831d889b7a0fa3b69e40843d8b70beaf55 (diff) | |
parent | fbfec45b3360d4d0d4011bad182fc2a21f8da6ae (diff) |
Variable timeout (2)
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -255,7 +255,7 @@ void read_dir_rec(const char *dirname) { /* event handling */ -unsigned char timeout; +int timeout; int mox, moy; void redraw() { @@ -515,7 +515,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; @@ -547,11 +547,11 @@ void run() { redraw(); continue; } else { - timeout = 1; + timeout = 75000; } } else 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); @@ -577,7 +577,7 @@ void run() { break; case ConfigureNotify: if (win_configure(&win, &ev.xconfigure)) { - timeout = 1; + timeout = 75000; if (mode == MODE_NORMAL) img.checkpan = 1; } |