Rafael Fontenelle
eae116fed4
Update Brazilian Portuguese translation
2021-07-23 15:11:48 +00:00
Alexey Rubtsov
0fb688dee1
Update Russian translation
2021-07-23 08:46:32 +00:00
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
Marco Trevisan (Treviño)
c86a1e00c0
monitor-unit-tests: Check integer scaling values are matching expectations
...
A per previous commit we can now ensure that all the scaling values
when using non-fractional scaling have the value we expect.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1878 >
2021-07-22 16:06:10 +02:00
Marco Trevisan (Treviño)
98f3f96978
monitor: Never return fractional scale values when NO_FRAC is used
...
We introduced META_MONITOR_SCALES_CONSTRAINT_NO_FRAC to get global scale
values however, this didn't work properly for some resolutions.
In fact it may happen that for some resolutions (such as 3200x1800) that
we did not compute some odd scaling levels (such as 3.0) but instead
its closest fractional value that allowed to get an integer resolution
(2.98507452 in this case).
Now this is something relevant when using fractional scaling because we
want to ensure that the returned value, when multiplied to the scaled
sizes, will produce an integer resolution, but it's not in global scale
mode where we don't use a scaled framebuffer.
So, take a short path when using no fractional mode and just return all
the applicable values without waste iterations on fractional values.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1878 >
2021-07-22 16:06:08 +02:00
Marco Trevisan (Treviño)
f6e2059a65
monitor: Replace some useless goto with clearer returns
...
There was no point to use goto in place of normal returns here.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1878 >
2021-07-22 15:54:03 +02:00
Marco Trevisan (Treviño)
b088dbd90b
monitor-unit-tests: Add tests to verify the computed scaling values
...
Scaling values computation code served us well in the past years but
it's quite delicate and it has some issues in edge cases, so add a test
that verifies that the computed scaling values for all the most common
resolutions (and some that may be common in future) are what we expect
to be.
This may also serve us in future when we'd define a better algorithm to
compute the preferred scale, but this not the day.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1878 >
2021-07-22 15:50:44 +02:00
Marco Trevisan (Treviño)
4ca5a97ea8
monitor-manager: Only derive global scales supported by all monitors
...
When deriving the global scale from current monitor, we were just checking the
supported value by the primary monitor, without considering weather the current
scale was supported by other monitors.
Resolve this by checking if the picked global scale is valid for all active
monitors, and if it's not the case, use a fallback strategy by just picking the
maximum scale level supported by every head.
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/407
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/336 >
2021-07-22 15:38:04 +02:00
Marco Trevisan (Treviño)
1ab79c79a5
monitor-manager: Derive configured global scale using common value
...
When deriving the global scale from config, we need to ensure that the value
is matching all the monitor configurations.
If not, we should fallback to the normal scale value.
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/407
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/336 >
2021-07-22 15:38:04 +02:00
Marco Trevisan (Treviño)
7c87c1c24f
monitor-manager: Check if all monitor scales are matching in global mode
...
When global scaling is set we need to ensure that all the requested scale
configurations are matching, otherwise we'd end up in a mixed setup that
we don't support in this scenario.
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/407
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/336 >
2021-07-22 15:38:04 +02:00
Marco Trevisan (Treviño)
1ac63fcd77
monitor-manager-xrandr: Use monitor to calculate scaling
...
In Xrandr we were caching the available scaling modes that were computed just
for the current mode, for each monitor, while we can actually reuse the
default implementation, by just passing the proper scaling constraint.
In monitor we need then to properly filter these values, by only accepting
integer scaling factors that would allow to have a minimal logical monitor
size.
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/407
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/336 >
2021-07-22 15:38:02 +02:00
Marco Trevisan (Treviño)
67eb60c19a
monitor-manager: Pass the Logical mode when computing the monitor scale
...
In order to compute proper default scaling value we need to know if the
fractional scaling is enabled or not and thus if we're using a logical
mode or not.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/336 >
2021-07-22 13:14:01 +02:00
Hugo Carvalho
d561d300b6
Update Portuguese translation
2021-07-22 10:38:50 +00:00
Fran Dieguez
97b24c9b34
Update Galician translation
2021-07-22 06:21:46 +00:00
Yuri Chornoivan
7bc4763435
Update Ukrainian translation
2021-07-19 16:03:24 +00:00
Florian Müllner
035527cdcb
ci: Move FDO_UPSTREAM_REPO to global scope
...
ci-fairy also uses the variable to set the upstream remote that is used
to build the commit range to check.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1936 >
2021-07-19 15:14:04 +02:00
Florian Müllner
221331a1db
ci: Bump ci-templates image
...
Before building a container image, the code checks that the
repository's container registry is enabled. That check was
broken a while ago, update the image to pull in the fix.
See https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/39
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1935 >
2021-07-19 13:40:42 +02:00
Florian Müllner
7862f14393
docs: Add README section for default branch
...
We are about to change it, so briefly outline how to update local
checkouts.
(Copied from glib)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1930 >
2021-07-18 23:14:16 +02:00
Florian Müllner
3b49ecea9f
Rename the master branch to main
...
It's a more inclusive name, has the same tab-completion prefix, and is
the default choice for new repositories created locally by git, and on
GitHub and GitLab.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1930 >
2021-07-18 23:14:16 +02:00
Florian Müllner
cc04f93683
ci: Fallback to HEAD when checking out branch
...
... instead of hardcoding origin/master as the default branch.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1930 >
2021-07-18 23:14:16 +02:00
Florian Müllner
ff14ed5ad9
compositor: Update outdated URL
...
The file was moved a while ago. Update the link to the new location,
and specify a particular tag instead of master to make sure this
doesn't happen again.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1930 >
2021-07-18 23:14:16 +02:00
Piotr Drąg
e98f1682bd
Update POTFILES.in
2021-07-18 17:06:27 +02:00
Robert Mader
931fca1bdc
meson: Bump required libinput version to 1.18.0
...
This is needed for https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1763
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1933 >
2021-07-16 21:30:04 +02:00
Carlos Garnacho
414302fa82
backends: Promote g_debug() MetaStageImpl message to meta_topic()
...
We now have a META_DEBUG_BACKEND topic that can suit this bag of
assorted debug messages. Assign it to these, instead of plain
G_MESSAGES_DEBUG=mutter.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:12:01 +02:00
Carlos Garnacho
c80ef12c79
clutter: Remove unused EGL header
...
This just pulled cogl headers, so not very useful.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
1f67e4650c
clutter: Remove leftovers from backend code in build system
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
229b52872e
clutter: Drop generation of x11 pkgconfig file
...
This is no longer needed, at least from the Clutter API perspective.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
dc6d3cead2
backends: Shuffle ClutterBackendX11 code into MetaClutterBackendX11
...
We have a Clutter implementation of the X11, just to subclass it in
our backends. Move the implementation entirely to src/backends/x11.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
1e84c00d86
clutter: Drop dead X11 code
...
We don't use the ClutterBackendX11 direct constructor.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
7fcc7a6edb
clutter: Drop Xsettings client code
...
We only listen to it for 2 settings (drag threshold, double click
time), and we already have the stock ClutterSettings object tracking
the source of these. This code is redundant.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
e77e88894b
backends: Excise MetaStageView to its own file
...
It was implemented together with MetaStageImpl, move it to a separate
file.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
d5c3c80dfe
backends: Rename ClutterStage[View]Cogl API and types
...
Rename to MetaStageImpl and MetaStageView, so they are in line with
the rest of the backend code.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
8f839b2f9c
clutter: Move ClutterStageCogl[View] code to src/backends
...
This is now MetaStageImpl in backend code.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
0ac257212e
core: Add private utility function to get Clutter debug flags
...
This will be used to fetch the debug flags from backend code.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
7712b58170
clutter: Export private function to get debug flags
...
We're shuffling some code into src/backends, that needs knowing
about these flags to minimize immediate refactors.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
dd9d40aedb
clutter: Make ClutterStageView API public to mutter
...
All subclasses and stage implementations will come from src/backends,
so this internal API must be accessible there.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
5beba8b99b
clutter: Make ClutterDamageHistory API public to mutter
...
We are moving things to src/backends, make this helper object able
to be used there. This is a temporary measure as ClutterDamageHistory
itself should be moved too.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
c58909dc0f
clutter: Demote CLUTTER_NOTE to g_debug in clutter-stage-cogl.c
...
This code is being shuffled out of Clutter code, so cut the ties with
it before doing that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Carlos Garnacho
5785d8cde0
backends/native: Remove unused array definition
...
This array is a relic from the input code belonging to Clutter,
and is nowadays unused.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862 >
2021-07-16 19:08:06 +02:00
Jonas Ådahl
a2937a47bb
onscreen/native: Change some g_debug() meta_topic()
...
g_debug() is inconvenient to use; change to meta_topic() with the 'kms'
topic. This makes it possible to enable valuable debug output at
runtime.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1931 >
2021-07-16 18:17:04 +02:00
Jonas Ådahl
d057762cdb
device-pool: Add debug logging
...
Enabled by enabling the 'backend' debug topic.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1931 >
2021-07-16 18:17:04 +02:00
Jonas Ådahl
4b6631338e
util: Add 'backend' debug topic
...
Meant for backend things that are not large enough to warrant their own
topic.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1931 >
2021-07-16 18:17:04 +02:00
Jonas Ådahl
e4375046e0
cogl/gl: Handle bogus glGetString(GL_RENDERER) return values
...
Seems glGetString(GL_RENDERER) in the wild can return NULL, causing
issues with strstr(). Handle this more gracefully by using
g_return_val_if_fail(), that assumes a NULL renderer means software
rendering.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1931 >
2021-07-16 18:17:04 +02:00
Jonas Ådahl
b65555a958
renderer/native: Include error message in log entries
...
We had a GError handed to us, where we logged a warning, but didn't log
the message from the error. Do that so it becomes easier to find out
what might have failed.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1931 >
2021-07-16 18:10:56 +02:00
Jonas Ådahl
58f053d437
drm-buffer/dumb: Return TRUE when init succeeded
...
Returning FALSE means it failed, but we returned FALSE even when it
succeeded, meaning it would never succeed.
Fixes: 10c4bc6e3f
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1880
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1888
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1932 >
2021-07-16 17:18:55 +02:00
Jonas Ådahl
8a4aa92a54
context: Move the signal handling and dir management to user
...
Signals and changing current directory is a process global action, thus
isn't that suitable for a library. Thus, move that responsibility to
gnome-shell.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 13:40:34 +02:00
Jonas Ådahl
9cda0bd719
tests: Make common test code a shared library
...
This will require some symbol exporting, but the benefit is that have
better control of what external test cases can do in terms of creating
more testing specific contexts.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 13:40:34 +02:00
Jonas Ådahl
d8107027ef
tests/test-utils: Move test client path ensure helper to private header
...
It's only used from the test context, and the main test utils header
file will be used to export helper functionality, so move it out,
preparing for that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
724a7eee74
tests: Move 'wait-for-X11-display' helper to MetaContextTest
...
Gets rid of a un-prefixed helper function relying on a global singleton.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
e8742be568
tests/test-utils: Remove unused init function
...
This is now dealt with by MetaContextTest.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00