summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/feh.h1
-rw-r--r--src/imlib.c18
-rw-r--r--src/main.c4
-rw-r--r--src/options.c1
4 files changed, 18 insertions, 6 deletions
diff --git a/src/feh.h b/src/feh.h
index ea8657c..5e2826b 100644
--- a/src/feh.h
+++ b/src/feh.h
@@ -106,6 +106,7 @@ void show_usage(void);
void show_version(void);
int feh_main_iteration(int block);
void feh_handle_event(XEvent * ev);
+void init_imlib_fonts(void);
void init_x_and_imlib(void);
#ifdef HAVE_LIBXINERAMA
void init_xinerama(void);
diff --git a/src/imlib.c b/src/imlib.c
index 3d829ce..1b2ae12 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -67,6 +67,19 @@ init_xinerama(void)
#endif /* HAVE_LIBXINERAMA */
void
+init_imlib_fonts(void)
+{
+ D_ENTER(4);
+
+ /* Set up the font stuff */
+ imlib_add_path_to_font_path(".");
+ imlib_add_path_to_font_path(PREFIX "/share/feh/fonts");
+ imlib_add_path_to_font_path("./ttfonts");
+
+ D_RETURN_(4);
+}
+
+void
init_x_and_imlib(void)
{
D_ENTER(4);
@@ -96,11 +109,6 @@ init_x_and_imlib(void)
/* Initialise random numbers */
srand(getpid() * time(NULL) % ((unsigned int) -1));
- /* Set up the font stuff */
- imlib_add_path_to_font_path(".");
- imlib_add_path_to_font_path(PREFIX "/share/feh/fonts");
- imlib_add_path_to_font_path("./ttfonts");
-
D_RETURN_(4);
}
diff --git a/src/main.c b/src/main.c
index 673a00a..74a4144 100644
--- a/src/main.c
+++ b/src/main.c
@@ -44,7 +44,9 @@ main(int argc, char **argv)
init_parse_options(argc, argv);
- if (!opt.list)
+ init_imlib_fonts();
+
+ if (opt.display)
init_x_and_imlib();
feh_event_init();
diff --git a/src/options.c b/src/options.c
index c41645f..cd96613 100644
--- a/src/options.c
+++ b/src/options.c
@@ -460,6 +460,7 @@ feh_parse_option_array(int argc, char **argv)
break;
case 'l':
opt.list = 1;
+ opt.display = 0;
break;
case 'G':
opt.wget_timestamp = 1;