1
0
Fork 0
Commit graph

32741 commits

Author SHA1 Message Date
Joan Torres
95c9ba514d clutter/color-state: Add ClutterPrimaries
These primaries allow defining different colorspaces apart from the
known ones.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3948>
2024-09-23 20:33:18 +00:00
Joan Torres
49c01ca6a5 clutter/color-state: Set colorspace transform matrix as uniform
This is because next commits will generate the colorspace
mapping matrix from the colorspace primaries and won't be required
to define any color space mapping matrix.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3948>
2024-09-23 20:33:18 +00:00
Joan Torres
c05e3e74ac wayland/single-pixel-buffer: Use higher precision pixel formats
The single pixel buffer allows setting colors with 32 bpc.

Attempt to use pixel formats that allow higher precision than BGRA_8888.

First attempt to use half float format, fallback to ABGR_2101010 and
finally fallback to BGRA_8888.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3913>
2024-09-23 20:21:38 +00:00
José Expósito
3199d4bbb8 wayland/drm-lease: Do not add connector twice on lease disappeared
lease_disappeared() was calling meta_drm_lease_disappeared() and
set_connectors_as_available().

meta_drm_lease_disappeared() emits the "revoked" signal, connected to
on_lease_revoked(), which marks the leased connectors as available by
calling set_connectors_as_available().

Therefore, calling set_connectors_as_available() again from
lease_disappeared() is redundant.

Remove the redundant call to set_connectors_as_available() and drop two
unused functions.

Fixes: fc44437876 ("wayland/drm-lease: Withdrawn leased connectors")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3675
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4029>
2024-09-23 20:10:02 +00:00
Florian Müllner
4795e23f2c build: Bump API version
We have branched, so bump the API version for GNOME 48.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4042>
2024-09-23 13:00:51 +02:00
Florian Müllner
625965d956 ci: Rebase image to F41
Fedora has branched, so we can use the newer F41 as base of our
CI image to reduce the number of custom built components.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4040>
2024-09-20 18:06:26 +00:00
Florian Müllner
313a438a7c ci: Remove problematic vulkan driver
The powervr vulkan driver interferes with proper functioning
of the CI, so drop it.

See https://gitlab.gnome.org/GNOME/gtk/-/commit/7814d1fd759118f2f.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4040>
2024-09-20 18:06:26 +00:00
Florian Müllner
bf9cad0753 ci: Include vulkan drivers
GTK switched its default backend to vulkan, so we need the
corresponding drivers (or force an alternative GSK renderer
in tests)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4040>
2024-09-20 18:06:26 +00:00
Florian Müllner
11fca7df25 ci: Remove libX11 downgrade
https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/264
landed upstream and was backported in Fedora, so the tests should
work again with the libX11 version that is pulled in automatically.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4040>
2024-09-20 18:06:26 +00:00
Jürgen Benvenuti
f3e1e618a4 Update German translation 2024-09-20 17:28:17 +00:00
Daniel van Vugt
338bd62708 cogl/gles: Don't initialize glGetStringi
We never use it for ES, and for good reason: It only exists in ES 3.0
while our ES path only supports 2.0.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4019>
2024-09-20 15:29:06 +00:00
Daniel van Vugt
010d68ed5a cogl/gl: Don't initialize potentially unused/unsupported functions
`_cogl_context_get_gl_extensions` is their only user and it only uses
them for GL 3.0 so do the GL version check first.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4019>
2024-09-20 15:29:06 +00:00
Daniel van Vugt
390dd63341 cogl: Don't _cogl_context_get_gl_extensions before check_gl_version
Because for `COGL_DRIVER_GL3`, `_cogl_context_get_gl_extensions` needs to
know that the GL version *really* is >= 3.0 before it calls `glGetStringi`
which didn't exist prior to GL 3.0 or ES 3.0.

This was causing crashes on Xilinx Mali implementations that only support
ES 2.0 (hence `glGetStringi` == NULL), but were being forced to call
that function before the GL version check which should tell you the
function isn't supported.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4019>
2024-09-20 15:29:05 +00:00
Daniel van Vugt
656b836c62 cogl/egl: Restore support for EGL 1.4
It was dropped in 46.0 (683e917854) but we've now found that Xilinx Mali
only implements a strict interpretation of 1.4 [1] which doesn't support
looking up core functions [2] such as `glGetString`.

[1] https://github.com/Xilinx/mali-userspace-binaries/blob/master/Standards.txt
[2] https://registry.khronos.org/EGL/specs/eglspec.1.4.pdf § 3.10

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4019>
2024-09-20 15:29:05 +00:00
Jonas Ådahl
3bc3740a9e wayland/tablet-tool: Fix grabbing tablet devices
The NULL check was inverted, meaning we'd grab with no leader device.
That meant updates coming from the what-should-have-been leader device
getting lost because incorrectly being classified as non-leader of
the grab.

Fix this by only allowing to grab if we have a device, and always mark
the current tool device as the grab leader.

