1
0
Fork 0
Commit graph

32531 commits

Author SHA1 Message Date
Bilal Elmoussaoui
7fca771c4e wayland/tablet-seat: Get ClutterBackend from MetaBackend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
182951dea3 compositor/actor: Get ClutterBackend from MetaBackend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
e3f4e735f5 backends/screencast: Get ClutterBackend from MetaBackend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
10f630c4a4 wayland/input: Get ClutterBackend from MetaBackend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
98c36ad1c6 input/action-mapper: Get ClutterBackend from MetaBackend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
102ca86c97 wayland/text-input: Get ClutterBackend from MetaBackend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
251d69f21a wayland/keyboard: Get ClutterBackend from MetaBackend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
9458008863 wayland/pointer: Get ClutterBackend from MetaBackend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
370e7d3157 clutter/text: Get Backend from associated actor context
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
3152b4a3f1 clutter/stage: Get Backend & Context from the associated actor
Had to move the state construction from init to constructed, to ensure
that the Actor's constructor has been executed and Actor.get_context
won't return NULL

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
62da8d7aac clutter: Get CoglContext from a CoglTexture where possible
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
5f5448b180 cogl/texture: Expose Texture.get_context
Would be useful for next commit

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:40 +02:00
Bilal Elmoussaoui
75c7ced752 clutter/text: Get CoglContext from the actor's associated Backend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
bc633280d9 clutter/stage: Get Backend from stage's associated context
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
da625f6dad compositor/sync-ring: Pass around CoglContext
Instead of getting it from the ClutterBackend.get_default

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
Bilal Elmoussaoui
5831a1a555 backends/x11: Get ClutterBackend from MetaBackend
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
2024-08-29 15:26:39 +02:00
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