[wayland] [gtk] popup wrongly placed when primary monitor has offset
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: jhorak, Assigned: jhorak)
References
(Blocks 1 open bug)
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
Assignee | ||
Comment 2•6 years ago
|
||
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
Comment 4•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•