Jean-Marc Lasgouttes wrote:
> I am a big fan of vertical maximizing of windows. When I do that with
> 1.5, next time I run LyX I find it is fully maximized. I remember that
> I read it is a qt limitation.
>
> However, if I re-run LyX a second time, it will appear as a very small
> window, which does not make sense at all.
>
> For info, I read something like the following after a vertical resizing
>
> [session info]
> IconSizeXY = 20
> WindowHeight = 746
> WindowIsMaximized = yes
> WindowPosX = 754
> WindowPosY = 0
> WindowWidth = 816
Why is WindowIsMaximized==yes? Do you use a special function to vertically
maximize or do you just resize it by hand. Could it be that the window
manager wrongly reports the window is maximized?
>
> (The size that appears is the size before resizing. I would be happy
> to get that instead of fullscreen)
>
> After Re-running LyX (appears as fully maximized)
>
> [session info]
> IconSizeXY = 20
> WindowHeight = 0
> WindowIsMaximized = yes
> WindowPosX = 0
> WindowPosY = 0
> WindowWidth = 0
Seems you've found a bug:
void GuiView::updateFloatingGeometry()
{
if (!isMaximized())
floatingGeometry_ = QRect(x(), y(), width(), height());
}
When a maximized window is restored, floatingGeometry_ will not be
initialized, and without a resize this floatingGeometry_ will be
written to disk, therefore the four 0.
When attached patch helps please check in.
>
> After Re-running again (appears as tiny window)
>
> [session info]
> IconSizeXY = 20
> WindowHeight = 298
> WindowIsMaximized = no
> WindowPosX = 754
> WindowPosY = 0
> WindowWidth = 292
You've resized the window before saving.
>
> Why does this happen at all?
>
> JMarc
>
--
Peter Kümmel
Index: src/frontends/qt4/GuiView.C
===================================================================
--- src/frontends/qt4/GuiView.C (revision 17201)
+++ src/frontends/qt4/GuiView.C (working copy)
@@ -348,7 +348,11 @@
}
if (maximize)
+ {
+ // don't save uninitialized floatingGeometry_ on exit.
+ floatingGeometry_ = QRect(posx, posy, width, height);
setWindowState(Qt::WindowMaximized);
+ }
}
else
{