projects
/
xboard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Couple mouse wheel to v-scrolls in file browser
[xboard.git]
/
filebrowser
/
path.c
diff --git
a/filebrowser/path.c
b/filebrowser/path.c
index
5aac90c
..
edb43c8
100644
(file)
--- a/
filebrowser/path.c
+++ b/
filebrowser/path.c
@@
-77,6
+77,8
@@
static SFLogin *SFlogins;
static int SFtwiddle = 0;
static int SFtwiddle = 0;
+void SFsetText(char *path);
+
int
SFchdir(path)
char *path;
int
SFchdir(path)
char *path;
@@
-713,6
+715,10
@@
SFbuttonPressList(w, n, event)
int n;
XButtonPressedEvent *event;
{
int n;
XButtonPressedEvent *event;
{
+ int dir = 0;
+ if(event->button == Button4) dir = -2; // kludge to indicate relative motion
+ if(event->button == Button5) dir = -1;
+ if(dir) SFvSliderMovedCallback(w, n, dir); else
SFbuttonPressed = 1;
}
SFbuttonPressed = 1;
}
@@
-725,6
+731,7
@@
SFbuttonReleaseList(w, n, event)
{
SFDir *dir;
{
SFDir *dir;
+ if(event->button == Button4 || event->button == Button5) return; // [HGM] mouse wheel does not select
SFbuttonPressed = 0;
if (SFcurrentInvert[n] != -1) {
SFbuttonPressed = 0;
if (SFcurrentInvert[n] != -1) {