Closed
Bug 75657
Opened 23 years ago
Closed 23 years ago
Window position is not persisted if quickly moved then dismissed
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.1
People
(Reporter: sfraser_bugs, Assigned: danm.moz)
Details
We fail to save window positions when you dismiss a dialog with the escape key. To repro: 1. Open the Open location dialog. 2. Move it to a new location 3. Hit the cancel button 4. Bring it up again. Note that it's position was saved. Now: 1. Open the Open location dialog. 2. Move it to a new location 3. Press the 'Escape' key 4. Bring it up again. Note that it's position was not saved. What's weird is that dismissing the dialog with command-. on Mac *does* save its location.
Reporter | ||
Comment 1•23 years ago
|
||
So it seems that the issue here is a quick move/dismiss, which dismisses the window before the persistence timer fires. This is easy to do using keys to dismiss dialogs.
Summary: Window position is not persisted when dismissing a dialog with the escape key → Window position is not persisted if quickly moved then dismissed
Thanks for the analysis, Simon. We just need to fire the persistence timer during window teardown, before the persistence-to-localstore code has come and gone. This will fix the bug: Index: xpfe/appshell/src/nsWebShellWindow.cpp =================================================================== RCS file: /cvsroot/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp,v retrieving revision 1.340 diff -u -r1.340 nsWebShellWindow.cpp --- nsWebShellWindow.cpp 2001/04/18 01:39:35 1.340 +++ nsWebShellWindow.cpp 2001/04/30 21:32:41 @@ -1730,6 +1730,13 @@ } #endif + PR_Lock(mSPTimerLock); + if (mSPTimer) { + mSPTimer->Cancel(); + mSPTimer = nsnull; + StoreBoundsToXUL(mSPTimerPosition, mSPTimerSize, PR_FALSE); + } + PR_Unlock(mSPTimerLock); return nsXULWindow::Destroy(); }
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
patch is in (has been for several days)
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•