Closed Bug 1546374 Opened 5 months ago Closed 5 months ago

[wayland] [gtk] popup wrongly placed when primary monitor has offset

Categories

(Core :: Widget: Gtk, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: jhorak, Assigned: jhorak)

References

(Blocks 1 open bug, Regressed 3 open bugs)

Details

Attachments

(1 file)

When the primary screen has offset the popup menus are moved by this offset all the time:
[(null) 27130: Main Thread]: D/WidgetScreen New screen [0 2880 3840 2160 (0 2880 3840 2160) 32 2.000000 2.000000 288.757874]
[(null) 27130: Main Thread]: D/WidgetScreen New screen [527 0 2560 1440 (527 0 2560 1440) 32 1.000000 1.000000 117.987099] <- this is primary screen

This is because no GTK app knows on which monitor it is located in Wayland (ie. its absolute position), so the Firefox's ScreenManager returns the primary monitor all the time and in the nsMenuPopupFrame::SetPopupPosition the offset is used to ensure that menu is shown on monitor:

// Ensure that anchorRect is on screen.
anchorRect = anchorRect.Intersect(screenRect);

The Firefox needs to stop adjusting popup position in Wayland because it does not work and it should be executed by gdk_window_move_to_rect() which ensures the popup is shown in visible area.

gdk_window_move_to_rect() is implemented at Bug 1423598

Depends on: 1423598
Priority: -- → P3

Because adjusting position in the Wayland does not work
(because of unknown absolute position of the window), do not try
to adjust popup position under Wayland.

Pushed by aiakab@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7d383b757d50
Do not adjust position of popup windows on Wayland; r=stransky

Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → jhorak
Regressions: 1562576
Regressions: 1565401
Regressions: 1577589
You need to log in before you can comment on or make changes to this bug.