Enrico Forestieri wrote:
> On Sat, Jun 17, 2006 at 11:50:11AM +0200, Peter Kümmel wrote:
>
>> Enrico Forestieri wrote:
>>> On Fri, Jun 16, 2006 at 12:31:55PM +0200, Peter Kümmel wrote:
>>>
>>>> Ok, now setMainWidget is the last call which could change the geometry.
>>>> I could not test Qt3 lyx.
>>> I am sorry, but with this patch applied LyX segfaults when starting:
>> This is the only idea I have:
>
> Nope, LyX still crashes at startup :(
>
Until I could check it with Qt3 by myself we should use
the original code, so I've reverted the Qt3 code to 14087.
Peter
$ svn diff -r14087 qt3/QtView.C qt3/QtView.h qt3/lyx_gui.C
Index: qt3/QtView.C
===================================================================
--- qt3/QtView.C (revision 14087)
+++ qt3/QtView.C (working copy)
@@ -160,12 +160,14 @@
void QtView::closeEvent(QCloseEvent *)
{
+ Session & session = LyX::ref().session();
+ session.saveSessionInfo("WindowIsMaximized", (isMaximized() ? "yes" :
"no"));
// save windows size and position
- LyX::ref().session().saveSessionInfo("WindowWidth",
convert<string>(width()));
- LyX::ref().session().saveSessionInfo("WindowHeight",
convert<string>(height()));
+ session.saveSessionInfo("WindowWidth", convert<string>(width()));
+ session.saveSessionInfo("WindowHeight", convert<string>(height()));
if (lyxrc.geometry_xysaved) {
- LyX::ref().session().saveSessionInfo("WindowPosX",
convert<string>(x()));
- LyX::ref().session().saveSessionInfo("WindowPosY",
convert<string>(y()));
+ session.saveSessionInfo("WindowPosX", convert<string>(x()));
+ session.saveSessionInfo("WindowPosY", convert<string>(y()));
}
// trigger LFUN_LYX_QUIT instead of quit directly
// since LFUN_LYX_QUIT may have more cleanup stuff
Index: qt3/lyx_gui.C
===================================================================
--- qt3/lyx_gui.C (revision 14087)
+++ qt3/lyx_gui.C (working copy)
@@ -222,7 +222,7 @@
void start(string const & batch, vector<string> const & files,
- unsigned int width, unsigned int height, int posx, int posy)
+ unsigned int width, unsigned int height, int posx, int posy, bool)
{
// this can't be done before because it needs the Languages object
initEncodings();