Fixes: e4004a7c4f ("wayland: Use the tool's current_tablet device instead of caching it")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4033>
2024-09-19 07:26:54 +00:00
Sebastian Wick
2ce64ac0c3 cogl/gles: Use unsized internal formats for RGB8, RGBA8 in GLES 2.0
GLES 2.0 does not have RGB8 and RGBA8 as sized internal formats. There
is OES_rgb8_rgba8 which adds RGB8 and RGBA8 but only for
RenderbufferStorageOES and not for TexImage2D which I wrongly assumed.
It seems like there is currently no GLES2 extension which adds RGB8 and
RGBA8 to TexImage2D so we have no choice but to fall back to unsized
internal formats in those cases as long as we don't want to drop GLES2
support.

This should be fine in practice and we should get our 8bpc textures.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3680
Fixes: 7f943613a8 ("cogl: Use sized internal renderable formats")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4036>
2024-09-19 04:48:03 +00:00
Daniel Mustieles
846fc458d3 Update Spanish translation 2024-09-18 10:04:00 +00:00
Jordi Mas i Hernandez
ee7795adcc Update Catalan translation 2024-09-18 05:11:36 +00:00
Joan Torres
e8a9d3a68e wayland/color-management: Fix SIGSEGV on dispose
meta_wayland_color_management_dispose func is only called when the compositor
is shutting down, in that case the wl_globals are already automatically removed.

meta_wayland_color_management_dispose calls wl_global_remove again,
this makes a SIGSEGV when color_management is enabled and mutter is being
shut down.

Stop calling wl_global_remove to fix it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4032>
2024-09-17 11:46:56 +00:00
Christian Hergert
971bf15f26 x11: Reduce chances XPending does recvmsg() syscall
XPending() will do a recvmsg() syscall if there are no items in the queue.
In most cases, this is unnecessary because we know that there is data to be
read of the connection or there are items already read which simply need
to be processed.

Discovering both of those conditions can be done without recvmsg() in the
hot paths.

Before this path, every iteration of the main loop had the potential to
submit a recvmsg() syscall. This reduces that overhead drastically.

XFlush() on the other-hand knows if it needs to write data or not and will
do no IO in the case the buffer is empty.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3653
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4006>
2024-09-17 11:12:41 +00:00
Christian Hergert
1247452d19 gwakeup: Reduce wake-ups to only first item in queue
We only need to wake up the other side of the GAsyncQueue if we transition
from 0 to 1 item in the queue. Otherwise, we can be certain that the other
side has received a wakeup and will eventually flush the queue.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4007>
2024-09-17 10:07:07 +00:00
Michel Dänzer
18eb1be491 window/x11: Use g_autoslist (MetaStrut) in meta_window_x11_update_struts
The wrong type resulted in a crash when returning from the function,
because g_slist_free was called instead of g_free for the old_struts
list data pointers.

Fixes: e005d035c0 ("boxes: Define cleanup function for MetaStrut and use auto-pointers")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4028>
2024-09-16 15:11:55 +02:00
Vincent Chatelain
75b8d3a166 Update French translation 2024-09-15 13:30:38 +00:00
Florian Müllner
8b8f052ff9
Bump version to 47.0
Update NEWS.
2024-09-14 22:36:50 +02:00
Jonas Ådahl
e69e4fa6db Revert "wayland: Check focus surface to set a pointer cursor"
This reverts commit b35129db61.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3541
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4026>
2024-09-14 20:21:32 +00:00
Carlos Garnacho
69b6e7ead6 wayland: Save session state in the background in a delayed manner
Track toplevels being saved, and save state some time after. This
will make session state somewhat remembered on shell crashes, as
long as there was time to snapshot the data in disk.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Carlos Garnacho
8b9bf6b051 core: Add async save method to MetaSessionManager
Allow saving the session gvdb file in the background, with as little
overhead in the main thread as possible. We still need to serialize
all created/deserialized MetaSessionState to a GVDB hashtable there,
in order to avoid these being poked from the async task thread.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
8468888508 tests: Add some basic tests for XDG session management
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Carlos Garnacho
6c3c17daa6 tests: Make test context able to create a session manager
And create an empty one when asked for it. This session data is not
saved on disk, except for the purpose of creating an empty file FD.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
74ce36f323 wayland: Implement the XDG session management protocol
The xdg_session_manager_v1 global interface is the generator
of xdg_session_v1 objects for clients. These will notify of an
unique ID that can be used for future instantiations.

Once a xdg_session_v1 object is obtained, toplevels can be added
to be managed by it, and clients may get a hint about whether the
toplevel was restored to a saved state.

Changes by Carlos Garnacho: Integrate with MetaSessionManager core
object. Flesh out event emission of xdg_session_v1 and
xdg_toplevel_session_v1 objects, handle sessions being
replaced/deleted.

Changes by Sebastian Wick:
* make lifetimes of xdg_sessions entirely determined by the wayland and
  handle its destruction via the signal
