It's hard to get the lyx window smaller when
lyx previously was saved in maximized mode.

You have first to move the window to be able to
resize it.

This could be fixed by saving 'normalGeometry'
size and position.

Any objections?

Index: src/frontends/qt4/QtView.C
===================================================================
--- src/frontends/qt4/QtView.C  (revision 14083)
+++ src/frontends/qt4/QtView.C  (working copy)
@@ -182,11 +182,11 @@
 void QtView::closeEvent(QCloseEvent *)
 {
        // save windows size and position
-       LyX::ref().session().saveSessionInfo("WindowWidth", 
convert<string>(width()));
-       LyX::ref().session().saveSessionInfo("WindowHeight", 
convert<string>(height()));
+       LyX::ref().session().saveSessionInfo("WindowWidth", 
convert<string>(this->normalGeometry().width()));
+       LyX::ref().session().saveSessionInfo("WindowHeight", 
convert<string>(this->normalGeometry().height()));
        if (lyxrc.geometry_xysaved) {
-               LyX::ref().session().saveSessionInfo("WindowPosX", 
convert<string>(x()));
-               LyX::ref().session().saveSessionInfo("WindowPosY", 
convert<string>(y()));
+               LyX::ref().session().saveSessionInfo("WindowPosX", 
convert<string>(this->normalGeometry().x()));
+               LyX::ref().session().saveSessionInfo("WindowPosY", 
convert<string>(this->normalGeometry().y()));
        }
        // trigger LFUN_LYX_QUIT instead of quit directly
        // since LFUN_LYX_QUIT may have more cleanup stuff


Reply via email to