From f2dccf64b9a6b015c0326c36f8226eef49d8d4f6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 23 Apr 2005 20:43:02 +0200 Subject: fix cursor resetting after key presses --- apps/unix/x11pdf.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/unix/x11pdf.c') 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; -- cgit v1.2.3