From: Mike Hommey Date: Thu, 12 Nov 2009 16:18:31 +0000 (+0100) Subject: Avoid wrong sessionstore data to keep windows out of user sight X-Git-Tag: archive/raspbian/60.5.1esr-1+rpi1^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b8b43500ab22d0a993588cf776751b649ec3cb0d;p=firefox-esr.git Avoid wrong sessionstore data to keep windows out of user sight It happens that sessionstore can keep wrong information for the window position or minimized state. Workaround this until the real bug is found and fixed (probably in xulrunner). Closes: #552426, #553453 Gbp-Pq: Topic debian-hacks Gbp-Pq: Name Avoid-wrong-sessionstore-data-to-keep-windows-out-of.patch --- diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm index 88de8a64f0f..6543f3c7079 100644 --- a/browser/components/sessionstore/SessionStore.jsm +++ b/browser/components/sessionstore/SessionStore.jsm @@ -4106,7 +4106,7 @@ var SessionStoreInternal = { try { // only modify those aspects which aren't correct yet if (!isNaN(aLeft) && !isNaN(aTop) && (aLeft != win_("screenX") || aTop != win_("screenY"))) { - aWindow.moveTo(aLeft, aTop); + aWindow.moveTo((aLeft < -aWidth) ? 0 : aLeft, (aTop < -aHeight) ? 0 : aTop); } if (aWidth && aHeight && (aWidth != win_("width") || aHeight != win_("height")) && !gResistFingerprintingEnabled) { // Don't resize the window if it's currently maximized and we would @@ -4121,8 +4121,6 @@ var SessionStoreInternal = { aWindow.maximize(); break; case "minimized": - aWindow.minimize(); - break; case "normal": aWindow.restore(); break;