[wayland] when dual monitor setup (hi+normal dpi) the popups are wrongly placed

NEW
Assigned to

Status

()

defect
10 months ago
17 days ago

People

(Reporter: jhorak, Assigned: jhorak, NeedInfo)

Tracking

(Blocks 2 bugs)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 affected)

Details

Attachments

(1 attachment)

Assignee

Description

10 months ago
The nsView::DoResetWidgetBounds use nsDeviceContext::GetDesktopToDeviceScale() [1] for getting the scale of the monitor by using [2] FindScreen method. The FindScreen does not work under Wayland because we cannot obtain window absolute position from the server.

Because the scale returned by GetDesktopToDeviceScale() returns always 1 or 2 (depends on which monitor is primary) it leads to wrong popup menu placement under wayland.

[1] https://searchfox.org/mozilla-central/rev/9e7995b3c384945740985107a4de601b27904718/view/nsView.cpp#363
[2] https://searchfox.org/mozilla-central/rev/9e7995b3c384945740985107a4de601b27904718/gfx/src/nsDeviceContext.cpp#725
Assignee

Comment 1

10 months ago
In the Wayland we don't know the absolute position of the window, so we cannot
use it to determine on which monitor the window is. We need to use parent window
scale factor to scale popup windows, otherwise popup windows will be wrongly
placed in the hi+normal dpi monitor setup.
Comment on attachment 9008054 [details]
Bug 1490297 Use parent window scale factor for the popup windows under Wayland; r?bzbarsky

Matt Woodrow (:mattwoodrow) has approved the revision.
Attachment #9008054 - Flags: review+
Assignee

Updated

9 months ago
Keywords: checkin-needed

Comment 4

9 months ago
Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c5b3caf36ddf
Use parent window scale factor for the popup windows under Wayland; r=mattwoodrow
Keywords: checkin-needed

Comment 5

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c5b3caf36ddf
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Depends on: 1493081
Assignee: nobody → jhorak

Comment 6

9 months ago
I'm sorry, but this bug has made the latest Nightly completely unusable due to bug 1493081, and leaving it in its current state isn't acceptable.  I'll have to back this out and retrigger Nightlies.

Updated

9 months ago
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Link to backout:
https://hg.mozilla.org/mozilla-central/rev/bb920e419166
Status: REOPENED → NEW
Target Milestone: mozilla64 → ---
Type: enhancement → defect
You need to log in before you can comment on or make changes to this bug.