Commit 4abe831a authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

multiwindow mode: reload all images with USR1/USR2 (not perfect yet)

parent 8e962ba2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ git HEAD
    * Show images in current directory when invoked without file arguments
    * Disable antialiasing, either globally (--force-aliasing) or per image
      (press 'A' to toggle, keybinding toggle_aliasing)
    * Use SIGUSR1/SIGUSR2 to reload all images in multiwindow mode

Sat, 12 Mar 2011 22:49:53 +0100  Daniel Friesel <derf@finalrewind.org>

+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "timers.h"
#include "filelist.h"
#include "options.h"
#include "signals.h"

void init_multiwindow_mode(void)
{
@@ -63,5 +64,8 @@ void init_multiwindow_mode(void)
		}
		free(s);
	}

	setup_signal_handlers();

	return;
}
+6 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

#include "feh.h"
#include "winwidget.h"
#include "options.h"

void feh_handle_signal(int);

@@ -60,12 +61,17 @@ void feh_handle_signal(int signo)
{
	winwidget winwid
		= winwidget_get_first_window_of_type(WIN_TYPE_SLIDESHOW);
	int i;

	if (winwid) {
		if (signo == SIGUSR1)
			slideshow_change_image(winwid, SLIDE_NEXT);
		else if (signo == SIGUSR2)
			slideshow_change_image(winwid, SLIDE_PREV);
	} else if (opt.multiwindow) {
		puts("yo");
		for (i = window_num - 1; i >= 0; i--)
			feh_reload_image(windows[i], 0, 0);
	}

	return;