Avoid wrong sessionstore data to keep windows out of user sight
authorMike Hommey <mh@glandium.org>
Thu, 12 Nov 2009 16:18:31 +0000 (17:18 +0100)
committerMike Hommey <glandium@debian.org>
Thu, 20 Jun 2019 17:48:50 +0000 (18:48 +0100)
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

browser/components/sessionstore/SessionStore.jsm

index 88de8a64f0fca4dfd23adc8f85192fcf626a3b3d..6543f3c707995228add5863ddbb2ec0d734f1f61 100644 (file)
@@ -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;