summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--man/feh.pre20
-rw-r--r--src/events.c14
-rw-r--r--src/slideshow.c8
-rw-r--r--src/wallpaper.c9
-rw-r--r--src/winwidget.h1
-rw-r--r--test/scr/caption_donebin6514 -> 6262 bytes
-rw-r--r--test/scr/caption_nonebin6525 -> 4285 bytes
-rw-r--r--test/scr/draw_actionbin5551 -> 5328 bytes
-rw-r--r--test/scr/draw_action_tintedbin5884 -> 5628 bytes
-rw-r--r--test/scr/draw_all_multibin7125 -> 6856 bytes
-rw-r--r--test/scr/draw_all_onebin6924 -> 6658 bytes
-rw-r--r--test/scr/draw_filenamebin5233 -> 5022 bytes
-rw-r--r--test/scr/draw_filename_actionbin6098 -> 5855 bytes
-rw-r--r--test/scr/draw_filename_action_tintedbin6547 -> 6277 bytes
-rw-r--r--test/scr/draw_filename_tintedbin5429 -> 5200 bytes
-rw-r--r--test/scr/draw_infobin5511 -> 5293 bytes
-rw-r--r--test/scr/draw_info_tintedbin5769 -> 5522 bytes
-rw-r--r--test/scr/draw_nothingbin6525 -> 4285 bytes
-rw-r--r--test/scr/feh_full_lwibin17898 -> 10533 bytes
-rw-r--r--test/scr/feh_lhibin13552 -> 10558 bytes
-rw-r--r--test/scr/feh_lhi_ibin34338 -> 23044 bytes
-rw-r--r--test/scr/feh_lhi_iibin71938 -> 47242 bytes
-rw-r--r--test/scr/feh_lhi_iirbin15431 -> 12460 bytes
-rw-r--r--test/scr/feh_lhi_iirrbin15400 -> 12463 bytes
-rw-r--r--test/scr/feh_lhi_iirribin63970 -> 40868 bytes
-rw-r--r--test/scr/feh_lhi_iirriobin72012 -> 47314 bytes
-rw-r--r--test/scr/feh_lhi_obin20132 -> 14486 bytes
-rw-r--r--test/scr/feh_lhi_oobin32053 -> 21068 bytes
-rw-r--r--test/scr/feh_lhi_ooobin136692 -> 93091 bytes
-rw-r--r--test/scr/feh_lwibin19070 -> 15111 bytes
-rw-r--r--test/scr/feh_lwi_scroll_rbin19066 -> 15040 bytes
-rw-r--r--test/scr/feh_lwi_scroll_rdbin19075 -> 15063 bytes
-rw-r--r--test/scr/feh_lwi_scroll_rdrbin19188 -> 15162 bytes
-rw-r--r--test/scr/feh_lwi_scroll_rdrubin19143 -> 15106 bytes
-rw-r--r--test/scr/feh_lwi_scroll_rdrulbin19066 -> 15040 bytes
-rw-r--r--test/scr/feh_scaledown_lwibin19203 -> 10692 bytes
-rw-r--r--test/scr/geometry_offset_onlybin570 -> 629 bytes
-rw-r--r--test/scr/index_full_h400bin3180 -> 2853 bytes
-rw-r--r--test/scr/index_full_w400bin2135 -> 1944 bytes
-rw-r--r--test/scr/index_h400bin1694 -> 1402 bytes
-rw-r--r--test/scr/index_w400bin1159 -> 1047 bytes
-rw-r--r--test/scr/thumbnail_defaultbin1159 -> 1047 bytes
43 files changed, 47 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 9645aaf..c2075b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,17 @@ git HEAD
* Do not apply --scale-down to the thumbnail window. It will be applied
to windows opened from this, though.
+ <https://github.com/derf/feh/issues/106>
* Patch by Rob Cornish: Respect --image-bg when setting a wallpaper
+ (bg-center and bg-max)
+ <https://github.com/derf/feh/pull/105>
+ * Add %V (feh process ID) format specifier
+ <https://github.com/derf/feh/issues/109>
+ * Fix delete not working on last image with --cycle-once
+ <https://github.com/derf/feh/issues/107>
+ * Treat quick, low-offset drags (1px or 2px move in <1 second) as clicks
+ to improve graphics tablet support
+ <https://github.com/derf/feh/issues/113>
Tue, 16 Oct 2012 06:29:58 +0200 Daniel Friesel <derf+feh@finalrewind.org>
diff --git a/man/feh.pre b/man/feh.pre
index 701e399..e9ee3b7 100644
--- a/man/feh.pre
+++ b/man/feh.pre
@@ -1060,7 +1060,8 @@ Toggle filename display
.
.It f Bq save_filelist
.
-Save the current filelist to a unique filename
+Save the current filelist as
+.Qq feh_PID_ID_filelist
.
.It h Bq toggle_pause
.
@@ -1102,7 +1103,8 @@ Reload current image. Useful for webcams
.
.It s Bq save_image
.
-Save the current image to a unique filename
+Save the current image as
+.Qq feh_PID_ID_FILENAME
.
.It v Bq toggle_fullscreen
.
@@ -1361,14 +1363,18 @@ Rotate current image
.
.Sh MOUSE ACTIONS
.
-When viewing an image, by default mouse button 1 pans
-.Pq moves the image around
+Default Bindings:
+When viewing an image, mouse button 1 pans the image
+.Pq moves it around
or, when only clicked, moves to the next image
-.Pq slideshow mode only ;
-button 2 zooms
+.Pq slideshow mode only .
+Quick drags with less than 2px of movement per axis will be treated as clicks
+to aid graphics tablet users.
+.
+Mouse button 2 zooms
.Po click and drag left->right to zoom in, right->left to zoom out, click once
to restore zoom to 100%
-.Pc ;
+.Pc
and mouse button 3 opens the menu.
.
.Pp
diff --git a/src/events.c b/src/events.c
index 0d5e07d..dcd1aa1 100644
--- a/src/events.c
+++ b/src/events.c
@@ -32,6 +32,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "events.h"
#include "thumbnail.h"
+#define FEH_JITTER_OFFSET 2
+#define FEH_JITTER_TIME 1
+
fehbb buttons;
feh_event_handler *ev_handler[LASTEvent];
@@ -226,6 +229,7 @@ static void feh_event_handle_ButtonPress(XEvent * ev)
D(("click offset is %d,%d\n", ev->xbutton.x, ev->xbutton.y));
winwid->click_offset_x = ev->xbutton.x - winwid->im_x;
winwid->click_offset_y = ev->xbutton.y - winwid->im_y;
+ winwid->click_start_time = time(NULL);
} else if (feh_is_bb(&buttons.zoom, button, state)) {
D(("Zoom Button Press event\n"));
@@ -496,8 +500,14 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
winwid = winwidget_get_from_window(ev->xmotion.window);
if (winwid) {
if (opt.mode == MODE_NEXT) {
- opt.mode = MODE_PAN;
- winwid->mode = MODE_PAN;
+ if ((abs(winwid->click_offset_x - (ev->xmotion.x - winwid->im_x)) > FEH_JITTER_OFFSET)
+ || (abs(winwid->click_offset_y - (ev->xmotion.y - winwid->im_y)) > FEH_JITTER_OFFSET)
+ || (time(NULL) - winwid->click_start_time > FEH_JITTER_TIME)) {
+ opt.mode = MODE_PAN;
+ winwid->mode = MODE_PAN;
+ }
+ else
+ return;
}
D(("Panning\n"));
orig_x = winwid->im_x;
diff --git a/src/slideshow.c b/src/slideshow.c
index 7dcf791..d79c859 100644
--- a/src/slideshow.c
+++ b/src/slideshow.c
@@ -555,6 +555,14 @@ void feh_filelist_image_remove(winwidget winwid, char do_delete)
gib_list *doomed;
doomed = current_file;
+ /*
+ * work around feh_list_jump exiting if cycle_once is enabled
+ * and no further files are left (we need to delete first)
+ */
+ if (opt.cycle_once && ! doomed->next && do_delete) {
+ feh_file_rm_and_free(filelist, doomed);
+ exit(0);
+ }
slideshow_change_image(winwid, SLIDE_NEXT, 0);
if (do_delete)
filelist = feh_file_rm_and_free(filelist, doomed);
diff --git a/src/wallpaper.c b/src/wallpaper.c
index df78303..30c3925 100644
--- a/src/wallpaper.c
+++ b/src/wallpaper.c
@@ -190,6 +190,9 @@ static void feh_wm_set_bg_maxed(Pixmap pmap, Imlib_Image im, int use_filelist,
void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
int filled, int desktop, int use_filelist)
{
+ XGCValues gcvalues;
+ XGCValues gcval;
+ GC gc;
char bgname[20];
int num = (int) rand();
char bgfil[4096];
@@ -264,8 +267,6 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
Display *disp2;
Window root2;
int depth2;
- XGCValues gcvalues;
- GC gc;
int in, out, w, h;
if (opt.xinerama)
@@ -322,8 +323,6 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
0, 0, scr->width, scr->height);
fehbg = estrjoin(" ", "feh", fehbg_xinerama, "--bg-scale", filbuf, NULL);
} else if (centered) {
- XGCValues gcval;
- GC gc;
D(("centering\n"));
@@ -368,14 +367,12 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
fehbg = estrjoin(" ", "feh", fehbg_xinerama, "--bg-fill", filbuf, NULL);
} else if (filled == 2) {
- XGCValues gcval;
pmap_d1 = XCreatePixmap(disp, root, scr->width, scr->height, depth);
if (opt.image_bg == IMAGE_BG_WHITE)
gcval.foreground = WhitePixel(disp, DefaultScreen(disp));
else
gcval.foreground = BlackPixel(disp, DefaultScreen(disp));
- gcval.foreground = BlackPixel(disp, DefaultScreen(disp));
gc = XCreateGC(disp, root, GCForeground, &gcval);
XFillRectangle(disp, pmap_d1, gc, 0, 0, scr->width, scr->height);
diff --git a/src/winwidget.h b/src/winwidget.h
index 33ad945..be5a761 100644
--- a/src/winwidget.h
+++ b/src/winwidget.h
@@ -113,6 +113,7 @@ struct __winwidget {
int click_offset_y;
int im_click_offset_x;
int im_click_offset_y;
+ time_t click_start_time;
unsigned char has_rotated;
};
diff --git a/test/scr/caption_done b/test/scr/caption_done
index 16a2311..9770be1 100644
--- a/test/scr/caption_done
+++ b/test/scr/caption_done
Binary files differ
diff --git a/test/scr/caption_none b/test/scr/caption_none
index 5903c34..9da5a5a 100644
--- a/test/scr/caption_none
+++ b/test/scr/caption_none
Binary files differ
diff --git a/test/scr/draw_action b/test/scr/draw_action
index 05677df..de41eef 100644
--- a/test/scr/draw_action
+++ b/test/scr/draw_action
Binary files differ
diff --git a/test/scr/draw_action_tinted b/test/scr/draw_action_tinted
index c45ae17..e19954a 100644
--- a/test/scr/draw_action_tinted
+++ b/test/scr/draw_action_tinted
Binary files differ
diff --git a/test/scr/draw_all_multi b/test/scr/draw_all_multi
index 0d0ab06..34f38cd 100644
--- a/test/scr/draw_all_multi
+++ b/test/scr/draw_all_multi
Binary files differ
diff --git a/test/scr/draw_all_one b/test/scr/draw_all_one
index 27419df..b7e6604 100644
--- a/test/scr/draw_all_one
+++ b/test/scr/draw_all_one
Binary files differ
diff --git a/test/scr/draw_filename b/test/scr/draw_filename
index 91d3c5d..2ade91d 100644
--- a/test/scr/draw_filename
+++ b/test/scr/draw_filename
Binary files differ
diff --git a/test/scr/draw_filename_action b/test/scr/draw_filename_action
index 615cd8e..5a31768 100644
--- a/test/scr/draw_filename_action
+++ b/test/scr/draw_filename_action
Binary files differ
diff --git a/test/scr/draw_filename_action_tinted b/test/scr/draw_filename_action_tinted
index 729a071..476fe71 100644
--- a/test/scr/draw_filename_action_tinted
+++ b/test/scr/draw_filename_action_tinted
Binary files differ
diff --git a/test/scr/draw_filename_tinted b/test/scr/draw_filename_tinted
index bd188ab..d73bf6f 100644
--- a/test/scr/draw_filename_tinted
+++ b/test/scr/draw_filename_tinted
Binary files differ
diff --git a/test/scr/draw_info b/test/scr/draw_info
index cf198da..371ed84 100644
--- a/test/scr/draw_info
+++ b/test/scr/draw_info
Binary files differ
diff --git a/test/scr/draw_info_tinted b/test/scr/draw_info_tinted
index 55e3a59..761122f 100644
--- a/test/scr/draw_info_tinted
+++ b/test/scr/draw_info_tinted
Binary files differ
diff --git a/test/scr/draw_nothing b/test/scr/draw_nothing
index 5903c34..9da5a5a 100644
--- a/test/scr/draw_nothing
+++ b/test/scr/draw_nothing
Binary files differ
diff --git a/test/scr/feh_full_lwi b/test/scr/feh_full_lwi
index e46cb05..dc551d9 100644
--- a/test/scr/feh_full_lwi
+++ b/test/scr/feh_full_lwi
Binary files differ
diff --git a/test/scr/feh_lhi b/test/scr/feh_lhi
index f16d150..081c2d8 100644
--- a/test/scr/feh_lhi
+++ b/test/scr/feh_lhi
Binary files differ
diff --git a/test/scr/feh_lhi_i b/test/scr/feh_lhi_i
index 108dfb6..6db5ea6 100644
--- a/test/scr/feh_lhi_i
+++ b/test/scr/feh_lhi_i
Binary files differ
diff --git a/test/scr/feh_lhi_ii b/test/scr/feh_lhi_ii
index 1fb695f..1f30f40 100644
--- a/test/scr/feh_lhi_ii
+++ b/test/scr/feh_lhi_ii
Binary files differ
diff --git a/test/scr/feh_lhi_iir b/test/scr/feh_lhi_iir
index 81748a3..26b2d5c 100644
--- a/test/scr/feh_lhi_iir
+++ b/test/scr/feh_lhi_iir
Binary files differ
diff --git a/test/scr/feh_lhi_iirr b/test/scr/feh_lhi_iirr
index 7a8079b..ae4d698 100644
--- a/test/scr/feh_lhi_iirr
+++ b/test/scr/feh_lhi_iirr
Binary files differ
diff --git a/test/scr/feh_lhi_iirri b/test/scr/feh_lhi_iirri
index 31af36f..90c3ed2 100644
--- a/test/scr/feh_lhi_iirri
+++ b/test/scr/feh_lhi_iirri
Binary files differ
diff --git a/test/scr/feh_lhi_iirrio b/test/scr/feh_lhi_iirrio
index 3a5bdec..3885d05 100644
--- a/test/scr/feh_lhi_iirrio
+++ b/test/scr/feh_lhi_iirrio
Binary files differ
diff --git a/test/scr/feh_lhi_o b/test/scr/feh_lhi_o
index 72e79a0..627caeb 100644
--- a/test/scr/feh_lhi_o
+++ b/test/scr/feh_lhi_o
Binary files differ
diff --git a/test/scr/feh_lhi_oo b/test/scr/feh_lhi_oo
index c1806ff..be852ba 100644
--- a/test/scr/feh_lhi_oo
+++ b/test/scr/feh_lhi_oo
Binary files differ
diff --git a/test/scr/feh_lhi_ooo b/test/scr/feh_lhi_ooo
index 1a6fbf1..71eccc7 100644
--- a/test/scr/feh_lhi_ooo
+++ b/test/scr/feh_lhi_ooo
Binary files differ
diff --git a/test/scr/feh_lwi b/test/scr/feh_lwi
index 16855f7..21f4f54 100644
--- a/test/scr/feh_lwi
+++ b/test/scr/feh_lwi
Binary files differ
diff --git a/test/scr/feh_lwi_scroll_r b/test/scr/feh_lwi_scroll_r
index 455a2c2..879ba31 100644
--- a/test/scr/feh_lwi_scroll_r
+++ b/test/scr/feh_lwi_scroll_r
Binary files differ
diff --git a/test/scr/feh_lwi_scroll_rd b/test/scr/feh_lwi_scroll_rd
index 4ed9fec..f0c591d 100644
--- a/test/scr/feh_lwi_scroll_rd
+++ b/test/scr/feh_lwi_scroll_rd
Binary files differ
diff --git a/test/scr/feh_lwi_scroll_rdr b/test/scr/feh_lwi_scroll_rdr
index b33270c..1c147ac 100644
--- a/test/scr/feh_lwi_scroll_rdr
+++ b/test/scr/feh_lwi_scroll_rdr
Binary files differ
diff --git a/test/scr/feh_lwi_scroll_rdru b/test/scr/feh_lwi_scroll_rdru
index c854160..87b50dd 100644
--- a/test/scr/feh_lwi_scroll_rdru
+++ b/test/scr/feh_lwi_scroll_rdru
Binary files differ
diff --git a/test/scr/feh_lwi_scroll_rdrul b/test/scr/feh_lwi_scroll_rdrul
index 455a2c2..879ba31 100644
--- a/test/scr/feh_lwi_scroll_rdrul
+++ b/test/scr/feh_lwi_scroll_rdrul
Binary files differ
diff --git a/test/scr/feh_scaledown_lwi b/test/scr/feh_scaledown_lwi
index a842471..0889d54 100644
--- a/test/scr/feh_scaledown_lwi
+++ b/test/scr/feh_scaledown_lwi
Binary files differ
diff --git a/test/scr/geometry_offset_only b/test/scr/geometry_offset_only
index 1f23f60..77bbae8 100644
--- a/test/scr/geometry_offset_only
+++ b/test/scr/geometry_offset_only
Binary files differ
diff --git a/test/scr/index_full_h400 b/test/scr/index_full_h400
index b351eb7..25cae98 100644
--- a/test/scr/index_full_h400
+++ b/test/scr/index_full_h400
Binary files differ
diff --git a/test/scr/index_full_w400 b/test/scr/index_full_w400
index 6e54f0f..25c09f2 100644
--- a/test/scr/index_full_w400
+++ b/test/scr/index_full_w400
Binary files differ
diff --git a/test/scr/index_h400 b/test/scr/index_h400
index a3048bc..52f5c3b 100644
--- a/test/scr/index_h400
+++ b/test/scr/index_h400
Binary files differ
diff --git a/test/scr/index_w400 b/test/scr/index_w400
index e9c637c..9b5ff6a 100644
--- a/test/scr/index_w400
+++ b/test/scr/index_w400
Binary files differ
diff --git a/test/scr/thumbnail_default b/test/scr/thumbnail_default
index e9c637c..9b5ff6a 100644
--- a/test/scr/thumbnail_default
+++ b/test/scr/thumbnail_default
Binary files differ