Currently (Firefox 4 beta 11) in full-screen mode, opening a new window (by pressing accel+N, detaching a tab, etc.) produces a window that is somewhat in full-screen mode but not quite. The |sizemode="fullscreen"| attribute is set, but the toolbars and titlebar are not completely in fullscreen configuration, and on Windows, the window does not fill the screen. We should fix this, so full-screen mode is correctly initialized for the new window.
I think we actually don't want sizemode="fullscreen" there, it should just be a normal window.
(In reply to comment #1) > I think we actually don't want sizemode="fullscreen" there, it should just be a > normal window. I'd be okay with that too. It's a bit odd to have a fullscreen window not in the foreground, but it'll do.
(would approve a patch, though, most likely!)
So this doesn't appear to be a widget bug, although I'm not sure where to move it. The window that gets created has it's sizemode attribute set to "fullscreen" despite widget having sent a sizemode = normal event shortly after the window is created. Tabs in titlebar code looks to have regressed the problem but it doesn't look like it's the actual cause, it's just looking at the sizemode attribute and applying the right ui. Looks like it might be bug in persisted attributes or session restore. Moving this to DOM for now.
browser.xul sets persist="screenX screenY width height sizemode". This wasn't supposed to persist fullscreen mode. Bug 484488 changed this.
The classes in xpfe know the current sizemode of the window. They persist sizemode but update this accordingly when they detect the window isn't in full screen. DOM's global window and global chrome window are also in sync via the code in xpfe. The problem here is that the document (main-window) also persists the size mode, and this is completely out of sync with the real state of the window that contains it. There are plenty of little hacks we could add in browser.js to get these synced up, but I think the real fix here is to make sure the window syncs the size mode state of the root document during state changes.
nsXULWindow attempts to persist the state on the doc, but persistence is locked until after chrome is loaded. browser.js receives the resize event before chrome fully loads, so the doc element's sizemode isn't up to date. :/
Comment on attachment 535410 [details] [diff] [review] fix SeaMonkey doesn't seem to rely on the attribute so I had to manually inspect the window with DOM Inspector to note the attribute was now correct.