33430 Commits

Author SHA1 Message Date
Mattia Formichetti
e1cf5352a6 core/stack: Get workspace_manager from display whenever possible
Simplifies meta_stack_update_layer and meta_stack_update_transient

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4183>
2025-02-26 10:03:18 +00:00
Mattia Formichetti
e591850206 core/stack: Reformat stack.c
This commit only reformats stack.c, mostly following uncrustify's output.
No functional change intended.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4183>
2025-02-26 10:03:18 +00:00
Keyu Tao
57698c2689 wayland/text-input: Reset focus state when destroying text_input
When closing some wayland apps using text-input-v3, text_input_destructor
could remove resource in focus_resource_list without resetting focus.

This could be an issue if, the focus is on a wayland app not using text-
input-v3 after closing those. Text committing would fail, and the
candidate window would always show on previous entry.

This commit adds check in text_input_destructor, resetting focus if
necessary.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4776
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4164>
2025-02-26 09:44:50 +00:00
José Expósito
54c606ed8e gdctl: Allow to lease monitors
Add a new option (--for-lease-monitor) to allow to set a monitor that is
not part of any logical monitor as available for lease.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4300>
2025-02-26 08:34:56 +00:00
José Expósito
70de6901dc gdctl: Fix transform example
The text reads "transformed by 270 degrees" but the corresponding flag
is missing.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4300>
2025-02-26 08:34:56 +00:00
Joan Torres
5a984292a5 tests/clutter: Add color-state-transform test
The steps for this test:
  * For each testing color create an actor and assign the color to it.
  * Create a src_color_state and set it to all actors.
  * Create a target_color_state and set it to the stage_view.
  * Wait for paint.
  * Read the color for each actor which will be different after the
    color-state transformation.
  * Do the same transformation on CPU for each test color.
  * Validate that the resulting colors match.

In the future this test will be extended to compare transformations
between color_state_params and color_state_icc.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4230>
2025-02-25 18:28:49 +00:00
Joan Torres
9022b39a50 clutter/color-state: Add do_transform method
This is a CPU-based transformation method that performs the
same transformation implemented on GPU shaders.

The transformation gets an array of pixels in RGB float format and
returns an array of pixels transformed.

This will be used in the next commit to compare the results
between CPU and GPU, validating the shader implementations.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4230>
2025-02-25 18:28:49 +00:00
Joan Torres
ca977ce2bb clutter/color-state-params: Avoid implicit cast from int to float
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4230>
2025-02-25 18:28:49 +00:00
Joan Torres
593eb66b36 clutter/color-state-params: Fix bt709 snippet
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4230>
2025-02-25 18:28:49 +00:00
Jonas Ådahl
1d88f82d0d gdctl: Use Dimenison.__str__() to print mode dimension
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4302>
2025-02-25 12:22:48 +00:00
Jonas Ådahl
078ba5ea88 gdctl: Make MonitorMode.dimension an actual Dimension
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4302>
2025-02-25 12:22:48 +00:00
Jonas Ådahl
c9c7768418 gdctl: Add __str__(self) for Dimension too
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4302>
2025-02-25 12:22:48 +00:00
Jonas Ådahl
414156d0a1 gdctl: Fix printing Position
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4302>
2025-02-25 12:22:48 +00:00
Jonas Ådahl
edb91a3cc6 udev: Don't ignore drm devices with mismatching seat when headless
The seat we'll have is not a real seat, so lets not filter out drm
devices when running headlessly.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3912
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4281>
2025-02-25 08:21:17 +00:00
Sebastian Wick
b7e6f6d144 cogl: Get the authority for vertex/fragment_snippets_state_equal
They expect the authority of the pipeline, which is not necessarily the
pipeline we're operating on.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3924
Fixes: 5e98ee5dbe ("cogl: Add pipeline hooks to user program pipelines")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4298>
2025-02-25 03:27:27 +00:00
Sebastian Wick
d8512767ea color-device: Update the color device on force-hdr debug-control changes
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4298>
2025-02-25 03:27:27 +00:00
Sebastian Wick
74f8e83154 wayland/color-management: Enable support for EXT_LINEAR tf
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4291>
2025-02-25 02:40:17 +00:00
Sebastian Wick
8fb2a8a4b8 wayland/color-management: Expose the protocol by default
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4291>
2025-02-25 02:40:17 +00:00
Sebastian Wick
4fe1e41ab3 wayland/color-management: Update to upstream wp_color_management_v1
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4291>
2025-02-25 02:40:17 +00:00
Sebastian Wick
b1ef99bf23 build: Reorder wayland protocol alphabetically
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4291>
2025-02-25 02:40:17 +00:00
Lukáš Tyrychtr
5eaed6e3f3 core: Let the MetaA11yManager handle keyboard events
Plumb the MetaA11yManager into key event handling. This manager
is partly in control of keyboard event propagation, depending on
the screen readers connected.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
a817d7c137 core: Add a debug control override to disable the a11y manager ACL
This commit adds another way how to disable the a11y manager ACL in development.
Setting the unsafe mode might not be as straightforward as setting an
environment variable for the session, and you can control it invidually too.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
1c34794b13 backends: Add D-Bus access control helper
Track unique DBus senders and allow only thse which own a (at least so far)
pre-defined set of well known DBus names.

