Closed Bug 1246389 Opened 4 years ago Closed 4 years ago

Window frame does not shrink on DPI change

Categories

(Core :: Widget: Win32, defect)

All
Windows 8.1
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: emk, Assigned: jfkthame)

References

Details

Attachments

(1 file)

Only the content area shrinks.
https://pbs.twimg.com/media/CaX4xMGVIAAipYd.jpg
Thank you, Kimura-san, for your report.

I met this bug yesterday. The STR at this time is,

1. Connect Win10 PC to TV with HDMI cable.
2. Open new window on PC and move it to TV.
3. Play the movie with Silverlight.
4. Disconnect HDIM cable from PC.

Then, the window in TV moved to PC, but it failed to resize the window.
The problem here is that we get a WM_DPICHANGED message, as expected, but nsWindow::OnDPIChanged skips updating the window size. I can't figure out why it was written like that; I guess it was simply a mistake. Correcting the condition here also fixes the behavior in the case where you resize (rather than move) a window across a display boundary, such that more than half of it ends up on a display with a different DPI. Currently, things go kinda crazy at that point, as the auto-resize-on-DPI-change battles with the user's manual resizing. This patch makes things more stable there, too, so the user keeps control of the window. Which is probably what I originally intended here, just wrote it wrong.
Attachment #8724683 - Flags: review?(VYV03354)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment on attachment 8724683 [details] [diff] [review]
Resize window appropriately on WM_DPICHANGED messages for dynamic resolution changes

Oops, I should have caught this when I reviewed this in bug 890156.
Attachment #8724683 - Flags: review?(VYV03354) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/29e1faddbf53b86bf94f7554fe30c3f03f715cfe
Bug 1246389 - Resize window appropriately on WM_DPICHANGED messages for dynamic resolution changes. r=emk
https://hg.mozilla.org/mozilla-central/rev/29e1faddbf53
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.