summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/multiwindow.c4
-rw-r--r--src/signals.c6
3 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index da3411f..e832304 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
diff --git a/src/multiwindow.c b/src/multiwindow.c
index c46e453..1bd8a8a 100644
--- a/src/multiwindow.c
+++ b/src/multiwindow.c
@@ -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;
}
diff --git a/src/signals.c b/src/signals.c
index b3e118a..85104a6 100644
--- a/src/signals.c
+++ b/src/signals.c
@@ -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;