diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2013-07-30 14:20:21 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2013-08-24 23:38:01 +0200 |
commit | a4d8d49ad11b56ce89dea6f74f620192d4198dd9 (patch) | |
tree | c13c28d8069da91081d2b721e5d3aeb20586b671 /platform/x11 | |
parent | e4155d89688876da5a7b8872b87c647704e1a43a (diff) | |
download | mupdf-a4d8d49ad11b56ce89dea6f74f620192d4198dd9.tar.xz |
X11 viewer code rearranged for aesthetic reasons.
Set display timeout where the page number is shown, not in x11 main.
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/x11_main.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index 84e85f2f..d74e9e15 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -741,6 +741,12 @@ static void onkey(int c) if (!gapp.isediting && c == 'P') { + struct timeval now; + struct timeval tmo; + tmo.tv_sec = 2; + tmo.tv_usec = 0; + gettimeofday(&now, NULL); + timeradd(&now, &tmo, &tmo_at); showingpage = 1; winrepaint(&gapp); return; @@ -973,14 +979,7 @@ int main(int argc, char **argv) pdfapp_postblit(&gapp); } - if (showingpage && !tmo_at.tv_sec && !tmo_at.tv_usec) - { - tmo.tv_sec = 2; - tmo.tv_usec = 0; - - gettimeofday(&now, NULL); - timeradd(&now, &tmo, &tmo_at); - } else if (!showingpage && !showingmessage && (tmo_at.tv_sec || tmo_at.tv_usec)) + if (!showingpage && !showingmessage && (tmo_at.tv_sec || tmo_at.tv_usec)) { tmo_at.tv_sec = 0; tmo_at.tv_usec = 0; |