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/115.3.0esr-1+rpi1~3^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0b48e87fe01d4728768f97b5f544f13215b06017;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.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs index 602986e5293..99cf0022cfb 100644 --- a/browser/components/sessionstore/SessionStore.sys.mjs +++ b/browser/components/sessionstore/SessionStore.sys.mjs @@ -5220,7 +5220,7 @@ var SessionStoreInternal = { // _getWindowDimension. let desktopToCssScale = aWindow.desktopToDeviceScale / aWindow.devicePixelRatio; - aWindow.moveTo(aLeft * desktopToCssScale, aTop * desktopToCssScale); + aWindow.moveTo((aLeft < -aWidth) ? 0 : aLeft * desktopToCssScale, (aTop < -aHeight) ? 0 : aTop * desktopToCssScale); } if ( aWidth && @@ -5248,9 +5248,8 @@ var SessionStoreInternal = { case "minimized": if (aSizeModeBeforeMinimized == "maximized") { aWindow.maximize(); + break; } - aWindow.minimize(); - break; case "normal": aWindow.restore(); break;