1
0
Fork 0
Commit graph

32715 commits

Author SHA1 Message Date
Bilal Elmoussaoui
faa0860e9d window: Get Backend from actor's associated context
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
b252b9585f tests/ref-test: Get Backend from actor's associated context
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
07431d1abc tests/clutter: Add a helper for getting the default seat
As it is widely used in the tests, simplifies future changes like
the previous one

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
c1e9711a83 tests: Use helper to get ClutterBackend
Instead of using the get_default API, which goes through
the Context.get_default that we want to get rid of

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
1abbfb5ed2 clutter/context: Create a Settings when constructed
Instead of removing Settings.get_default, we mark it as deprecated
as a lot of extensions seems to use it

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
8013049130 clutter: Stop using Settings.get_default
Instead, get it from the context. See next commit
For ClutterText, we had to switch to using constructed
as the ClutterContext will be set for the ClutterActor in the
constructor phase

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
8a71c89442 clutter/backend: Keep a back pointer to the Context
Will be useful in the upcoming commits

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
b02a29fee7 clutter/context: Add API to get the corresponding Settings
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Jonas Ådahl
66a45809fa kms/impl-device: Disarm deadline timer when disabling
Otherwise we'll end up firing when not expected to, e.g. when the screen
is locked and monitors are all turned off.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3629
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3982>
2024-08-29 09:23:07 +00:00
Jonas Ådahl
1d87bcaab2 kms/impl-device: Put deadline timer disarming in a helper
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3982>
2024-08-29 09:23:07 +00:00
Florian Müllner
d017bf3af7 ci: Replace asciidoc in image
gnome-shell switched to rst2man to generate its man pages, so
we can drop asciidoc from the image.

It's unclear (at least to me) what's currently pulling in rst2man,
so it seems safer to explicitly pull that in ourselves.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3983>
2024-08-29 01:42:27 +02:00
Florian Müllner
8553ca0c2f ci: Don't explicitly pull in libdisplay-info
Fedora's mutter package switched to libdisplay-info a while ago,
so builddep already covers it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3983>
2024-08-29 00:40:38 +02:00
Florian Müllner
89a4538f48 ci: Remove unused dependency
libgcrypt was included in commit d3a7e9a7b5 to build a newer
version of gcr. Since the gcr dependency is satisfied by the
distro package again, we don't need its build dependencies
anymore.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3983>
2024-08-29 00:40:21 +02:00
Georges Basile Stavracas Neto
690564277c frames: Load libadwaita on GNOME
Or, optionally, when the MUTTER_FRAMES_PLATFORM_LIBRARY env var is set
to "adwaita". For debugging purposes, it is possible to disable loading
any platform library with MUTTER_FRAMES_PLATFORM_LIBRARY set to "none".

Add the CSS class "ssd-frame" to the MetaFrame (i.e. GtkWindow)
instances
as that lets libadwaita pick the right style, and won't do anything for
non-Adwaita styles.

This patch is specially careful not to link against libadwaita.

Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/2830

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3981>
2024-08-28 15:29:22 +00:00
Jonas Ådahl
fb588bcb29 tests/dbus-runner: Remove support for service launching via env vars
It's no longer used, as the previous usage was replaced by socket
activation.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
39ba9c4c65 ci: Run installed tests when running the dist job
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
4fe6a5fad9 tests: Install most tests
Tests that needs to run in a virtual machine are excluded.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
51b2a9a500 tests/dbus-runner: Launch pipewire via socket activation
Launching pipewire and wireplumber is racy, as there is an arbitrary
amount of time between pipewire is launched, and that the socket is
bound.

In order to eliminate this race, bind the pipewire sockets ourselves,
and launch pipewire (and wireplumber) when there is activity on the
socket. This is using the systemd method of doing socket activation,
which consists of passing the number of passed file descriptors via
$LISTEN_FDS, and the pid of the launchee via $LISTEN_PID.

The former is easy, just pass the file descriptors, but the former is
more tricky when using python, as executing code before exec() is poorly
supported and likely to be deprecated. To address this, socket
activation services are wrapped in a socket-launch.sh helper which sets
the $LISTEN_PID to itself before calling exec().

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
c2683a20a6 tests/dbus-runner: Use named arguments during setup
Will be a bit nice when more arguments are added.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
6b0f7294db tests/dbus-runner: Move service launching into helper
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
63b59dfa89 tests/dbus-runner: Avoided nested service launch lists
list = ['one']
list.append('two,three'.split(','))

results in ['one', ['two', 'three']]

while

list += 'two,three'.split(',')

results in ['one', 'two', 'three']

which is what is expected.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
b2e1f968d9 tests/dbus-runner: Log more about service management
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
d4d5cd2dc1 tests/installed-dbus-session: Add --compile-schemas
This will run glib-compile-schemas in the test data directory.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
d9ead43270 tests/dbus-runner: Allow setting custom parser state and environment
This will be useful for the installed tests runner, which for some tests
need custom actions that needs to change the environment the test run
in.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
d9b6101b15 tests: Split up 'native-unit' test
It had three different parts that deserve their own actual test cases
  * virtual monitors
  * screen casting
  * bezier

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
1a0be0232a tests: Include 'src/tests' in G_TEST_BUILDDIR
This will help with finding executables in installed tests.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
1d724e7e9d tests/ref-test: Warn if mkdir failed
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
e53bdc4416 tests/ref-test: Set output dir via env var
While when running with meson, we want the output to be in meson-logs
for convenience, such a path isn't feasible when running as an installed
test. To address this, make the destination path configurable via an
environment variable.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
7d4db86804 tests/installed: Don't duplicate environment sanity
Tests are run via the mutter_dbusrunner.py helper, which handles setting
the gsettings backend, runtime dir etc, so rely on that.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
ecf79ce6cb tests/build: Move installed tests description to the the end
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
50e667b29b tests/stacking: Replace a couple of sleep;assert_focused with wait_focused
This should hopefully get rid of race conditions in those tests.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Jonas Ådahl
7637627e01 tests/test-runner: Add 'wait_focused' command
This aims to replace a reoccuring arbitrary sleep followed by a focus
assertion. The problem with these is that the sleep does not reliably
wait for long enough, due to arbitrary system resource usage in CI and
elsewhere. By instead waiting, and instead asserting we don't have any
intermediate wrong focus, we remove the race, and test for more invalid
situations.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3973>
2024-08-28 14:57:51 +00:00
Michel Dänzer
c2621eca15 onscreen/native: Set latest cogl sync_fd on KMS update
See previous commit log on the effects of this.

This means the deadline evasion needs to be added in both cases in
clutter_frame_clock_notify_presented.

