Bug 1795066 [Wayland] Don't report monitor/screen shift to layout on Wayland r=emilio

We can't report monitor/screen shift to layout on Wayland. It causes wrong popup placement as all window/popup coordinates are used relatively to parent on Wayland.
Also we can't get/set position of toplevel windows on Wayland.

Differential Revision: https://phabricator.services.mozilla.com/D160784
This commit is contained in:
stransky 2022-11-04 08:07:08 +00:00
Родитель 5cc9f113c0
Коммит f88b044e04
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -383,6 +383,10 @@ already_AddRefed<Screen> ScreenGetterWayland::MakeScreenWayland(gint aMonitor) {
"DPI %f, refresh %d]",
aMonitor, rect.x, rect.y, rect.width, rect.height, pixelDepth,
contentsScale.scale, defaultCssScale.scale, dpi, monitor->refresh);
// We report zero screen shift on Wayland. All popups positions are relative
// to toplevel and we can't get toplevel position from Wayland compositor.
rect.x = rect.y = 0;
return MakeAndAddRef<Screen>(rect, rect, pixelDepth, pixelDepth,
monitor->refresh, contentsScale, defaultCssScale,
dpi, Screen::IsPseudoDisplay::No);