Peter Kümmel wrote:

> The original lyx/Qt3 logic was:
> 1. create QtView in start
> 2. in the QtView ctor: resize and setMainWidget,
>    thus geometry option is applied if there is any
> 3. back in start check if (posx != -1 && posy != -1)
>    is true if yes move widget
>    (init() does not call any geometry functions)

That logic was wrong, too, since the lyxrc values overrode the geometry
option.

> Is 'if (posx != -1 && posy != -1)' really the right way to
> check if lyx wqas called with the geometry option?

No. It has nothing to do with the geometry option. The geometry option is
handled internally by the frontend libs (qt, xforms and gtk), we never see
it. 'if (posx != -1 && posy != -1)' tests for stored geometry values in
lyxrc.
Please read the documentation of QApplication::setMainWidget(), AFAIK the
only way to not overwrite the geometry option with lyxrc values requires to
set the lyxrc defaults before calling setMainWidget().


Georg

Reply via email to