From 2deec8a96adf4bc975f6f2ccead4c9667f8c28b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Mon, 26 Jun 2006 18:07:10 +0000 Subject: [PATCH] Pass width = 0 and height = 0 as unsigned int to indicate the usage of the geometry option * lyx_main.C set width and height to 0 * frontends/qt3/lyx_gui.C test on 0 * frontends/qt4/lyx_gui.C test on 0 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14235 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt3/lyx_gui.C | 2 +- src/frontends/qt4/lyx_gui.C | 2 +- src/lyx_main.C | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt3/lyx_gui.C b/src/frontends/qt3/lyx_gui.C index b0930f3da1..83ff15f0ea 100644 --- a/src/frontends/qt3/lyx_gui.C +++ b/src/frontends/qt3/lyx_gui.C @@ -247,7 +247,7 @@ void start(string const & batch, vector const & files, view.init(); - if (width != -1 && height != -1) { + if (width != 0 && height != 0) { view.initFloatingGeometry(QRect(posx, posy, width, height)); view.resize(width, height); if (posx != -1 && posy != -1) diff --git a/src/frontends/qt4/lyx_gui.C b/src/frontends/qt4/lyx_gui.C index 9c74df9a56..1769554950 100644 --- a/src/frontends/qt4/lyx_gui.C +++ b/src/frontends/qt4/lyx_gui.C @@ -211,7 +211,7 @@ void start(string const & batch, vector const & files, view.init(); // only true when the -geometry option was NOT used - if (width != -1 && height != -1) { + if (width != 0 && height != 0) { if (posx != -1 && posy != -1) { #ifdef Q_OS_WIN32 // FIXME: use only setGeoemtry when Trolltech has diff --git a/src/lyx_main.C b/src/lyx_main.C index cd9d079844..ab48c7aa67 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -337,8 +337,8 @@ void LyX::exec2(int & argc, char * argv[]) } if (geometryOption_) { - width = -1; - height = -1; + width = 0; + height = 0; } lyx_gui::start(batch_command, files, width, height, posx, posy, maximize); -- 2.39.2