From fb53f24b4f0e4e6da4cefd9d72aa54a5fb0135ee Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 4 Dec 2012 06:26:55 +0100 Subject: --bg-max: Respect --image-bg setting --- ChangeLog | 1 + 1 file changed, 1 insertion(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 9645aaf..0d59278 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ git HEAD * Do not apply --scale-down to the thumbnail window. It will be applied to windows opened from this, though. * Patch by Rob Cornish: Respect --image-bg when setting a wallpaper + * Fix --bg-max not respecting --image-bg setting (thanks, 12qu) Tue, 16 Oct 2012 06:29:58 +0200 Daniel Friesel -- cgit v1.2.3 From f40b636b137b7d779c12f8bebd3203c747307b12 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 6 Dec 2012 13:05:47 +0100 Subject: update ChangeLog --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 0d59278..63c51d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,8 @@ git HEAD * Do not apply --scale-down to the thumbnail window. It will be applied to windows opened from this, though. * Patch by Rob Cornish: Respect --image-bg when setting a wallpaper - * Fix --bg-max not respecting --image-bg setting (thanks, 12qu) + (bg-center and bg-max) + * Add %V (feh process ID) format specifier Tue, 16 Oct 2012 06:29:58 +0200 Daniel Friesel -- cgit v1.2.3 From a2280a5e8fbe4d53ce30ac3074c5e15b58e20151 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 6 Dec 2012 17:45:59 +0100 Subject: changelog. again. --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 63c51d9..524fdd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,9 +2,14 @@ git HEAD * Do not apply --scale-down to the thumbnail window. It will be applied to windows opened from this, though. + * Patch by Rob Cornish: Respect --image-bg when setting a wallpaper (bg-center and bg-max) + * Add %V (feh process ID) format specifier + + * Fix delete not working on last image with --cycle-once + Tue, 16 Oct 2012 06:29:58 +0200 Daniel Friesel -- cgit v1.2.3 From 3db2920802b6ab4d3a652124339baee007529431 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 19 Dec 2012 08:26:42 +0100 Subject: treat quick, low-offset drags as clicks (closes #113) --- ChangeLog | 3 +++ man/feh.pre | 14 +++++++++----- src/events.c | 14 ++++++++++++-- src/winwidget.h | 1 + 4 files changed, 25 insertions(+), 7 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 524fdd1..c2075b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,9 @@ git HEAD * Fix delete not working on last image with --cycle-once + * Treat quick, low-offset drags (1px or 2px move in <1 second) as clicks + to improve graphics tablet support + Tue, 16 Oct 2012 06:29:58 +0200 Daniel Friesel diff --git a/man/feh.pre b/man/feh.pre index 81a5cd6..8d41581 100644 --- a/man/feh.pre +++ b/man/feh.pre @@ -1363,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 grahics 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/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; }; -- cgit v1.2.3