summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-03-30 15:17:57 +0100
committerRobin Watts <robin.watts@artifex.com>2015-03-30 15:19:24 +0100
commitc6e63f40cdf49dbeac105ba9dcfa74643a8a1332 (patch)
tree2906fdc10a262d9cb99e560c031fc53b6ac2bdf6 /platform/x11
parent5bc11ccfcdfd1421b968446d85ac4de4ea785acb (diff)
downloadmupdf-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/x11')
-rw-r--r--platform/x11/pdfapp.c13
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)