1
0
Fork 0
Commit graph

32676 commits

Author SHA1 Message Date
Daniel van Vugt
fbfaeb56a6
onscreen/native: Log swapbuffers and N-buffering when MUTTER_DEBUG=kms
Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-09-15 14:31:16 +09:00
Daniel van Vugt
5dc8b2f73a
backends/native: Add set/get_damage functions to MetaFrameNative
Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-09-15 14:31:16 +09:00
Daniel van Vugt
d4e9b1f8d5
renderer/native: Steal the power save flip list before iterating over it
Because a single iteration might also grow the list again.

Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-09-15 14:31:15 +09:00
Daniel van Vugt
fbac742306
renderer/native: Avoid requeuing the same onscreen for a power save flip
This is a case that triple buffering will encounter. We don't want it
to queue the same onscreen multiple times because that would represent
multiple flips occurring simultaneously.

It's a linear search but the list length is typically only 1 or 2 so
no need for anything fancier yet.

Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-09-15 14:31:15 +09:00
Daniel van Vugt
bd521be148
kms: Keep a shutting_down flag
Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-09-15 14:31:15 +09:00
Daniel van Vugt
8ed6470b31
cogl/onscreen: Indent declaration parameters to align with above
This fixes warnings from check-code-style.

Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-09-15 14:31:15 +09:00
Daniel van Vugt
e02a8e15b1
cogl/onscreen: Add function cogl_onscreen_get_pending_frame_count
Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-09-15 14:31:15 +09:00
Gert-dev
4726186224
onscreen/native: Use EGLSyncs instead of cogl_framebuffer_finish
cogl_framebuffer_finish can result in a CPU-side stall because it waits for
the primary GPU to flush and execute all commands that were queued before
that. By using a GPU-side EGLSync we can let the primary GPU inform us when
it is done with the queued commands instead. We then create another EGLSync
on the secondary GPU using the same fd so the primary GPU effectively
signals the secondary GPU when it is done rendering, causing the latter
to wait for the former before copying part of the frames it needs for
monitors attached to it directly.

This solves the corruption that cogl_framebuffer_finish also solved, but
without needing a CPU-side stall.

Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-09-15 14:30:55 +09: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
Florian Müllner
519ec32ac8 ci: Restrict use of "Fixes #123"
Our convention is to use "Fixes" lines for references commits
(like belated "fixups") and use "closes" for issues.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4017>
2024-09-11 00:44:52 +02:00
Florian Müllner
90d36b8821 ci: Extend "closes" rule
Gitlab also recognizes variants like "close #123" or "Closed #123".

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4017>
2024-09-11 00:44:52 +02:00
Ask Hjorth Larsen
a6207cd1d8 Update Danish translation 2024-09-10 20:39:01 +00:00
Rafael Fontenelle
8f3cfcafd9 Update Brazilian Portuguese translation 2024-09-10 16:09:39 +00:00
Simon McVittie
b5d5169c5e tests: Remove duplicate vx239-calibrated.icc
Now that we copy this into a temporary XDG_DATA_HOME, we don't need
to have it duplicated in the source tree as well.

Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4012>
2024-09-10 15:29:26 +00:00
Simon McVittie
0024592541 tests/color-management: Use the inherited temporary XDG_DATA_HOME
Previously these tests tried to write to /usr when run as an
installed-test, which happens to work on Gitlab-CI because we're running
as root inside a container, but will not work when running in a more
realistic scenario as an unprivileged user (which is how Debian's
autopkgtest framework runs this test suite).

This also avoids leaving non-package-manager-managed detritus in /usr.

In color-management-tests, we can just delete the code that sets
XDG_DATA_HOME.

In color-management-profile-conflict-test, we also need to copy
the conflicting vx239-calibrated.icc into the temporary XDG_DATA_HOME
to get onto the code path that this test is intended to exercise.

Resolves: https://gitlab.gnome.org/GNOME/mutter/-/issues/3658
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4012>
2024-09-10 15:29:26 +00:00
Simon McVittie
19f8948164 tests: Create a temporary XDG_CACHE_HOME
For completeness.

Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4012>
2024-09-10 15:29:26 +00:00
Simon McVittie
24f4db3432 tests: Create a temporary XDG_CONFIG_HOME
XDG_CONFIG_DIR is not part of the basedirs spec. Use XDG_CONFIG_HOME
instead, which is probably what was intended.

Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4012>
2024-09-10 15:29:26 +00:00
Simon McVittie
642b672b70 tests: Create a temporary XDG_DATA_HOME to run each test
This will avoid some tests needing to write to /usr when run as
installed-tests.

Helps: https://gitlab.gnome.org/GNOME/mutter/-/issues/3658
Signed-off-by: Simon McVittie <smcv@debian.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4012>
2024-09-10 15:29:26 +00:00
Quentin PAGÈS
d7a5f364c9 Update Occitan translation 2024-09-10 14:13:35 +00:00
Artur S0
52991021a1 Update Russian translation 2024-09-10 12:07:35 +00:00
Andi Chandler
983f8d3186 Update British English translation 2024-09-10 10:28:36 +00:00
Daniel
ffc3eb4ef7 Updated Spanish translation 2024-09-09 12:41:35 +02:00
Peter Hutterer
ed15460526 ci: Deny a plain "Closes: #123" message in the commit message
We need the full link so let's warn contributors about this instead of
having reviewers pointing this out.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4013>
2024-09-09 08:22:23 +00:00
Andika Triwidada
0210f955d2 Update Indonesian translation 2024-09-09 08:04:17 +00:00