diff options
author | Bert <ber.t@gmx.com> | 2011-01-27 16:15:43 +0100 |
---|---|---|
committer | Bert <ber.t@gmx.com> | 2011-01-27 16:15:43 +0100 |
commit | 17e2a795bbcdbf9bc8eb07e2aaca0a494871b9e8 (patch) | |
tree | 7550f6d978ece256b2faa5d10bc300fa0d5eef97 /window.c | |
parent | e8a503bcbb5e29e8364095796d1417db4c138e64 (diff) |
Added -w cmdline option
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -23,6 +23,7 @@ #include <X11/Xutil.h> #include "sxiv.h" +#include "options.h" #include "window.h" GC bgc; @@ -53,12 +54,8 @@ void win_open(win_t *win) { win->bgcol = bgcol.pixel; win->pm = 0; - win->w = WIN_WIDTH; - win->h = WIN_HEIGHT; - if (win->w > e->scrw) - win->w = e->scrw; - if (win->h > e->scrh) - win->h = e->scrh; + win->w = MIN(options->winw, e->scrw); + win->h = MIN(options->winh, e->scrh); win->x = (e->scrw - win->w) / 2; win->y = (e->scrh - win->h) / 2; |