Closed Bug 324348 Opened 19 years ago Closed 18 years ago

firefox window appears initially at small size and then resizes

Categories

(Firefox :: Tabbed Browser, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: ginnchen+exoracle)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

There was a recent regression that Firefox's window opens briefly at a size probably somewhere around 150x150 (hard to tell, it's a very quick flash at that size) before resizing to its expected (persisted) size.  In my window manager (metacity) this has significant effects on where the window is positioned, since the initial position is set based on the small size and the resize doesn't change that position, so it often ends up positioned with the right edge way offscreen.

This regressed between Linux nightlies 2006-01-18-05-trunk and 2006-01-20-16-trunk.  There weren't nightlies in the interim because prometheus was orange.
Hrm.  I was expecting this to turn out to be a regression from bug 297541, but it appears not to be.
This is a regression from Ben's tab browser landing (bug 308396) at 2006-01-20 15:04.
Blocks: 308396
Component: GFX: Gtk → Tabbed Browser
Product: Core → Firefox
QA Contact: gtk → tabbed.browser
Keywords: regression
As far as I can tell, the initial width is exactly 200px. Externally launched windows and new windows exhibit the issue; links opened in new windows don't.

An interesting point is that the view-source window (in tbird as well) started doing the same incorrect initial size thing earlier; the regression range for view-source is 2005-12-15-15Z/2005-12-20-23Z.
backing out
2005-12-15 21:33 ginn.chen%sun.com mozilla/widget/src/gtk2/nsWindow.cpp 1.153 6/0 Bug 295447 Ctrl+1/2/4/5/6 raises window without focus r+sr=roc
fixes the initial size of both the firefox browser and view-source windows.
We should back that out. Ginn's away and I'm away too but I would approve someone else doing it.
Without understanding too much, I find it plausible that viewsource, and browser with the bug 308396 changes, focus stuff so early that with the change from bug 295447 it causes gtk_widget_show via gtk_window_present before the window is quite ready for it. Based on that, possible solutions would be
a) don't tweak focus that early from tabbrowser/viewsource
b) delay the gtk_window_present until later if it is necessary in these cases
c) don't gtk_window_present if the window is not yet visible

patch implements (c), I don't have a seamonkey build so I don't know if it regresses bug 295447 -- I don't really know what IsVisible or GTK_VISIBLE mean exactly.
Assignee: nobody → tuukka.tolvanen
Status: NEW → ASSIGNED
Attachment #209923 - Flags: superreview?(roc)
Attachment #209923 - Flags: review?(roc)
I can't give you review on this for a few days
Comment on attachment 209923 [details] [diff] [review]
patch1: only focus if already visible

yeah, I didn't see your comment 5 yet.
Attachment #209923 - Flags: superreview?(roc)
Attachment #209923 - Flags: superreview?(pavlov)
Attachment #209923 - Flags: review?(roc)
Attachment #209923 - Flags: review?(blizzard)
Comment on attachment 209923 [details] [diff] [review]
patch1: only focus if already visible

doh :(
Attachment #209923 - Flags: superreview?(pavlov) → superreview?(blizzard)
Comment on attachment 209923 [details] [diff] [review]
patch1: only focus if already visible

I am not doing reviews right now.  You will need to find someone else.
Attachment #209923 - Flags: superreview?(blizzard)
Attachment #209923 - Flags: review?(blizzard)
not much more I can do here before the 5th ->ginn
Assignee: tuukka.tolvanen → ginn.chen
Status: ASSIGNED → NEW
Comment on attachment 209923 [details] [diff] [review]
patch1: only focus if already visible

It does regress Bug 295447.
Attachment #210743 - Flags: ui-review?
Attachment #210743 - Flags: review?
Tested on both Firefox and Seamonkey.
It doesn't regress Bug 295447.
Attachment #209923 - Attachment is obsolete: true
Attachment #210744 - Flags: review?(roc)
Attachment #210743 - Attachment is obsolete: true
Attachment #210743 - Flags: ui-review?
Attachment #210743 - Flags: review?
Checking in nsWindow.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsWindow.cpp,v  <--  nsWindow.cpp
new revision: 1.156; previous revision: 1.155
done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: