From d4edaa77fc3ef4833580ae6eca98712150e5507f Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Tue, 21 Dec 1999 13:20:32 +0000 Subject: [PATCH] Tue Dec 21 13:19:06 PST 1999 Michael Jennings Fixed the geometry handling again. Also fixed the parsing of geometry strings like '-0+0'. SVN revision: 1724 --- ChangeLog | 6 ++++++ src/options.c | 4 ++-- src/windows.c | 12 ++---------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec66a4b..1607036 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2940,3 +2940,9 @@ Mon Dec 20 19:38:40 PST 1999 Michael Jennings I'll make it the default in the themes. ------------------------------------------------------------------------------- +Tue Dec 21 13:19:06 PST 1999 Michael Jennings + + Fixed the geometry handling again. Also fixed the parsing of geometry + strings like '-0+0'. + +------------------------------------------------------------------------------- diff --git a/src/options.c b/src/options.c index e6000a5..1d0d625 100644 --- a/src/options.c +++ b/src/options.c @@ -943,7 +943,7 @@ get_options(int argc, char *argv[]) hasequal = 1; } else { if (argv[i + 1]) { - if (*argv[i + 1] != '-' || StrCaseStr(optList[j].long_opt, "font")) { + if (*argv[i + 1] != '-' || StrCaseStr(optList[j].long_opt, "font") || StrCaseStr(optList[j].long_opt, "geometry")) { val_ptr = argv[++i]; } } @@ -1060,7 +1060,7 @@ get_options(int argc, char *argv[]) if (j == 0 || j == 1) { continue; } - if ((val_ptr == NULL) || ((*val_ptr == '-') && (optList[j].short_opt != 'F'))) { + if ((val_ptr == NULL) || ((*val_ptr == '-') && (optList[j].short_opt != 'F') && (optList[j].short_opt != 'g'))) { print_error("option -%c requires a%s value", opt[pos], (optList[j].flag & OPT_INTEGER ? "n integer" : " string")); CHECK_BAD(); diff --git a/src/windows.c b/src/windows.c index b884164..c7e20c9 100644 --- a/src/windows.c +++ b/src/windows.c @@ -338,11 +338,7 @@ Create_Windows(int argc, char *argv[]) if (flags & XValue) { if (flags & XNegative) { - if (check_for_enlightenment()) { - x += (DisplayWidth(Xdisplay, Xscreen)); - } else { - x += (DisplayWidth(Xdisplay, Xscreen) - (szHint.width + TermWin.internalBorder)); - } + x += (DisplayWidth(Xdisplay, Xscreen) - (szHint.width + TermWin.internalBorder)); szHint.win_gravity = NorthEastGravity; } szHint.x = x; @@ -350,11 +346,7 @@ Create_Windows(int argc, char *argv[]) } if (flags & YValue) { if (flags & YNegative) { - if (check_for_enlightenment()) { - y += (DisplayHeight(Xdisplay, Xscreen) - (2 * TermWin.internalBorder)); - } else { - y += (DisplayHeight(Xdisplay, Xscreen) - (szHint.height + TermWin.internalBorder)); - } + y += (DisplayHeight(Xdisplay, Xscreen) - (szHint.height + TermWin.internalBorder)); szHint.win_gravity = (szHint.win_gravity == NorthEastGravity ? SouthEastGravity : SouthWestGravity); }