Carlos Garnacho: Renamed to a more generic helper, use g_bus_watch_name().

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
20c9b8cf0c backends: Add a11y interface methods to subscribe to key event input
This adds a pair of methods to signal an interest in receiving
all key events without grabbing them, e. g. the previously expected behavior
by screen readers.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
800981c40c backends: Add method to pass key events to screen readers
Accessibility shortcuts and keyboard grabs need to be consumed,
and key events propagated to screen readers. Add a function that
does it all at once.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
45f6bed780 backends/native: Propagate a11y modifiers from MetaA11yManager
Listen to changes in MetaA11yManager configured modifiers, and propagate
these along to the MetaSeatNative. This lets the backend keep track of
configuration changes in a11y modifiers.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
1498724774 backends: Add MetaA11yManager method to get configured a11y modifiers
The ::a11y-modifiers-change method allows tracking for changes in the
configured modifiers, add this method to allow backends to get the
modifiers so that they can be passed along the lower layers.

Carlos Garnacho: Turn into a method instead of a signal argument, turn
into an array+length instead of a hashtable.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
0bcda4ecf4 backends: Implement A11y monitor interface
Implement the org.freedesktop.a11y.KeyboardMonitor interface,
allowing screen readers to interact with Mutter and grab
shortcuts or full keyboard interaction.

Carlos Garnacho: Move setup to ::constructed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
f4ce1e8a46 backends: Manage MetaA11yManager in MetaBackend
The MetaBackend will own the MetaA11yManager, being actually
put to use in backend implementations.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
c0c4524452 backends: Add MetaA11yManager
This a11y manager will handle key event emission to screen
readers and other ATs. This initial commit only introduces
the object.

Carlos Garnacho: Make the object take a ::backend property

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
8c52e243c0 backends/native: Plumb a11y modifiers through MetaSeatNative
These modifiers will be set by the backend from the main thread, and
need to be handled specially for them to be usable as both modifier
buttons, and their own regular action.

Carlos Garnacho: pass modifiers as array+lenght instead of hashtable.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
d867964139 backends/native: Handle a11y modifier presses in MetaSeatImpl
The state handling about whether the a11y modifier is a first press (so
could be consumed for other actions), or results in the modifier action
(e.g. caps lock) is performed in the input thread. This information will
be propagated through the CLUTTER_EVENT_FLAG_A11Y_MODIFIER_FIRST_CLICK
flag in the related key events.

Carlos Garnacho: Drop synchronous wait for configuration changes

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
d3a0bbdf52 clutter: Add ClutterEventFlag to notify a11y modifier click
Use a Clutter event flag to communicate the the fact that the event
is an a11y modifier first click. The accessibility modifiers will
require special handling in the input and main threads.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Lukáš Tyrychtr
84fc62a280 data: Introduce the DBus interface description for the a11y manager
This object will for now only provide a way for assistive technologies
to receive keyboard events, however it is expected that it will be used for
the new a11y communication protocol in the future.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4217>
2025-02-25 02:14:46 +00:00
Luming Zh
cd43ca3e50 Update Chinese (China) translation 2025-02-25 01:22:12 +00:00
Danial Behzadi
ac702da412 Update Persian translation 2025-02-24 15:50:38 +00:00
Yosef Or Boczko
b9e4aa544c Update Hebrew translation 2025-02-24 15:04:34 +00:00
Yuri Chornoivan
be5c9c9fed Update Ukrainian translation 2025-02-24 14:17:35 +00:00
Daniel van Vugt
ef43bec374 tests/kms: Ignore real GPUs when only VKMS is wanted
This prevents spurious test failures on machines with a real GPU as
well as VKMS.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4274>
2025-02-24 07:47:48 +00:00
Jordi Mas
f0993312e5 Update Catalan translation 2025-02-23 21:30:39 +01:00
Alexandre Franke
a955d55ccb Update French translation 2025-02-23 09:41:50 +00:00
Alexander Shopov
707fb18dff Update Bulgarian translation 2025-02-23 08:43:37 +00:00
Ekaterine Papava
7fb06018f8 Update Georgian translation 2025-02-23 06:02:41 +00:00
Jürgen Benvenuti
666a423f31 Update German translation 2025-02-22 18:58:31 +00:00
Piotr Drąg
2458383b19 Update Polish translation 2025-02-22 12:57:26 +01:00
Daniel Rusek
ba3aeb0017 Update Czech translation 2025-02-20 21:26:10 +00:00
Peter Hutterer
aaf6c88226 input-settings/native: Default to sticky drag lock
libinput 1.27 added a new "sticky" mode to the tap-and-drag drag lock -
the previous mode is now called the "timeout" mode.

In sticky mode the drag lock is explicitly terminated with an extra tap,
i.e. a full sequence is:
        tap, down, [:move, up, wait, down:], up, tap
where the middle part can repeat and/or wait as long as required.

In the previous "timeout" mode the drag lock would automatically release
after a timeout - for users with low dexterity this timeout may be too
short.

The sticky mode is also how macos does drag lock.

Related: https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2798
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4292>
2025-02-20 10:48:19 +00:00
Daniel van Vugt
045342eb5a onscreen/native: Prefer gbm_surface_create_with_modifiers even for linear
The Nvidia driver doesn't implement `gbm_surface_create` properly,
which was first mentioned in 9fee3a9ec1. So using `gbm_surface_create`
as a fallback for the linear case was failing with ENOSYS (Function not
implemented).

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

Fixes: 163520c177 ("onscreen/native: Do not use modifiers if surface should be sharable")

See also: https://forums.developer.nvidia.com/t/gbm-surface-create-fails-if-flags-0/279951

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4284>
2025-02-19 19:33:01 +00:00
Mattia Formichetti
db955eccc7 tests/stacking: Account for cascading in always-on-top-map-new-partial
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>
2025-02-19 19:20:38 +00:00
Mattia Formichetti
4d280086fe core/place: Fix and enable centered find_next_cascade
We use place_centered to start the cascade from the center of the
usable work_area; sorting now takes either the top left or top right window
corner as a reference using window_distance_cmp.

Helps: https://gitlab.gnome.org/GNOME/mutter/-/issues/2123
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4202>
2025-02-19 19:20:38 +00:00