mutter/src
Marco Trevisan (Treviño) 3e1e2cb91f monitor: Do not overlap when checking for applicable scaling values
With some resolutions (such as 4096x2160) we may compute duplicated
scale factors because we used a too wide threshold to check for an
applicable value.

In fact, while when we're at the first and last values it's fine to
search applicable values up to SCALE_FACTORS_STEP, on intermediate ones
we should stop in the middle of it, or we're end up overlapping the
previous scaling value domain.

In the said example in fact we were returning 2.666667 both when
looking to a scaling value close to 2.75 and 3.00 as the upper bound of
2.75 (3.0) was overlapping with the lower bound of 3.0 (2.75).
With the current code, the lower and upper bounds will be instead 2.875.

Adapt test to this, and this allows to also ensure that we're always
returning a sorted and unique list of scales (which is useful as also
g-c-c can ensure that this is true).

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1878>
2021-07-22 16:19:15 +02:00
..
backends monitor: Do not overlap when checking for applicable scaling values 2021-07-22 16:19:15 +02:00
compositor compositor: Update outdated URL 2021-07-18 23:14:16 +02:00
core backends: Shuffle ClutterBackendX11 code into MetaClutterBackendX11 2021-07-16 19:08:06 +02:00
meta util: Add 'backend' debug topic 2021-07-16 18:17:04 +02:00
tests monitor: Do not overlap when checking for applicable scaling values 2021-07-22 16:19:15 +02:00
ui main: Move rect related macro to util-private.h 2021-05-17 16:08:42 +00:00
wayland backends: Shuffle ClutterBackendX11 code into MetaClutterBackendX11 2021-07-16 19:08:06 +02:00
x11 backends: Shuffle ClutterBackendX11 code into MetaClutterBackendX11 2021-07-16 19:08:06 +02:00
libmutter.pc.in build: Fix libs and cflags in autotools .pc file 2018-11-10 16:20:46 +00:00
meson.build backends: Excise MetaStageView to its own file 2021-07-16 19:08:06 +02:00
meta-private-enum-types.c.in core: Drop "volatile" from static GTypes in manual registration 2021-03-22 10:47:51 +00:00
meta-private-enum-types.h.in screen-cast: Add screen cast flag to streams 2020-07-30 09:51:16 +02:00
org.freedesktop.login1.xml MetaLauncher: Don't g_error() on failure 2015-11-06 17:03:59 -05:00
org.gnome.Mutter.DisplayConfig.xml x11: Support the CTM (color transform matrix) RandR property 2021-01-11 13:44:54 +00:00
org.gnome.Mutter.IdleMonitor.xml idle-monitor: Add ResetIdletime API, for testing purposes 2018-04-16 13:28:03 +02:00
org.gnome.Mutter.RemoteDesktop.xml remote-desktop/session: Add CapsLockState and NumLockState properties 2021-03-04 17:39:08 +00:00
org.gnome.Mutter.ScreenCast.xml screen-cast/session: Introduce RecordVirtual D-Bus API 2021-03-12 15:09:45 +00:00