I am trying to track the status of a Firefox window ("maximized", "minimized", "normal", "full screen"; see here ). However, no matter what I try, I can never see the minimized event; the rest is fine. For example, if I add listeners to the window, for example
window.addEventListener("activate", function(event) { dump("activate " + window.windowState + " " + window.screenX + " " + window.screenY + "\n"); }, false);
window.addEventListener("deactivate", function(event) { dump("deactivate " + window.windowState + " " + window.screenX + " " + window.screenY + "\n"); }, false);
window.addEventListener("resize", function(event) { dump("resize " + window.windowState + " " + window.screenX + " " + window.screenY + "\n"); }, false);
I never see 2 as window.windowState (2 = STATE_MINIMIZED). I tried to get around using screenX and screenY, but that doesn't help. When I minimize the window, a deactivation event occurs, not a resize, when window.windowState is 3 (STATE_NORMAL) and the old screenX / screenY values.
Is there a way to tell when a Firefox window is minimized? I am at the end of my mind.
source
share