[wayland] Use ScreenGetterGtk on Gnome with fractional scaling
Categories
(Core :: Graphics, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox118 | --- | fixed |
People
(Reporter: rmader, Assigned: emilio)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
On Wayland there are two common ways to implement scaling:
- Integer-only scaling, compatible with Xwayland HiDPI clients. This is used on Gnome by default
- Fractional scaling. This is used by default by all other common Wayland compositors, as well as on Gnome if fractional scaling is enabled (
scale-monitor-framebufferexperimental setting).
For 1. there's a special ScreenGetterWayland implementation that is used instead of ScreenHelperGTK on Gnome. Lets try to detect when Mutter is running with fractional scaling enabled and use ScreenHelperGTK in that case.
| Reporter | ||
Comment 1•3 years ago
|
||
P.S.: this, among other things, fixes wrongly sized popups on Gnome with fractional scaling.
| Assignee | ||
Comment 2•3 years ago
|
||
I think we should just do this unconditionally, see bug 1753601 (and bug 1753601 comment 48 in particular)...
| Reporter | ||
Comment 3•3 years ago
|
||
Oh, are you sure ScreenGetterGTK works correctly for Gnome without fractional scaling? If so - awesome!
Updated•2 years ago
|
| Assignee | ||
Comment 4•2 years ago
|
||
| Assignee | ||
Comment 5•2 years ago
|
||
This fixes screen sizes when using mutter with fractional scaling, and
shouldn't change behavior otherwise.
Without this patch, mutter with scale at 150% reports:
[screen.width, screen.height] == [ 1920, 1080 ]
With this it reports the proper [ 2560, 1440 ].
The bug that caused us to introduce it was long fixed in gtk itself, as
I understand it, and ScreenGetterGtk is also what's used everywhere else
on Wayland.
Re-implement GetScreenForWindow in a way that works for ScreenGetterGtk
too, to avoid regressing any functionality on mutter.
Depends on D186341
| Assignee | ||
Updated•2 years ago
|
Comment 7•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/3b3db7c9f72b
https://hg.mozilla.org/mozilla-central/rev/3b5a0c666d81
Description
•