Improve mouse support

None of the mouse mappings uses a keyboard modifier, making it possible to
access the most basic features by only using the mouse.

Next/previous image with left button depending on cursor position, middle
button for dragging, right button for switching to thumnail mode and wheel for
zooming.

Users can keep the old behaviour by simply not adapting the changes to the
buttons array in config.def.h to their config.h file.
This commit is contained in:
Bert Münnich
2017-10-05 13:53:29 +02:00
parent ee908ca0a1
commit 8081cbebf3
8 changed files with 52 additions and 34 deletions

View File

@ -33,6 +33,7 @@
void remove_file(int, bool);
void load_image(int);
void open_info(void);
int ptr_third_x(void);
void redraw(void);
void reset_cursor(void);
void animate(void);
@ -281,6 +282,11 @@ bool ci_navigate(arg_t n)
}
}
bool ci_cursor_navigate(arg_t _)
{
return ci_navigate(ptr_third_x() - 1);
}
bool ci_alternate(arg_t _)
{
load_image(alternate);