Angus Leeming wrote: > Peter_Kümmel wrote: >> I prefer to handle all the geometry stuff >> in start so please try the attached patch > > Just move > qApp->setMainWidget(&view); > out of the if-block... (No need for the "else" then.) > > Angus > > Index: qt3/lyx_gui.C > =================================================================== > --- qt3/lyx_gui.C (revision 14122) > +++ qt3/lyx_gui.C (working copy) > @@ -235,9 +235,12 @@ > view.init(); > > if (posx != -1 && posy != -1) { > + qApp->setMainWidget(&view); > view.setGeometry(posx, posy, width, height); > if (maximize) > view.setWindowState(Qt::WindowMaximized); > + } else { > + qApp->setMainWidget(&view); > } > > view.show();
You are right, I was so busy reproducing the original code flow.
Index: qt3/lyx_gui.C =================================================================== --- qt3/lyx_gui.C (revision 14122) +++ qt3/lyx_gui.C (working copy) @@ -234,6 +234,10 @@ view.init(); + // apply -geometry values + qApp->setMainWidget(&view); + + // don't overwrite the -geometry values if (posx != -1 && posy != -1) { view.setGeometry(posx, posy, width, height); if (maximize) Index: qt3/QtView.C =================================================================== --- qt3/QtView.C (revision 14120) +++ qt3/QtView.C (working copy) @@ -58,8 +58,6 @@ QtView::QtView(unsigned int width, unsigned int height) : QMainWindow(), LyXView(), commandbuffer_(0) { - qApp->setMainWidget(this); - bufferview_.reset(new BufferView(this, width, height)); menubar_.reset(new QLMenubar(this, menubackend));