summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/options.c6
-rw-r--r--src/support.c10
2 files changed, 9 insertions, 7 deletions
diff --git a/src/options.c b/src/options.c
index 70eb9d5..4c832a0 100644
--- a/src/options.c
+++ b/src/options.c
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
static void check_options(void);
static void feh_getopt_theme(int argc, char **argv);
static void feh_parse_option_array(int argc, char **argv, int finalrun);
-static void feh_check_theme_options(int argc, char **argv);
+static void feh_check_theme_options(char **argv);
static void feh_parse_options_from_string(char *opts);
static void feh_load_options_for_theme(char *theme);
static void show_usage(void);
@@ -90,7 +90,7 @@ void init_parse_options(int argc, char **argv)
feh_getopt_theme(argc, argv);
D(("About to check for theme configuration\n"));
- feh_check_theme_options(argc, argv);
+ feh_check_theme_options(argv);
D(("About to parse commandline options\n"));
/* Parse the cmdline args */
@@ -120,7 +120,7 @@ void init_parse_options(int argc, char **argv)
return;
}
-static void feh_check_theme_options(int argc, char **argv)
+static void feh_check_theme_options(char **argv)
{
if (!theme) {
/* This prevents screw up when running src/feh or ./feh */
diff --git a/src/support.c b/src/support.c
index e257271..7c3ab89 100644
--- a/src/support.c
+++ b/src/support.c
@@ -135,15 +135,13 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
unsigned long length, after;
unsigned char *data_root, *data_esetroot;
Pixmap pmap_d1, pmap_d2;
+
/* string for sticking in ~/.fehbg */
char *fehbg = NULL;
char *home;
char filbuf[PATH_MAX];
char fehbg_xinerama[] = "--no-xinerama";
- if (opt.xinerama)
- fehbg_xinerama[0] = '\0';
-
/* local display to set closedownmode on */
Display *disp2;
Window root2;
@@ -152,6 +150,9 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
GC gc;
int in, out, w, h;
+ if (opt.xinerama)
+ fehbg_xinerama[0] = '\0';
+
D(("Falling back to XSetRootWindowPixmap\n"));
/* Put the filename in filbuf between ' and escape ' in the filename */
@@ -269,9 +270,10 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
int render_x = 0;
int render_y = 0;
int border_x = (((img_w * scr_h) > (img_h * scr_w)) ? 0 : 1);
+ XGCValues gcval;
+
w = (border_x ? ((scr_h * img_w) / img_h) : scr_w);
h = (border_x ? scr_h : ((scr_w * img_h) / img_w));
- XGCValues gcval;
if (border_x)
render_x = (scr_w - w) >> 1;