1
0
Fork 0
Commit graph

32744 commits

Author SHA1 Message Date
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
Bilal Elmoussaoui
60edafe3eb cogl/pango: Drop mipmapping API/env variables
As GNOME Shell always sets that to FALSE anyways
This does not drop the separate caching whether the mipmapping is
disabled or not, in case shell wants to make use of that in the future

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:01 +00:00
Bilal Elmoussaoui
5176a828eb core/util: Drop duplicated MetaLocaleDirection
Clutter has an enum for that already, just use it instead of mapping between the types

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:01 +00:00
Bilal Elmoussaoui
4f606261d3 clutter: Remove unused get_font_map
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:01 +00:00
Bilal Elmoussaoui
39da6e10fa clutter/context: Move get_show_fps to it correct namespace
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:01 +00:00
Bilal Elmoussaoui
078bbd82c8 clutter: Export Context header
As otherwise, GNOME Shell canno't make use of the public APIs, especially the
future Context.get_settings / Context.get_text_direction for example

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:01 +00:00
Bilal Elmoussaoui
8291b2d6d0 clutter/context: Free the stage manager
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:01 +00:00
Bilal Elmoussaoui
0d93f805d4 clutter/context: Create a StageManager when constructed
Instead of delegating that to StageManager.get_default and add a private getter
for it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:01 +00:00
Bilal Elmoussaoui
914787294f clutter/stage-manager: Mark as private type
Nothing is supposed to interact with it externally

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:01 +00:00
Bilal Elmoussaoui
09c7c2bf7b clutter/stage-manager: Remove unused APIs
As the type will be made private in future commits

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:01 +00:00
Bilal Elmoussaoui
5391ab56e8 clutter/stage-manager: Mark as final
It is not something that can be replaced

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:00 +00:00
Bilal Elmoussaoui
3fb1c9ab21 clutter/context: Remove unused is_initalized
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:00 +00:00
Bilal Elmoussaoui
3453a6e51f clutter/stage-manager: Remove unused default-stage
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3962>
2024-08-22 16:45:00 +00:00
Sebastian Wick
d1750e5bdb build: Enable libdisplay-info by default
So far libdisplay-info has only been used when it was available. This
change requires either libdisplay-info to be available or the user to
explicitly disable it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3971>
2024-08-22 14:26:51 +02:00
Sebastian Wick
41f0194280 tests: Start pipewire and wireplumber for the native-unit test
So far, the tests relied on the host system to provide pipewire and
wireplumber. This seperates the tests from the host system which is
especially useful if the tests are run in a toolbox which has a
different pipewire installed than the host. It also should make it
harder to have a mismatch between the pipewire library and the pipewire
daemon.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3966>
2024-08-22 08:51:56 +00:00
Sebastian Wick
7bcc8c19cb build: Remove unused CI test setup
The CI uses the default and plain setups but not the CI one. Let's
remove it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3966>
2024-08-22 08:51:56 +00:00
José Expósito
c7acd6074b wayland/drm-lease: Fix list initialization bug
The new_connectors list must be initialized empty, otherwise, connectors
are duplicated.

Fixes: 115b2c1247 ("wayland/drm-lease: Make MetaDrmLeaseManager::connectors a GList")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3967>
2024-08-21 12:47:57 +00:00
Jonas Ådahl
d2be0b6950 kms: Inhibit real time scheduling until initial mode set
We're already inhibiting real time scheduling when reading new KMS state
after hot plugs, as well as when during mode sets, due to the kernel not
being able to reliably handle these within the 250 ms limit. However, we
didn't do this during initial probing, which meant that occasionally
we'd run into these kind of issues during startup.

Handle this by always inhibiting real time scheduling up front, and
don't uninhibit until all initially discovered device have finished
processing their initial mode set.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3628
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3960>
2024-08-21 12:15:59 +00:00
Peter Hutterer
d866590b78 wayland: Set current tool surface to NULL on prox-out
If an application is maximised, clutter_stage_pick_and_update_device()
goes into the
        if ((flags & CLUTTER_DEVICE_UPDATE_IGNORE_CACHE) == 0)
condition and returns the current actor for the device. This means no
CLUTTER_LEAVE/ENTER events are generated and in turn means the focus is
never invalidated and updated.

This leads to tool->focus_surface always being NULL and all events are
discarded.

Notably, tool->current is set to the right surface but
that one never changes either so meta_wayland_tablet_tool_set_current_surface()
exits early too because surface == tool->current and we thus never call
meta_wayland_input_invalidate_focus().

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3616
Fixes: fb8ac5dff7 ("wayland: Track current tablet tool focus surface")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3956>
2024-08-21 10:21:33 +00:00
Martin Abente Lahaye
eaa416904d ci: Bump CI/CD component version for building system extensions
This new version allows us to specify a branch,  which will be needed
soon to freeze the GNOME OS version used in stable branches e.g. once
GNOME OS 47 is available.

See https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/872

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3963>
2024-08-20 12:23:58 -04:00
Peter Hutterer
c03e64ef1d wayland: Propagate a tablet's DEVICE_REMOVED to trigger the signals
Clutter's "device-removed" signal is sent in
clutter_seat_handle_event_post(). Our tablet code is set up to handle
that signal to then notify wayland clients of removed tablet devices.

However, returning CLUTTER_EVENT_STOP for a DEVICE_REMOVED event means
we never get to the point where we send out the signals and thus never
remove the tablets.

Fixes: a37fd34bbb ("wayland: Make MetaWaylandSeat in charge of its own tablet seat")

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3615
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3955>
2024-08-20 14:06:32 +00:00
Carlos Garnacho
ae35c1efe0 core: Use event return value defines in keybinding code
Make the fate of the given event in every return path more
evident.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3935>
2024-08-20 10:50:06 +00:00