Skip to content
Snippets Groups Projects
Commit f9b7c24c authored by alecf%netscape.com's avatar alecf%netscape.com
Browse files

persist window size and position

parent a1860b7c
No related branches found
No related tags found
No related merge requests found
......@@ -38,8 +38,8 @@ Rights Reserved.
onload="OnLoadMessenger()"
onunload="OnUnloadMessenger()"
align="vertical"
width="800"
height="600"
width="640"
height="480"
persist="width height x y"
windowtype="mail:3pane">
......
......@@ -111,9 +111,30 @@ function OnUnloadMessenger()
if(mailSession)
mailSession.RemoveFolderListener(folderListener);
}
saveWindowPosition();
messenger.OnUnload();
}
function saveWindowPosition()
{
// Get the current window position/size.
var x = window.screenX;
var y = window.screenY;
var h = window.outerHeight;
var w = window.outerWidth;
// Store these into the window attributes (for persistence).
var win = document.getElementById( "messengerWindow" );
win.setAttribute( "x", x );
win.setAttribute( "y", y );
win.setAttribute( "height", h );
win.setAttribute( "width", w );
// save x, y, width, height
}
function verifyAccounts() {
try {
var mail = Components.classes[mailSessionProgID].getService(Components.interfaces.nsIMsgMailSession);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment