Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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;
}
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment