Since we now cascade when center-new-windows is true, we need to update the
always-above window positions to account for where the new windows will end
up being placed.
Assertions are also added for the two test windows' positions.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4202>
Handle NULL string pointer in meta_kms_update_states_in_impl.
Drop second parameter of meta_kms_update_states_sync, which wasn't used
by the external test caller anyway. Split out static update_states_sync
function which takes a hotplug event string pointer instead.
Preparation for next commit.
v2:
* Drop UpdteStatesData for encoded hotplug event strings.
v3:
* Put device path at the end of encoded string, allows simplifying
meta_kms_update_states_in_impl slightly further.
v4: (Sebastian Wick)
* Use g_autofree for hotplug_event string in on_udev_hotplug, fixes
leak.
* Store pointer to hotplug event device path string in local variable in
meta_kms_update_states_in_impl.
v5:
* Initialize `path` local variable to `NULL` and test it instead of the
`hotplug_event` parameter. Avoids (false-positive) compiler warning
about `path` possibly being used uninitialized.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4209>
It forced the power save mode to META_POWER_SAVE_ON when reading the
current KMS state.
This was problematic when a hotplug event is emitted while the session
is locked, which can be triggered by monitors polling all their inputs
for a signal: There's no mechanism to restore the previous power save
mode in this case, so the monitors would fail to actually enter power
saving mode but stayed on with a blank screen. This was at least one
cause of the symptoms described in
https://gitlab.freedesktop.org/drm/amd/-/issues/662 .
Moreover, I suspect it hasn't had any effect for the actual reading of
KMS state since 5f6aee341959 ("kms/update: Make power saving an update
wide change"), as changing the power save mode to META_POWER_SAVE_ON no
longer results in any immediate KMS state change, it's now only taken
into account for the next mode set.
It's not clear what the intended effect was in the first place, it was
originally added as part of 65db8efbe8b1 ("MonitorManager: add a KMS
backend") without rationale. It might have been cargo-culted from
somewhere else. It shouldn't be necessary from a KMS API PoV though.
Also adjust the KMS hotplug test to assert that a hotplug event doesn't
implicitly change the power save mode.
v2: (Sebastian Wick)
* Fix shortlog of commit which added
meta_monitor_manager_native_read_current_state.
v3:
* Adjust KMS hotplug test for the change.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4209>
As a follow-up to 87cc6633a5, embed a partial copy of the Adwaita cursor theme
and point to it with XCURSOR_PATH to make the test completely independent
from the installed cursor themes.
Indeed, adwaita-icon-theme changed ever so slightly in version 48 so the
ref tests started failing when the new version was installed.
This is a copy of adwaita-icon-theme 47, which is what was used to generate
the ref images.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4252>
This requires reverting the previous changes intended for adapting to
triple buffering.
Fixes these tests randomly failing, also in CI pipelines of MRs not
directly related to any of this.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4290>
Bash can be in both /usr/bin/bash or /bin/bash (or elsewhere!) depending on
the distro, so let's be generic using env to figure it out.
This comes from a packaging lintian error we get:
E: mutter-16-tests: wrong-path-for-interpreter /usr/bin/bash != /bin/bash
[usr/share/mutter-16/tests/socket-launch.sh]
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4288>
It tests that the cursor renderer can successfully initialize with the
environment variable MUTTER_DEBUG_DISABLE_HW_CURSORS=1.
It would have caught the crash fixed by the previous commit.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4272>
We want to ensure that also the stderr is matching our golden files
and at the same time we should be able to see it in logs (especially
when there's a python error to catch).
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4277>
Moving the key focus to the stage should be done by unsetting the
focus rather than setting it to the stage itself.
`clutter_stage_set_key_focus()` already "normalizes" the stage to
NULL internally, so this does not change the actual behavior of the
code.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4256>
While the existing `get_key_focus()` methods looks like a getter of the
`key-focus` property and is detected as such by gobject introspection,
it behaves differently in that it returns the stage if no explicit
focus has been set.
This is about to change, so adjust the couple of cases that rely
on the fallback to the stage.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4256>
HDR being enabled was controlled by toggling a property on
org.gnome.Mutter.DebugControl, which affected how the color space and
HDR metadata of the output was configured. Replace this with a higher
level MetaMonitor / MetaOutput level "color mode" enum, that is also
reflected in the monitor configuration API.
This enum is then used to derive the color space and HDR metadata at the
lower level where it matters. The ForceHDR debug control property is
still left there, as it only affects the color space and transfer
function of the view related to a monitor.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4192>
This page does not seem to have been archived properly when the wiki got
shut down so the link does not work anymore. There is no replacement
page in the handbook either.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4229>
The reference images were generated using the Adwaita theme, so make sure that
the test client also draws a cursrom from the Adwaita theme rather than reading the
default theme from the environment.
Ideally the test suite would embed the cursor theme and point XCURSOR_PATH to
it, so that even if the Adwaita icon theme changes in the future the test
wouldn't suddently break; I did not implement this yet.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4225>
Move the wrapper functionality where it is actually used, use a single
mechanism to determine if we're already in a dbus-runner environment and
make the mocked launching simpler.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4022>
Allowing to disable font rendering integration, making it possible to
build Mutter without pango/harfbuzz/fribidi dependencies.
This commit also adds a new clutter-pango header that is used to include
pango specific bits.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
This makes it possible to use udev even for backends which are not
native. Specifically we want to start controling backlights in mutter
which has to happen for both native and X11.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>