Now that we copy this into a temporary XDG_DATA_HOME, we don't need
to have it duplicated in the source tree as well.
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4012>
Previously these tests tried to write to /usr when run as an
installed-test, which happens to work on Gitlab-CI because we're running
as root inside a container, but will not work when running in a more
realistic scenario as an unprivileged user (which is how Debian's
autopkgtest framework runs this test suite).
This also avoids leaving non-package-manager-managed detritus in /usr.
In color-management-tests, we can just delete the code that sets
XDG_DATA_HOME.
In color-management-profile-conflict-test, we also need to copy
the conflicting vx239-calibrated.icc into the temporary XDG_DATA_HOME
to get onto the code path that this test is intended to exercise.
Resolves: https://gitlab.gnome.org/GNOME/mutter/-/issues/3658
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4012>
g_array_sized_new() creates a new GArray with a preallocated size, but,
after creation, the array length is still zero [1].
Store the modifiers in a EGLuint64KHR array and use g_array_new_take()
to create a new GArray with the correct size.
Because no modifiers were returned, gbm_surface_create() was used
instead gbm_surface_create_with_modifiers() on multi-GPU setups.
[1] https://docs.gtk.org/glib/type_func.Array.sized_new.html
Fixes: aec85281ba ("native/renderer: Retrieve the right modifiers set for each GPU")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3998>
When a surface is destroyed, the existing feedback surfaces are marked
as inert by setting the wl_resource user_data to NULL. This wasn't
handled in the feedback surface destructor.
Fixes: 2341346c90 ("wayland: Implement the color management protocol v4")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4000>
The tablet tool is initialized with a device but if that device is later
removed we never update tool->device. This eventually causes a crash
when we're passing that device into
meta_wayland_input_invalidate_focus().
The tool keeps track of the current tablet anyway so instead of caching
this pointer in the tool, use the current tablet's device.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3642
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3959>
`(int) (1.0f * (float) INT_MAX)` doesn't necessarily result in INT_MAX
due to how floating point arithmetics. Handle this better by setting
INT_MIN/MAX explicitly, when the floating point value post scaling
exceeds the corresponding limit.
This fixes resizing of electron windows.
Fixes: 6e8c7c5f84 ("Add experimental mode to use native scaling of Xwayland clients")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3997>
Meson variables don't have a scope, so using `prefix` in a loop
for D-Bus interface prefixes actually overshadows the global
variable that holds the build prefix.
As far as I can tell, the only place where the "wrong" value is
read is the build summary, but let's not tempt fate and fix it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3995>
The value returned by meta_frame_get_frame_bounds() is owned by the
caller so we can assign it directly without copying to avoid a leak and
a bit of unnecessary work. Also it can't ever return NULL, so there is
no need to check for that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3994>
As with Xsettings, we want to use the X11 UI scaling factor to set the
cursor size, so that clients use a larger theme, both when using
`native-xwayland-scaling` and a physical layout mode.
Fixes: 6e8c7c5f84 ("Add experimental mode to use native scaling of Xwayland clients")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3992>
This is different from MetaSetting's UI scaling factor, and different
from the effective Xwayland scale.
The MetaSetting's UI scaling factor is the scaling factor used by
gnome-shell chrome itself.
The effective Xwayland scale is, with `native-xwayland-scaling` enabled,
the scale everything X11 is scaled with.
The X11 UI scaling factor is intended to be the scaling factor X11
clients are told to use, and how to derive that differs depending on the
layout mode and the effective Xwayland scale.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3992>