Enrico Forestieri wrote:
On Fri, Nov 16, 2007 at 06:54:23PM +0100, Abdelrazak Younes wrote:
OK, what about maximisation?
Works fine for me. I can full maximize, maximize either vertically
or horizontally and then return to the original size. This is with
sawfish, didn't try other WMs.
Then it seems sawfish is a good pupil :-)
However, -geometry still doesn't work.
I think I know what's going on... stay tuned.
Keeping fingers crossed...
Could you try this patch please and give me the output of -dbg gui?
Thanks in advance,
Abdel.
Index: GuiView.cpp
===================================================================
--- GuiView.cpp (revision 21643)
+++ GuiView.cpp (working copy)
@@ -71,6 +71,7 @@
#include <QMenu>
#include <QPainter>
#include <QPixmap>
+#include <QPoint>
#include <QPushButton>
#include <QSettings>
#include <QShowEvent>
@@ -376,10 +377,18 @@
QSettings settings;
QString const key = "view-" + QString::number(id());
#ifdef Q_WS_X11
- QPoint pos = settings.value(key + "/pos", QPoint(50,
50)).toPoint();
- QSize size = settings.value(key + "/size", QSize(690,
510)).toSize();
- resize(size);
- move(pos);
+ QSize const passed_size = size();
+ QPoint const passed_pos = pos();
+ LYXERR(Debug::GUI, "Passed Geometry "
+ << passed_size.height() << "x" << passed_size.width()
+ << "+" << passed_pos.x() << "+" << passed_pos.y());
+ // Use settings only if -geometry is passed
+ if (passed_size.height() < 100 && passed_size.width() < 100) {
+ QPoint pos = settings.value(key + "/pos", QPoint(50,
50)).toPoint();
+ QSize size = settings.value(key + "/size", QSize(690,
510)).toSize();
+ resize(size);
+ move(pos);
+ }
#else
if (!restoreGeometry(settings.value(key +
"/geometry").toByteArray()))
setGeometry(50, 50, 690, 510);