Abdelrazak Younes <[EMAIL PROTECTED]> writes: >> Or maybe createApplication? We have basically to replicate the pruning >> code in easyParse, right? > > Yes, good idea.
It would be this patch (again not tested). I'd appreciate if people using windows and mac os could test these two patches. JMarc
svndiff src/frontends/qt4/GuiApplication.cpp src/LyX.cpp Index: src/frontends/qt4/GuiApplication.cpp =================================================================== --- src/frontends/qt4/GuiApplication.cpp (revision 26808) +++ src/frontends/qt4/GuiApplication.cpp (working copy) @@ -131,6 +131,19 @@ namespace lyx { frontend::Application * createApplication(int & argc, char * argv[]) { +#ifndef Q_WS_X11 + // prune -geometry argument(s) by shifting + // the following ones 2 places down. + for (int i = 0 ; i < argc ; ++i) { + if (argv[i] == "-geometry") { + int const remove = (i+1) < argc ? 2 : 1; + argc -= remove; + for (int j = i; j < argc; ++j) + argv[j] = argv[j + remove]; + --i; + } + } +#endif return new frontend::GuiApplication(argc, argv); } Index: src/LyX.cpp =================================================================== --- src/LyX.cpp (revision 26808) +++ src/LyX.cpp (working copy) @@ -1057,13 +1057,6 @@ int parse_import(string const & type, st int parse_geometry(string const & arg1, string const &, string &) { geometryArg = arg1; -#if defined(_WIN32) || (defined(__CYGWIN__) && defined(X_DISPLAY_MISSING)) - // remove also the arg - return 1; -#else - // don't remove "-geometry" - return -1; -#endif }