Commit cc2b7422 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Set correct window title when starting feh in paused mode

parent ae46674d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -340,7 +340,7 @@ void feh_event_handle_keypress(XEvent * ev)
	case 'f':
		if ((winwid->type == WIN_TYPE_THUMBNAIL)
				|| (winwid->type == WIN_TYPE_THUMBNAIL_VIEWER))
			weprintf("Filelist saving is not supported in thumbnail mode\n");
			weprintf("Filelist saving is not supported in thumbnail mode");
		else
			feh_save_filelist();
		break;
+8 −0
Original line number Diff line number Diff line
@@ -146,6 +146,7 @@ void winwidget_create_window(winwidget ret, int w, int h)
	Atom prop = None;
	int x = 0;
	int y = 0;
	char *tmpname;

	D(("winwidget_create_window %dx%d\n", w, h));

@@ -196,6 +197,13 @@ void winwidget_create_window(winwidget ret, int w, int h)
#endif				/* HAVE_LIBXINERAMA */
	}

	if (opt.paused) {
		printf("name %s\n", ret->name);
		tmpname = estrjoin(" ", ret->name, "[Paused]", NULL);
		free(ret->name);
		ret->name = tmpname;
	}

	ret->x = x;
	ret->y = y;
	ret->w = w;
+2 −6
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ use warnings;
use 5.010;

use Cwd;
use Test::More tests => 71;
use Test::More tests => 70;
use Time::HiRes qw/sleep/;
use X11::GUITest qw/:ALL/;

@@ -148,11 +148,7 @@ test_no_win('cycle-once + slideshow-delay -> window closed');
$win = feh_start('--cycle-once --slideshow-delay -0.01',
	'test/ok.png test/ok.jpg test/ok.gif');

TODO: {
	local $TODO = '"Paused" with negative delay broken for first window';
test_win_title($win, 'feh [1 of 3] - test/ok.png [Paused]');
}
test_win_title($win, 'feh [1 of 3] - test/ok.png');

SendKeys('h');
test_no_win('cycle-once + negative delay + [h]');