Hopefully fix the ignored -geometry option under X11.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21645 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-11-16 21:52:04 +00:00
parent e0a62da75a
commit ce46ca8653

View File

@ -71,6 +71,7 @@
#include <QMenu>
#include <QPainter>
#include <QPixmap>
#include <QPoint>
#include <QPushButton>
#include <QSettings>
#include <QShowEvent>
@ -367,12 +368,11 @@ void GuiView::init()
this, SLOT(clearMessage()));
d.setBackground();
}
if (!lyxrc.allow_geometry_session)
setGeometry(50, 50, 690, 510);
void GuiView::showEvent(QShowEvent * e)
{
if (lyxrc.allow_geometry_session) {
// Now take care of session management.
QSettings settings;
QString const key = "view-" + QString::number(id());
#ifdef Q_WS_X11
@ -385,8 +385,14 @@ void GuiView::showEvent(QShowEvent * e)
setGeometry(50, 50, 690, 510);
#endif
setIconSize(settings.value(key + "/icon_size").toSize());
} else
setGeometry(50, 50, 690, 510);
}
void GuiView::showEvent(QShowEvent * e)
{
LYXERR(Debug::GUI, "Passed Geometry "
<< size().height() << "x" << size().width()
<< "+" << pos().x() << "+" << pos().y());
if (d.splitter_->count() == 0)
// No work area, switch to the background widget.