diff options
author | Robin Watts <robin.watts@artifex.com> | 2015-03-30 15:17:57 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2015-03-30 15:19:24 +0100 |
commit | c6e63f40cdf49dbeac105ba9dcfa74643a8a1332 (patch) | |
tree | 2906fdc10a262d9cb99e560c031fc53b6ac2bdf6 /platform | |
parent | 5bc11ccfcdfd1421b968446d85ac4de4ea785acb (diff) | |
download | mupdf-c6e63f40cdf49dbeac105ba9dcfa74643a8a1332.tar.xz |
Bug 695829: Mouse buttons flip pages in presentation mode.
Adopt patch from Risto Saarelma. When in presentation mode, left
and right mouse buttons flip pages forward/back.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/pdfapp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index c27934e6..a54a357b 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -1607,6 +1607,19 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta int ystep = isx ? 20 * dir : 0; pdfapp_panview(app, app->panx + xstep, app->pany + ystep); } + if (app->presentation_mode) + { + if (btn == 1 && app->pageno < app->pagecount) + { + app->pageno++; + pdfapp_showpage(app, 1, 1, 1, 0, 0); + } + if (btn == 3 && app->pageno > 1) + { + app->pageno--; + pdfapp_showpage(app, 1, 1, 1, 0, 0); + } + } } else if (state == -1) |