summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-04-12 20:43:26 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-04-12 20:43:26 +0200
commit4abe831aa00eeb2fbbbe5d0b5905e07b047fca71 (patch)
tree1b2823fbca5e9b41e8d0eedfe19179a69f51c375
parent8e962ba255b141109b1241325cf2fc7792d9f499 (diff)
multiwindow mode: reload all images with USR1/USR2 (not perfect yet)
-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;