Closed Bug 1254019 Opened 4 years ago Closed 4 years ago
Firefox window does not recognize that it is on a different monitor when resuming from suspend
Here's what happened, I am unsure as to how reproducible this is as I am currently traveling. Probably easily: Hardware setup: Macbook Pro Retina with Windows 10 bootcamp, external Dell U2413 hooked up. 1. Have a Firefox window maximized on the external monitor. 2. Suspend the laptop. 3. Unplug the external monitor. 4. Resume the laptop. Expected: Maximized Firefox window is correctly sized on the Retina display. Actual: Dimensions of window result in all window chrome being located off-screen. I ran Spy++ and it showed the Window's coordinates as (-964, -606), (1924, 1166), size is 2888x1772.
What version (build), exactly? There have been some recent fixes that may be relevant here; please re-test with latest Nightly, and confirm whether the problem still occurs. Thanks.
(This may be a windows 10 problem, very similar problem sometimes happens to me e.g. with media players like VLC)
OK, I can reproduce this on Win8.1 with latest Nightly. When it happens, you can "fix" the window by minimizing and re-maximizing it -- i.e. click the taskbar icon a couple of times -- but it's a pretty ugly user experience. Should be fixable.... I'll take a look.
FTR, I can reproduce similar issues without suspend/resume, by just unplugging my external display while the Nightly window is maximized on it. The screen blanks momentarily as Windows reconsiders its position, then comes back -- with the Nightly window oversized and misplaced, not correctly constrained to the new screen bounds.
Restricting the resize in OnDPIChanged to windows in the 'normal' state fixes the reported problem here. There's also a related issue if the window is not maximized on the external monitor, but is large enough that when it gets resumed on the internal screen (and resized according to the DPI change), it's too big to fit. To avoid that, this patch also adds a check on the new position and size.
Attachment #8730874 - Flags: review?(VYV03354)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8730874 - Flags: review?(VYV03354) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/1c2aac5e9b1cec93623a724b86493093365e5678 Bug 1254019 - Don't attempt to resize a maximized window on DPI change; and when handling a DPI change, constrain the resized window to the screen bounds. r=emk
Comment on attachment 8730874 [details] [diff] [review] Don't attempt to resize a maximized window on DPI change; and when handling a DPI change, constrain the resized window to the screen bounds Approval Request Comment [Feature/regressing bug #]: 890156 (per-monitor dpi) [User impact if declined]: possibility of bad UX with mis-scaled window contents when the display configuration changes dynamically (e.g. unplugging a second monitor with different DPI) [Describe test coverage new/current, TreeHerder]: tested manually; not testable in automation as it involves dynamically changing the system (hardware) configuration [Risks and why]: minimal risk, just adding precautionary checks within the DPI-change handling on Windows (so cannot affect any other situation or platform) [String/UUID change made/needed]: none
Attachment #8730874 - Flags: approval-mozilla-aurora?
Hi, backed this out in https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=7c210149e23c since one of the changes caused reftest failures like : https://treeherder.mozilla.org/logviewer.html#?job_id=23888478&repo=mozilla-inbound
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a5cb1ac5a7c4f7f38bf32013dc0da4712eea186 Bug 1254019 - Don't attempt to resize a maximized window on DPI change; and when handling a DPI change, constrain the resized window to the screen bounds. r=emk
(In reply to Carsten Book [:Tomcat] from comment #9) > Hi, > > backed this out in > https://treeherder.mozilla.org/#/jobs?repo=mozilla- > inbound&revision=7c210149e23c since one of the changes caused reftest > failures like : > > https://treeherder.mozilla.org/logviewer.html#?job_id=23888478&repo=mozilla- > inbound That was bug 1255158 (unrelated, but pushed at the same time), so I've re-landed this one.
Comment on attachment 8730874 [details] [diff] [review] Don't attempt to resize a maximized window on DPI change; and when handling a DPI change, constrain the resized window to the screen bounds Trying to improve multi-mon drag-drop-resize experience, Aurora47+
Attachment #8730874 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.