summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-02-08 19:26:43 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2010-02-08 19:26:43 +0100
commit1e03474b483e75147a60d0c3d52332d4f0901aab (patch)
tree9a095e30524f8cbe043378a42eadf004d067bb97 /src
parent63681d6aedac480b61ea71e8a99c3f41b0f60267 (diff)
Make -O work without X as well. Closes bugs.debian.org #373209
Diffstat (limited to 'src')
-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;