From a6bff50803615c6e4c5eab891058941846237974 Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 3 Oct 2004 22:04:20 +0000 Subject: [PATCH] X11 map scrolling behavior [from Steve VanDevender] This isn't really a bug, but I find it does make the map scrolling in the generic X11 version a lot less distracting. The original behavior produces certain boundaries where, when the cursor moves back and forth across that boundary, the map scrolls with each crossing. This is particularly annoying in places like Sokoban where the player makes that kind of movement frequently causing large jumps of the map each time. Changing the border and delta constants in winmap.c as below eliminates that behavior, as well as making the cursor easier to track by tending to recenter it whenever the map shifts. --- win/X11/winmap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/win/X11/winmap.c b/win/X11/winmap.c index a72ea51ec..2d805d37e 100644 --- a/win/X11/winmap.c +++ b/win/X11/winmap.c @@ -559,11 +559,11 @@ check_cursor_visibility(wp) /* All values are relative to currently visible area */ -#define V_BORDER 0.3 /* if this far from vert edge, shift */ -#define H_BORDER 0.3 /* if this from from horiz edge, shift */ +#define V_BORDER 0.25 /* if this far from vert edge, shift */ +#define H_BORDER 0.25 /* if this from from horiz edge, shift */ -#define H_DELTA 0.4 /* distance of horiz shift */ -#define V_DELTA 0.4 /* distance of vert shift */ +#define H_DELTA 0.25 /* distance of horiz shift */ +#define V_DELTA 0.25 /* distance of vert shift */ if (horiz_sb) { XtSetArg(arg[0], XtNshown, &shown);