* fix session destruction vs deletion
* do not drop refcount of replaced session state temporarily to make
  sure the replacing session keeps the state
* disconnect signals of destroyed and replaced sessions
* disconnect window-unmanaging signal handler for
  MetaWaylandXdgToplevelSession
* call wl_resource_destroy in xdg_toplevel_session_remove to make it a
  destructor
* handle session being destroyed before topevel-sessions
* handle the toplevel going away before the topevel-sessions

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Carlos Garnacho
2074e4e146 core: Add debug control setting for session management
We will at the moment want it guarded behind a setting.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Carlos Garnacho
5c30483739 wayland: Add XDG Shell glue to cater for already restored windows
Make the restored state prevail, instead of letting the client still
pick an initial size.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
4a3eb2f992 build: Include a private copy if the session management protocol
This is still being discussed upstream, so will be included as a private
protocol.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
6fa3a91325 wayland: Add MetaWaylandXdgSessionState
This object is a windowing-specific implementation of MetaSessionState,
allowing to save window state for toplevel surfaces of a Wayland client
using the xdg_session_management_v1 protocol.

This object is detached from windowing logic itself, and will be
integrated in later commits.

Changes from Carlos Garnacho: Integrate state serialization with
MetaSessionState and MetaSessionManager.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Carlos Garnacho
920de400f5 core: Make MetaContext manage the MetaSessionManager singleton
Make this core object own the MetaSessionManager, for the window management
code to access.

At this level, we will be able to integrate with systemd notification
system, and use systemd fdstore to keep the mapped memory warm for
us for the case of soft reboot. This is at the moment not implemented
here.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Carlos Garnacho
fa9c70a1d4 core: Add MetaSessionManager
This core object will be the manager of "client sessions", allowing
the windowing-specific paths to generate MetaSessionState objects to
track their clients.

This object is unused at the moment, and will be integrated in later
commits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Carlos Garnacho
c6acf3aef5 core: Add MetaSessionState
This is an abstract base class to implement a "client session",
carrying the accounting of the windows, and allowing to serialize/read
their state into a Gvdb table.

Since different windowing backends may require slightly different
data to be saved for each window, this is meant to have windowing-specific
implementations.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Sebastian Wick
777c89f10d Add debug topic "session-management"
This is used to print debug information for session management.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Carlos Garnacho
837b37170a build: Add gvdb dependency
This library is not shipped standalone and is meant to be used
through subprojects. Add a Meson wrap file for it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
8caa2db139 tests/wayland-test-client-utils: Add custom test state field to display
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
c41a8d539f tests/wayland-test-client: Add 'configure' signal to surface
Useful for tests that want to act on receiving xdg_surface.configure.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
e76b4503cf tests/test-driver: Add tile and move_to requests
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
5ed0245c5c surface: Add API to check whether initial commit has been done
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
c3cfd5266a context: Add 'nick' property
A nick property is a bit similar to the nick of a GObject property, in
that it's a shorter version of the name. It's intended to be used to
store state on the file system, where the state depends on the desktop
environment being used. E.g. gnome-shell sets the name "GNOME Shell",
which is, if no nick is explicitly set, transformed into the nick
"gnome-shell", which will be used for file paths.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3825>
2024-09-14 13:47:21 +00:00
Jonas Ådahl
af250506fb kms/impl-device: Queue result when discarding submitted update
The result will allow adequate state tracking to take place where the
update was posted.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3999>
2024-09-12 14:23:34 +00:00
Michel Dänzer
0d9fd1ead7 kms/impl-device: Destroy submitted update in disarm_all_deadline_timers
And rename it to disarm_all_frame_sources.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3999>
2024-09-12 14:23:34 +00:00
Michel Dänzer
42290730e8 kms/impl-device: Merge in submitted update in process_mode_set_update
This has to be done for all CRTCs of the device, not only those with a
modeset, which requires merging in the pending updates for all CRTCs as
well.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3999>
2024-09-12 14:23:34 +00:00
Michel Dänzer
b2761819e4 kms/impl-device/atomic: Leave implicit sync enabled for modeset updates
Preparation for next commit, which may merge multiple KMS updates with
sync_fds for modesets. Waiting for all sync_fds to signal before
processing the merged KMS update would be rather involved, for now just
leave implicit sync enabled for it. We're still relying on implicit sync
for modesets in general anyway.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3999>
2024-09-12 14:23:34 +00:00
Rūdolfs Mazurs
969f3a5ae4 Update Latvian translation 2024-09-11 19:30:07 +00:00
Peter Hutterer
756992c841 input-settings/native: Use the libinput matrix if we don't have one ourselves
If our calibration matrix (the "area") is the default, use libinput's
default matrix instead. Worst case this is the unity matrix anyway, best
case it uses the matrix set in e.g. the LIBINPUT_CALIBRATION_MATRIX
property.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2939
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3846>
2024-09-11 11:50:08 +00:00