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:

Index: lyx_gui.C
===================================================================
--- lyx_gui.C   (revision 14136)
+++ lyx_gui.C   (working copy)
@@ -239,6 +239,10 @@
                if (maximize)
                        view.setWindowState(Qt::WindowMaximized);
        }
+
+
+       // set -geometry values if any
+       qApp->setMainWidget(&view);

        view.show();

Index: QtView.C
===================================================================
--- QtView.C    (revision 14136)
+++ QtView.C    (working copy)
@@ -58,9 +58,8 @@
 QtView::QtView(unsigned int width, unsigned int height)
        : QMainWindow(), LyXView(), commandbuffer_(0)
 {
-       qApp->setMainWidget(this);

-       bufferview_.reset(new BufferView(this, width, height));
+       bufferview_.reset(new BufferView(this, QWidget::width(), 
QWidget::height()));

        menubar_.reset(new QLMenubar(this, menubackend));
        getToolbars().init();



Anyway the maximize/normalize Qt behavior is totally broken under X11.

Peter

Reply via email to