Bo, the geometry session stuff is now stored in GuiView::saveGeometry().
It is guaranted to be called, either in GuiView::closeEvent() or in
LyX::quit().
This is good.
I reckon adding multiple view support will be simple as you have access
to the window id in GuiView thanks to the LyXView::id() method. As I
don't know how to handle the file format change, I will let you do that
if you don't mind.
But I do not know how to create window with given geometry. (Need to
read the code).
+ // save windows size and position
+ Session & session = LyX::ref().session();
+ session.saveSessionInfo("WindowWidth",
convert<string>(geometry.width()));
+ session.saveSessionInfo("WindowHeight",
convert<string>(geometry.height()));
+ session.saveSessionInfo("WindowIsMaximized", (isMaximized() ? "yes" :
"no"));
+ if (lyxrc.geometry_xysaved) {
+ session.saveSessionInfo("WindowPosX",
convert<string>(geometry.x()));
+ session.saveSessionInfo("WindowPosY",
convert<string>(geometry.y()));
+ }
+}
There is no file format change. All the information is saved/restored
as key=value pair. However, I think the information of window (not
main window) size information should be saved with lastopenedfiles,
which is not at the frontend level, and can not access window size
info. I guess lastopenedfiles need to be relocated.
{ LFUN_WINDOW_NEW, "window-new", NoBuffer },
+<<<<<<< .mine
+ { LFUN_WINDOW_CLOSE, "window-close", NoBuffer },
+=======
{ LFUN_UNICODE_INSERT, "unicode-insert", Noop },
+>>>>>>> .r15509
{ LFUN_NOACTION, "", Noop }
};
unsolved conflict.
Bo