v2:
* Use meta_kms_update_set_sync_fd. (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3958>
2024-08-28 14:42:38 +00:00
Michel Dänzer
996eb4b6ae kms/impl-device: Handle sync_fd in meta_kms_impl_device_handle_update
If the KMS thread is using the deadline timer, and a valid sync_file
descriptor is passed in:

1. The update is deferred, and the deadline timer is left armed, until
   the sync_fd signals (becomes readable).
2. Implicit synchronization is disabled for the KMS update.

This means cursor updates should no longer miss a display refresh
cycle due to mutter's compositing GPU work finishing too late.

v2:
* Use g_autoptr for GSource in meta_kms_impl_device_handle_update.
  (Sebastian Wick)
v3:
* Use meta_kms_update_get_sync_fd, don't track sync_fd in
  CrtcFrame::submitted_update. (Jonas Ådahl)
v4:
* Clean up CrtcFrame::submitted_update members in crtc_frame_free.
v5:
* Coding style cleanup in meta_kms_impl_device_handle_update.
  (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3958>
2024-08-28 14:42:38 +00:00
Michel Dänzer
369596a82b kms/update: Add meta_kms_update_get/set_sync_fd
v2:
* Use g_steal_fd in meta_kms_update_merge_from. (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3958>
2024-08-28 14:42:38 +00:00
Michel Dänzer
452e4fbf70 kms/plane: Rename META_KMS_ASSIGN_PLANE_FLAG_DIRECT_SCANOUT
To META_KMS_ASSIGN_PLANE_FLAG_DISABLE_IMPLICIT_SYNC. This describes the
effect of the flag, instead of the circumstances it's currently used
for.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3958>
2024-08-28 14:42:38 +00:00
Michel Dänzer
a589456209 kms/crtc: Conditionally return 0 in meta_kms_crtc_get_deadline_evasion
If both crtc->shortterm_max_dispatch_duration_us and
crtc->deadline_evasion_us are 0, i.e. we're not using the deadline
timer.

v2:
* Fix coding style. (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3958>
2024-08-28 14:42:38 +00:00
Christian Hergert
030270ba3b compositor: Mark window drag actor invisible
If the window_drag->handle ClutterActor:visible property is FALSE,
then we avoid a full-framebuffer damage on the monitor when beginning
and ending a drag.

Testing with `mutter --wayland --display-server` still shows a full-
framebuffer damage on the first drag, but that appears to be unrelated
to this. Subsequent full-framebuffer damage which would occur on
drag-begin and drag-end have been elided.

Related: #3630
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3975>
2024-08-28 14:25:15 +00:00
Sebastian Wick
757f8b6d69 wayland/surface-role: Keep track of the surface main monitor
Toplevels get the main monitor from their MetaWindow and have no main
monitor when the toplevel is not mapped.

Subsurfaces get the main monitor from their parent surface.

DnD and cursors get the main monitor from the current cursor position no
matter if the cursor is actually being shown or not.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3941>
2024-08-27 23:22:21 +02:00
Sebastian Wick
fe17e717c3 wayland-surface: Add a main-monitor property
The main monitor is role dependent. For a toplevel this comes from the
MetaWindow main monitor, for a subsurface from the parent surface, for
pointer and dnd from the cursor position.

The next commit will use meta_wayland_surface_set_main_monitor in the
different roles to keep the property up-to-date.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3941>
2024-08-27 23:22:21 +02:00
Sebastian Wick
586fd41a7e feedback-actor: Remove unused meta_feedback_actor_update
We removed the last user in the previous commit.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3941>
2024-08-27 19:16:36 +02:00
Sebastian Wick
20cf5fb02f wayland/data-device: Move position updates to a common function
The function will be expanded in a later commit.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3941>
2024-08-27 19:16:36 +02:00
Sebastian Wick
035bbb3250 wayland/data-device: Remove unused drag_grab_update_feedback_actor
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3941>
2024-08-27 19:16:36 +02:00
Sebastian Wick
a43dbd46fb cursor: Fix set_property vfunc name
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3941>
2024-08-27 19:16:36 +02:00
Quentin PAGÈS
d5e72ff24d Update Occitan translation 2024-08-26 15:41:53 +00:00
Daniel van Vugt
dc637e95ac tests/monitor-unit: Use the correct XML syntax
Fixes: 4175a37e4c ("tests/monitor-unit: Add layout mode migration tests")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3976>
2024-08-23 12:01:09 +08:00
Daniel van Vugt
3eebe2592a monitor-config-store: Fix typos in <layoutmode> written to monitors.xml
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3635
Fixes: 076b3664a3 ("monitor-config-store: Store and load layout mode for each configuration")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3976>
2024-08-23 11:32:19 +08:00
Bilal Elmoussaoui
70dc8cabac clutter/settings: Remove unused fontconfig-timestamp property
As a writable property, nothing sets it in both Mutter/GNOME Shell
making it a dead-code. As we will be moving pango related bits to
gnome-shell, remove this one already

Removes pango-ft2 dependency

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3969>
2024-08-22 19:09:51 +00:00
Florian Müllner
da828c2fcc x11/input-device: Stop using deprecated libwacom API
libwacom_has_ring/ring2 was deprecated. Switch to the replacement
function where it is available.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3974>
2024-08-22 18:48:36 +00:00
Florian Müllner
98e7197511 build: Replace unnecessary get_compiler() call
We already have a variable with the compiler object.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3974>
2024-08-22 18:48:36 +00:00