diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | man/feh.pre | 20 | ||||
-rw-r--r-- | src/events.c | 14 | ||||
-rw-r--r-- | src/slideshow.c | 8 | ||||
-rw-r--r-- | src/wallpaper.c | 9 | ||||
-rw-r--r-- | src/winwidget.h | 1 | ||||
-rw-r--r-- | test/scr/caption_done | bin | 6514 -> 6262 bytes | |||
-rw-r--r-- | test/scr/caption_none | bin | 6525 -> 4285 bytes | |||
-rw-r--r-- | test/scr/draw_action | bin | 5551 -> 5328 bytes | |||
-rw-r--r-- | test/scr/draw_action_tinted | bin | 5884 -> 5628 bytes | |||
-rw-r--r-- | test/scr/draw_all_multi | bin | 7125 -> 6856 bytes | |||
-rw-r--r-- | test/scr/draw_all_one | bin | 6924 -> 6658 bytes | |||
-rw-r--r-- | test/scr/draw_filename | bin | 5233 -> 5022 bytes | |||
-rw-r--r-- | test/scr/draw_filename_action | bin | 6098 -> 5855 bytes | |||
-rw-r--r-- | test/scr/draw_filename_action_tinted | bin | 6547 -> 6277 bytes | |||
-rw-r--r-- | test/scr/draw_filename_tinted | bin | 5429 -> 5200 bytes | |||
-rw-r--r-- | test/scr/draw_info | bin | 5511 -> 5293 bytes | |||
-rw-r--r-- | test/scr/draw_info_tinted | bin | 5769 -> 5522 bytes | |||
-rw-r--r-- | test/scr/draw_nothing | bin | 6525 -> 4285 bytes | |||
-rw-r--r-- | test/scr/feh_full_lwi | bin | 17898 -> 10533 bytes | |||
-rw-r--r-- | test/scr/feh_lhi | bin | 13552 -> 10558 bytes | |||
-rw-r--r-- | test/scr/feh_lhi_i | bin | 34338 -> 23044 bytes | |||
-rw-r--r-- | test/scr/feh_lhi_ii | bin | 71938 -> 47242 bytes | |||
-rw-r--r-- | test/scr/feh_lhi_iir | bin | 15431 -> 12460 bytes | |||
-rw-r--r-- | test/scr/feh_lhi_iirr | bin | 15400 -> 12463 bytes | |||
-rw-r--r-- | test/scr/feh_lhi_iirri | bin | 63970 -> 40868 bytes | |||
-rw-r--r-- | test/scr/feh_lhi_iirrio | bin | 72012 -> 47314 bytes | |||
-rw-r--r-- | test/scr/feh_lhi_o | bin | 20132 -> 14486 bytes | |||
-rw-r--r-- | test/scr/feh_lhi_oo | bin | 32053 -> 21068 bytes | |||
-rw-r--r-- | test/scr/feh_lhi_ooo | bin | 136692 -> 93091 bytes | |||
-rw-r--r-- | test/scr/feh_lwi | bin | 19070 -> 15111 bytes | |||
-rw-r--r-- | test/scr/feh_lwi_scroll_r | bin | 19066 -> 15040 bytes | |||
-rw-r--r-- | test/scr/feh_lwi_scroll_rd | bin | 19075 -> 15063 bytes | |||
-rw-r--r-- | test/scr/feh_lwi_scroll_rdr | bin | 19188 -> 15162 bytes | |||
-rw-r--r-- | test/scr/feh_lwi_scroll_rdru | bin | 19143 -> 15106 bytes | |||
-rw-r--r-- | test/scr/feh_lwi_scroll_rdrul | bin | 19066 -> 15040 bytes | |||
-rw-r--r-- | test/scr/feh_scaledown_lwi | bin | 19203 -> 10692 bytes | |||
-rw-r--r-- | test/scr/geometry_offset_only | bin | 570 -> 629 bytes | |||
-rw-r--r-- | test/scr/index_full_h400 | bin | 3180 -> 2853 bytes | |||
-rw-r--r-- | test/scr/index_full_w400 | bin | 2135 -> 1944 bytes | |||
-rw-r--r-- | test/scr/index_h400 | bin | 1694 -> 1402 bytes | |||
-rw-r--r-- | test/scr/index_w400 | bin | 1159 -> 1047 bytes | |||
-rw-r--r-- | test/scr/thumbnail_default | bin | 1159 -> 1047 bytes |
43 files changed, 47 insertions, 15 deletions
@@ -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 Binary files differindex 16a2311..9770be1 100644 --- a/test/scr/caption_done +++ b/test/scr/caption_done diff --git a/test/scr/caption_none b/test/scr/caption_none Binary files differindex 5903c34..9da5a5a 100644 --- a/test/scr/caption_none +++ b/test/scr/caption_none diff --git a/test/scr/draw_action b/test/scr/draw_action Binary files differindex 05677df..de41eef 100644 --- a/test/scr/draw_action +++ b/test/scr/draw_action diff --git a/test/scr/draw_action_tinted b/test/scr/draw_action_tinted Binary files differindex c45ae17..e19954a 100644 --- a/test/scr/draw_action_tinted +++ b/test/scr/draw_action_tinted diff --git a/test/scr/draw_all_multi b/test/scr/draw_all_multi Binary files differindex 0d0ab06..34f38cd 100644 --- a/test/scr/draw_all_multi +++ b/test/scr/draw_all_multi diff --git a/test/scr/draw_all_one b/test/scr/draw_all_one Binary files differindex 27419df..b7e6604 100644 --- a/test/scr/draw_all_one +++ b/test/scr/draw_all_one diff --git a/test/scr/draw_filename b/test/scr/draw_filename Binary files differindex 91d3c5d..2ade91d 100644 --- a/test/scr/draw_filename +++ b/test/scr/draw_filename diff --git a/test/scr/draw_filename_action b/test/scr/draw_filename_action Binary files differindex 615cd8e..5a31768 100644 --- a/test/scr/draw_filename_action +++ b/test/scr/draw_filename_action diff --git a/test/scr/draw_filename_action_tinted b/test/scr/draw_filename_action_tinted Binary files differindex 729a071..476fe71 100644 --- a/test/scr/draw_filename_action_tinted +++ b/test/scr/draw_filename_action_tinted diff --git a/test/scr/draw_filename_tinted b/test/scr/draw_filename_tinted Binary files differindex bd188ab..d73bf6f 100644 --- a/test/scr/draw_filename_tinted +++ b/test/scr/draw_filename_tinted diff --git a/test/scr/draw_info b/test/scr/draw_info Binary files differindex cf198da..371ed84 100644 --- a/test/scr/draw_info +++ b/test/scr/draw_info diff --git a/test/scr/draw_info_tinted b/test/scr/draw_info_tinted Binary files differindex 55e3a59..761122f 100644 --- a/test/scr/draw_info_tinted +++ b/test/scr/draw_info_tinted diff --git a/test/scr/draw_nothing b/test/scr/draw_nothing Binary files differindex 5903c34..9da5a5a 100644 --- a/test/scr/draw_nothing +++ b/test/scr/draw_nothing diff --git a/test/scr/feh_full_lwi b/test/scr/feh_full_lwi Binary files differindex e46cb05..dc551d9 100644 --- a/test/scr/feh_full_lwi +++ b/test/scr/feh_full_lwi diff --git a/test/scr/feh_lhi b/test/scr/feh_lhi Binary files differindex f16d150..081c2d8 100644 --- a/test/scr/feh_lhi +++ b/test/scr/feh_lhi diff --git a/test/scr/feh_lhi_i b/test/scr/feh_lhi_i Binary files differindex 108dfb6..6db5ea6 100644 --- a/test/scr/feh_lhi_i +++ b/test/scr/feh_lhi_i diff --git a/test/scr/feh_lhi_ii b/test/scr/feh_lhi_ii Binary files differindex 1fb695f..1f30f40 100644 --- a/test/scr/feh_lhi_ii +++ b/test/scr/feh_lhi_ii diff --git a/test/scr/feh_lhi_iir b/test/scr/feh_lhi_iir Binary files differindex 81748a3..26b2d5c 100644 --- a/test/scr/feh_lhi_iir +++ b/test/scr/feh_lhi_iir diff --git a/test/scr/feh_lhi_iirr b/test/scr/feh_lhi_iirr Binary files differindex 7a8079b..ae4d698 100644 --- a/test/scr/feh_lhi_iirr +++ b/test/scr/feh_lhi_iirr diff --git a/test/scr/feh_lhi_iirri b/test/scr/feh_lhi_iirri Binary files differindex 31af36f..90c3ed2 100644 --- a/test/scr/feh_lhi_iirri +++ b/test/scr/feh_lhi_iirri diff --git a/test/scr/feh_lhi_iirrio b/test/scr/feh_lhi_iirrio Binary files differindex 3a5bdec..3885d05 100644 --- a/test/scr/feh_lhi_iirrio +++ b/test/scr/feh_lhi_iirrio diff --git a/test/scr/feh_lhi_o b/test/scr/feh_lhi_o Binary files differindex 72e79a0..627caeb 100644 --- a/test/scr/feh_lhi_o +++ b/test/scr/feh_lhi_o diff --git a/test/scr/feh_lhi_oo b/test/scr/feh_lhi_oo Binary files differindex c1806ff..be852ba 100644 --- a/test/scr/feh_lhi_oo +++ b/test/scr/feh_lhi_oo diff --git a/test/scr/feh_lhi_ooo b/test/scr/feh_lhi_ooo Binary files differindex 1a6fbf1..71eccc7 100644 --- a/test/scr/feh_lhi_ooo +++ b/test/scr/feh_lhi_ooo diff --git a/test/scr/feh_lwi b/test/scr/feh_lwi Binary files differindex 16855f7..21f4f54 100644 --- a/test/scr/feh_lwi +++ b/test/scr/feh_lwi diff --git a/test/scr/feh_lwi_scroll_r b/test/scr/feh_lwi_scroll_r Binary files differindex 455a2c2..879ba31 100644 --- a/test/scr/feh_lwi_scroll_r +++ b/test/scr/feh_lwi_scroll_r diff --git a/test/scr/feh_lwi_scroll_rd b/test/scr/feh_lwi_scroll_rd Binary files differindex 4ed9fec..f0c591d 100644 --- a/test/scr/feh_lwi_scroll_rd +++ b/test/scr/feh_lwi_scroll_rd diff --git a/test/scr/feh_lwi_scroll_rdr b/test/scr/feh_lwi_scroll_rdr Binary files differindex b33270c..1c147ac 100644 --- a/test/scr/feh_lwi_scroll_rdr +++ b/test/scr/feh_lwi_scroll_rdr diff --git a/test/scr/feh_lwi_scroll_rdru b/test/scr/feh_lwi_scroll_rdru Binary files differindex c854160..87b50dd 100644 --- a/test/scr/feh_lwi_scroll_rdru +++ b/test/scr/feh_lwi_scroll_rdru diff --git a/test/scr/feh_lwi_scroll_rdrul b/test/scr/feh_lwi_scroll_rdrul Binary files differindex 455a2c2..879ba31 100644 --- a/test/scr/feh_lwi_scroll_rdrul +++ b/test/scr/feh_lwi_scroll_rdrul diff --git a/test/scr/feh_scaledown_lwi b/test/scr/feh_scaledown_lwi Binary files differindex a842471..0889d54 100644 --- a/test/scr/feh_scaledown_lwi +++ b/test/scr/feh_scaledown_lwi diff --git a/test/scr/geometry_offset_only b/test/scr/geometry_offset_only Binary files differindex 1f23f60..77bbae8 100644 --- a/test/scr/geometry_offset_only +++ b/test/scr/geometry_offset_only diff --git a/test/scr/index_full_h400 b/test/scr/index_full_h400 Binary files differindex b351eb7..25cae98 100644 --- a/test/scr/index_full_h400 +++ b/test/scr/index_full_h400 diff --git a/test/scr/index_full_w400 b/test/scr/index_full_w400 Binary files differindex 6e54f0f..25c09f2 100644 --- a/test/scr/index_full_w400 +++ b/test/scr/index_full_w400 diff --git a/test/scr/index_h400 b/test/scr/index_h400 Binary files differindex a3048bc..52f5c3b 100644 --- a/test/scr/index_h400 +++ b/test/scr/index_h400 diff --git a/test/scr/index_w400 b/test/scr/index_w400 Binary files differindex e9c637c..9b5ff6a 100644 --- a/test/scr/index_w400 +++ b/test/scr/index_w400 diff --git a/test/scr/thumbnail_default b/test/scr/thumbnail_default Binary files differindex e9c637c..9b5ff6a 100644 --- a/test/scr/thumbnail_default +++ b/test/scr/thumbnail_default |