Closed
Bug 1661540
Opened 4 years ago
Closed 4 years ago
[wayland] screen.height and screen.width return device pixels rather than CSS pixels.
Categories
(Core :: Widget: Gtk, defect, P1)
Core
Widget: Gtk
Tracking
()
RESOLVED
FIXED
90 Branch
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: emilio, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Open https://crisal.io/tmp/screen.html.
In wayland, on a maximized window (screen.width == window.innerWidth
) I get (on a HiDPI screen):
innerWidth: 1920
innerHeight: 940
outerWidth: 1920
outerHeight: 1053
screen.width: 3840
screen.height: 2160
In X11 I get the expected:
innerWidth: 1920
innerHeight: 979
outerWidth: 1920
outerHeight: 1053
screen.width: 1920
screen.height: 1080
It seems something is not adjusting for DPI properly in the wayland code.
Assignee | ||
Updated•4 years ago
|
Assignee: nobody → stransky
Priority: -- → P1
Assignee | ||
Comment 2•4 years ago
|
||
gdk_screen_get_monitor_geometry() / gdk_screen_get_monitor_workarea() returns unscaled monitor/workarea sizes on X11
but scaled sizes on Wayland. So don't scale it on Wayland as it's already scaled.
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/9820e7f4db04
[Wayland] Don't scale reported monitor sizes on Wayland, r=jhorak
Comment 4•4 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox90:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•