diff options
author | ulteq <ulteq@web.de> | 2018-03-09 16:21:06 +0100 |
---|---|---|
committer | ulteq <ulteq@web.de> | 2018-03-10 21:30:54 +0100 |
commit | acada1a7153a43f4fd18cfb15ac7b0278e0d4727 (patch) | |
tree | 8b29e2e4ff66869b4544ef8da942e75836be9ca5 | |
parent | 9779f11f4801628b38d17fa78d638f6a75d6257d (diff) |
Allow empty string as --geometry argument
Passing an empty string to the --geometry option will enable fixed geometry mode without having to specify anything else
-rw-r--r-- | src/options.c | 1 | ||||
-rw-r--r-- | src/options.h | 1 | ||||
-rw-r--r-- | src/winwidget.c | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c index bc95604..1e75c6b 100644 --- a/src/options.c +++ b/src/options.c @@ -592,6 +592,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) opt.filelistfile = estrdup(optarg); break; case 'g': + opt.geom_enabled = 1; opt.geom_flags = XParseGeometry(optarg, &opt.geom_x, &opt.geom_y, &opt.geom_w, &opt.geom_h); break; diff --git a/src/options.h b/src/options.h index ed8641a..6ad8a44 100644 --- a/src/options.h +++ b/src/options.h @@ -106,6 +106,7 @@ struct __fehoptions { int sort; int version_sort; int debug; + int geom_enabled; int geom_flags; int geom_x; int geom_y; diff --git a/src/winwidget.c b/src/winwidget.c index a8bcc0a..1ce7e61 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -323,7 +323,7 @@ void winwidget_create_window(winwidget ret, int w, int h) winwidget_register(ret); /* do not scale down a thumbnail list window, only those created from it */ - if (opt.scale_down && (ret->type != WIN_TYPE_THUMBNAIL)) { + if (opt.geom_enabled && (ret->type != WIN_TYPE_THUMBNAIL)) { opt.geom_w = w; opt.geom_h = h; opt.geom_flags |= WidthValue | HeightValue; |