summaryrefslogtreecommitdiff
path: root/platform/x11/x11_main.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-03-30 17:05:19 +0100
committerRobin Watts <robin.watts@artifex.com>2015-03-30 17:35:43 +0100
commit8d0ae07482401c8eab116c3dd6a78fde469e03ad (patch)
treec0300d5a2414f6a3bacf1535b3256b512ce26ca5 /platform/x11/x11_main.c
parentfd5a4f5128e76b1b9cf35f70b1341e67f640e9be (diff)
downloadmupdf-8d0ae07482401c8eab116c3dd6a78fde469e03ad.tar.xz
Bug 695804: Add support for 'Shift-Space' in the viewer.
Update pdfapp_onkey to take modifiers. If shift is held down when space is sent, then back up a page. This involves updating the windows app to actually send modifiers. Previously they were always sent as zero to the onmouse routine.
Diffstat (limited to 'platform/x11/x11_main.c')
-rw-r--r--platform/x11/x11_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c
index bef6a366..085c58d8 100644
--- a/platform/x11/x11_main.c
+++ b/platform/x11/x11_main.c
@@ -749,7 +749,7 @@ void winopenuri(pdfapp_t *app, char *buf)
waitpid(pid, NULL, 0);
}
-static void onkey(int c)
+static void onkey(int c, int modifiers)
{
advance_scheduled = 0;
@@ -772,7 +772,7 @@ static void onkey(int c)
return;
}
- pdfapp_onkey(&gapp, c);
+ pdfapp_onkey(&gapp, c, modifiers);
if (gapp.issearching)
{
@@ -958,7 +958,7 @@ int main(int argc, char **argv)
if (xevt.xkey.state & ControlMask && keysym == XK_c)
docopy(&gapp, XA_CLIPBOARD);
else if (len)
- onkey(buf[0]);
+ onkey(buf[0], xevt.xkey.state);
onmouse(oldx, oldy, 0, 0, 0);
@@ -1054,7 +1054,7 @@ int main(int argc, char **argv)
if (tmo_advance_delay.tv_sec <= 0)
{
/* Too late already */
- onkey(' ');
+ onkey(' ', 0);
onmouse(oldx, oldy, 0, 0, 0);
advance_scheduled = 0;
}
@@ -1086,7 +1086,7 @@ int main(int argc, char **argv)
{
if (timeout == &tmo_advance_delay)
{
- onkey(' ');
+ onkey(' ', 0);
onmouse(oldx, oldy, 0, 0, 0);
advance_scheduled = 0;
}