summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--man/feh.pre7
-rw-r--r--src/events.c11
-rw-r--r--src/options.c2
4 files changed, 23 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 552ae4d..b232574 100644
--- a/Makefile
+++ b/Makefile
@@ -25,20 +25,20 @@ test-x11: all
install: install-man install-doc install-bin install-font install-img
install: install-icon install-examples install-applications
-install-man:
+install-man: man/feh.1
@echo installing manuals to ${man_dir}
@mkdir -p ${man_dir}/man1
@cp man/feh.1 ${man_dir}/man1
@chmod 644 ${man_dir}/man1/feh.1
-install-doc:
+install-doc: AUTHORS ChangeLog README.md TODO
@echo installing docs to ${doc_dir}
@mkdir -p ${doc_dir}
@cp AUTHORS ChangeLog README.md TODO ${doc_dir}
@chmod 644 ${doc_dir}/AUTHORS ${doc_dir}/ChangeLog ${doc_dir}/README.md \
${doc_dir}/TODO
-install-bin:
+install-bin: src/feh
@echo installing executables to ${bin_dir}
@mkdir -p ${bin_dir}
@cp src/feh ${bin_dir}/feh.tmp
@@ -78,7 +78,7 @@ install-examples:
@cp examples/* ${example_dir}
@chmod 644 ${example_dir}/*
-install-applications:
+install-applications: share/applications/feh.desktop
@echo installing desktop file to ${desktop_dir}
@mkdir -p ${desktop_dir}
@cp share/applications/feh.desktop ${desktop_dir}
diff --git a/man/feh.pre b/man/feh.pre
index 419820c..0ec2613 100644
--- a/man/feh.pre
+++ b/man/feh.pre
@@ -1905,6 +1905,13 @@ section can also be bound to a button.
.
Reload current image
.
+.It 0 Ao cursor movement while not panning, zooming, or similar Ac
+.
+Does not have a default binding.
+By binding it to
+.Cm quit ,
+you can turn feh into a simple screensaver.
+.
.It 1 Ao left mouse button Ac Bq pan
.
pan the current image
diff --git a/src/events.c b/src/events.c
index 5bb2ecf..81b7157 100644
--- a/src/events.c
+++ b/src/events.c
@@ -85,6 +85,15 @@ static void feh_set_parse_bb_partial(fehkey *button, char *binding)
button->button = atoi(cur);
button->state = mod;
+
+ if (button->button == 0) {
+ /*
+ * Mod3 is unused on today's keyboards. If Mod3 is unset and button==0,
+ * we are dealing with an uninitialized or unset binding. If Mod3 is set
+ * and button==0, it refers to mouse movement.
+ */
+ button->state |= Mod3Mask;
+ }
}
/*
@@ -680,6 +689,8 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
y = (ev->xbutton.y - winwid->im_y) / winwid->zoom;
thumbnail = feh_thumbnail_get_thumbnail_from_coords(x, y);
feh_thumbnail_select(winwid, thumbnail);
+ } else {
+ feh_event_handle_generic(winwid, ev->xmotion.state | Mod3Mask, NoSymbol, 0);
}
}
return;
diff --git a/src/options.c b/src/options.c
index a77c163..4d1e527 100644
--- a/src/options.c
+++ b/src/options.c
@@ -838,7 +838,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
opt.use_conversion_cache = 0;
break;
case OPTION_window_id:
- opt.x11_windowid = atol(optarg);
+ opt.x11_windowid = strtol(optarg, NULL, 0);
break;
case OPTION_zoom_step:
opt.zoom_rate = atof(optarg);