summaryrefslogtreecommitdiff
path: root/apps/unix/x11pdf.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/unix/x11pdf.c')
-rw-r--r--apps/unix/x11pdf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/unix/x11pdf.c b/apps/unix/x11pdf.c
index 3fad2fb8..7c5633d5 100644
--- a/apps/unix/x11pdf.c
+++ b/apps/unix/x11pdf.c
@@ -395,6 +395,8 @@ int main(int argc, char **argv)
int len;
unsigned char buf[128];
KeySym keysym;
+ int oldx = 0;
+ int oldy = 0;
while ((c = getopt(argc, argv, "d:")) != -1)
{
@@ -449,9 +451,12 @@ int main(int argc, char **argv)
len = XLookupString(&xevt.xkey, buf, sizeof buf, &keysym, 0);
if (len)
onkey(buf[0]);
+ onmouse(oldx, oldy, 0, 0);
break;
case MotionNotify:
+ oldx = xevt.xbutton.x;
+ oldy = xevt.xbutton.y;
onmouse(xevt.xbutton.x, xevt.xbutton.y, xevt.xbutton.button, 0);
break;