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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user