Commit 98b0add5 authored by Dennis Real's avatar Dennis Real
Browse files

Merge branch 'master' of git://github.com/derf/feh

parents 39f3eab4 da09e217
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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>

+13 −7
Original line number Diff line number Diff line
@@ -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
+12 −2
Original line number Diff line number Diff line
@@ -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,9 +500,15 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
		winwid = winwidget_get_from_window(ev->xmotion.window);
		if (winwid) {
			if (opt.mode == MODE_NEXT) {
				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;
			orig_y = winwid->im_y;
+8 −0
Original line number Diff line number Diff line
@@ -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);
+3 −6
Original line number Diff line number Diff line
@@ -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);

Loading