1
0
Fork 0
Commit graph

275 commits

Author SHA1 Message Date
Kamil Szczęk
57812546b9 udev: Use current tags when looking for preferred primary devices
In some use cases there is a need to dynamically change the preferred
primary GPU, or get rid of the preference altogether. This is currently
not possible due to a change in udev introduced by systemd v247. This
version made the tags "sticky", meaning there is no way to remove them
once attached. When a tag gets removed, only the CURRENT_TAGS property
reflects that change, the removed tag will remain in the TAGS property.

This also bumps libgudev version to 238, since that version introduces
a function, which we need to get the current tags.

Related: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1562
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4055>
2024-10-01 11:18:13 +00:00
Robert Mader
8e912a09d1 build: Disable asserts and cast checks in Mutter
For non-debug and non-plain cases - i.e. mainly release builds.

This ensures we use the same options in all places and draws a cleaner
distinction between g_assert() and g_return_if_fail() - the later will
still be done in release build while the former are meant for debug
only.

One advantage of doing this is that it allows us to use non-trivial
asserts more generously, such as calling `g_list_length()`.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3424>
2024-09-24 14:07:23 +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
8b8f052ff9
Bump version to 47.0
Update NEWS.
2024-09-14 22:36:50 +02: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
Florian Müllner
6f9981d36a
Bump version to 47.rc
Update NEWS.
2024-09-01 13:05:59 +02:00
Michel Dänzer
60161bec38 Bump pipewire requirement to >= 1.2.0
Build upstream version 1.2.0 for the CI image if needed.

v2:
* Build upstream 1.2.0 tag instead of 1.2.2.
v3:
* Build upstream 1.2.3 tag for CI, it has a needed fix.
v4:
* Enable systemd support in pipewire build. (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3876>
2024-08-30 21:07:16 +00: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
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
Sebastian Wick
7610973a94 Replace deprecated g_qsort_with_data with g_sort_array
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3899>
2024-08-15 23:58:53 +02:00
Florian Müllner
52a5984c45 build: Bump gsettings-desktop-schemas requirement
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3794
depends on the just released 47.beta gds version.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3918>
2024-08-09 08:29:21 +00:00
Florian Müllner
4ddd83c51e
Bump version to 47.beta
Update NEWS.
2024-08-03 19:23:22 +02:00
Peter Hutterer
d9ead043c7 backends: Add support for tablet tool pressure ranges
Introduced in libinput 1.26 this feature allows restricting the
tablet tool pressure range to a subset of its physical range. The
use-case is either to require some higher-than-usual minimum pressure
before the pen reacts, or lower-than-usual pressure to reach the maximum
logical pressure.

libinput takes a [0.0, 1.0] normalized range which we expose as percent
in the gsettings. The wacom driver doesn't have an exact equivalent but
it has a Threshold setting (range [1, 2048]) that defines when a button
is generated for tip down.

See gsettings-desktop-schemas!84

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3794>
2024-07-16 12:05:13 +02:00
Michel Dänzer
92d60dbb08 backend/native: Define struct drm_plane_size_hint only if libdrm doesn't
Fixes error building against libdrm >= 2.4.122:

../src/backends/native/meta-kms-plane.c:67:8: error: redefinition of ‘struct drm_plane_size_hint’
   67 | struct drm_plane_size_hint {
      |        ^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/libdrm/drm.h:1025,
                 from /usr/local/include/xf86drm.h:40,
                 from ../src/backends/native/meta-kms-plane-private.h:20,
                 from ../src/backends/native/meta-kms-plane.c:21:
/usr/local/include/libdrm/drm_mode.h:866:8: note: originally defined here
  866 | struct drm_plane_size_hint {
      |        ^~~~~~~~~~~~~~~~~~~

Suggested by Jonas Ådahl.

v2:
* Use has_type. (Sebastian Wick)

v3: (jadahl)
* Bump meson requirement to 1.3.0 for compiler.has_type()

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3556
Fixes: 0ca933baec ("backend/native: Adds support for SIZE_HINTS Cursor Plane Property")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3848>
2024-07-02 14:09:21 +00:00
Florian Müllner
ddef77340e
Bump version to 47.alpha
Update NEWS.
2024-06-30 16:20:17 +02:00
Bilal Elmoussaoui
6712edab1c build: Remove no longer used dbus dependency
It was used to get the interfaces directory when building with profiler enabled

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3853>
2024-06-30 15:09:00 +02:00
Bilal Elmoussaoui
bfd7f9d549 build: Split X11 server & client dependencies
Allows xwayland=true x11=false to be built with less dependencies
Also removes some unused x11 dependencies on the frame client & cogl

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3853>
2024-06-30 15:09:00 +02:00
Bilal Elmoussaoui
820a7ad813 build: Allow building xwayland without x11
Co-authored-by: Jonas Ådahl <jadahl@gmail.com>
Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/3553

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3853>
2024-06-30 15:08:55 +02:00
Bilal Elmoussaoui
7c41468ba3 build: Add a X11 option
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3776>
2024-06-27 16:31:56 +02:00
Jonas Ådahl
422ee4515d Compile with -Wfloat-conversion
This means we'll get warnings whenever a floating point value looses
precision, e.g. gets implicitly casted to an integer. It also warns when
implicitly casting double's to float's, which arguably is less of a
problem, but there are no warning for just float/double to int.

This would have caught
https://gitlab.gnome.org/GNOME/mutter/-/issues/3530.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3822>
2024-06-25 20:48:24 +02:00
Florian Müllner
42e5c7bd9c Bump API version
It has been a while since we branched, and there have been enough
divergence already to justify a bump.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3836>
2024-06-22 15:01:25 +02:00
Jonas Ådahl
465af4b2d3 build: Make native backend mandatory for all tests
This allows us one less level of indentation of all the tests. It is not
entirely true, the X11 backend test case script can run without it, but
it isn't valuable enough to run without the native backend being enabled
to complicate building.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3812>
2024-06-21 17:22:20 +00:00
Jonas Ådahl
24a8ef5033 build: Fix KVM tests summary
It used the option, and ignored `have_tests`.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3812>
2024-06-21 17:22:20 +00:00
Jonas Ådahl
16efcd4f9a Stop using xvfb-run in tests
Except the X11 backend test, it still needs an X server. Eventually we
can replace it with the equivalent that uses Xwayland, but that needs a
"scaled down" mutter that runs as the host compositor for Xwayland, that
doesn't expose anything on the session bus.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3812>
2024-06-21 17:22:20 +00:00
Sebastian Wick
8709fc5353 wayland: Bump connection buffer size to 1MB
Let's increase the connection buffer size a bit to avoid killing
clients which stall just for a few ms when they receive high
frequency input updates.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3693>
2024-06-13 11:58:14 +00:00
Bilal Elmoussaoui
42c534a02f build: Don't error out if startup_notification is enabled but not x11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3765>
2024-05-24 13:16:16 +00:00
Bilal Elmoussaoui
bb38601d0f build: Don't check for sm dependency if x11 is disabled
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3765>
2024-05-24 13:16:16 +00:00
Carlos Garnacho
69e791cda1 wayland: Implement the XDG dialog protocol
This protocol takes over some of our homegrown GTK Shell
protocol, allowing to specify hints on surfaces such as
dialog modality.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3557>
2024-05-22 10:42:20 +00:00
Bilal Elmoussaoui
fc623c1ed1 build: Enable -Werror=shadow and fix related issues
Mostly renames or removing already defined types

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3378>
2024-05-06 15:54:16 +00:00
Mart Raudsepp
669d21daa2 x11: Drop obsolete libXrender dependency
It seems only the iconcache used to use it, but this is gone since
commit d16ddc42ce.
Even before that, the Xrender usage was removed in commit 556e7694de,
albeit leaving a redundant include <X11/extensions/Xrender.h> in its
place then, which comes from libXrender.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3716>
2024-04-22 10:16:31 +00:00
Florian Müllner
b57c80602d
Bump version to 46.1
Update NEWS.
2024-04-19 19:48:34 +02:00
Austin Shafer
8e9f01d1ce wayland: Add MetaDrmTimeline
This abstracts away directly dealing with DRM syncobjs. Explicit
sync code can simply create a MetaDrmTimeline and request an fd at
a particular sync point.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3300>
2024-03-28 13:27:42 -04:00
Florian Müllner
c4753689e3
Bump version to 46.0
Update NEWS.
2024-03-16 14:43:07 +01:00
Jocelyn Falempe
a775241efd backend/native: Use drmModeCloseFB for flicker-free login
When logging in from gdm to gnome, the main plane is deactivated, and
leads to the screen going blank before gnome is able to enable it
again.
Using the new CloseFB ioctl, allows to keep the gdm login screen
displayed until gnome-shell replace it.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3659>
2024-03-16 10:45:41 +00:00
Sebastian Keller
f94e32037c background: Call malloc_trim() after loading background image
Some of the new JXL backgrounds from gnome-backgrounds can allocate
several hundred MB during loading, so let's call malloc_trim() after we
are done with loading the image into a pixbuf.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3327
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3653>
2024-03-12 17:27:29 +00:00
Robert Mader
f21762ea6e wayland: Add support for preferred_buffer_scale/transform
Which got introduced in wl_compositor version 6.

Note that if the surface is visible on multiple monitors with different
transforms, we pick the transform of the monitor which we choose for the
scale as well. This doesn't really matter at the moment, as the
transform is only really relevant for direct-scanout - which we
currently only support for fullscreen clients.

Once we support direct-scanout for partially visible clients we'll
likely want to introduce a more sophisticated algorithm.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3580>
2024-03-08 17:01:43 +00:00
Peter Hutterer
1fb8cbb15a build: Check for python-dbusmock if the core tests are enabled
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3648>
2024-03-07 11:49:17 +00:00
Christian Hergert
0810238d22 clutter/frame-clock: Use timerfd for clock timing
Currently, ClutterFrameClock uses g_source_set_ready_time() to determine
the usec timing of the next frame. That translates into a poll() with a
millisecond timeout if no trigger occurs to break the poll() out early.

To avoid spinning the CPU, GLib always rounds *up* to the next millisecond
value unless a timeout of 0 was provided by a GSource.

This means that timeouts for the ClutterFrameClock can easily skew beyond
their expected time as the precision is too coarse.

This applies the same concept as GNOME/glib!3949 but just for the
ClutterFrameClock. That may be more ideal than adding a timerfd for every
GMainContext, but we'll see if that lands upstream. I wanted to provide
this here because it could easily be cherry-picked in the mean time if
this is found to be useful.

From a timer stability perspective, this improves things from erratically
jumping between 100s and 1000s off of the expected awake time to single
or low double digits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3636>
2024-03-06 23:10:13 +00:00
Philip Withnall
a8be959cd8 build: Explicitly pass check kwarg to run_command()
The default value will change from `false` to `true` in future Meson
releases, so let’s be explicit.

We don’t want to check the exit status of the program in this case, as
we parse the `--help` output instead.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3640>
2024-03-05 08:26:32 +00:00
Philip Withnall
22b8af263b build: Use find_program().full_path()
`find_program().path()` was deprecated in Meson 0.55, but we depend on
Meson 0.60.

This helps fix the build with `--fatal-meson-warnings`.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3640>
2024-03-05 08:26:32 +00:00
Florian Müllner
1e74e5071f
Bump version to 46.rc
Update NEWS.
2024-03-03 15:02:00 +01:00
Dor Askayo
868fbe622b meson: Make libdisplay_info a feature option
Some features depend on libdisplay-info, and making it a feature
option should increase its visibility and adoption.

This makes it required when building with "-Dauto_features=enabled",
unless explicitly disabled with "-Dlibdisplay_info=disabled".

If "-Dauto_features=enabled" is not set, everything remains the
same.

In the future, the libdisplay_info option can be made "enabled" by
default so that it would always be required unless explicitly
disabled.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3582>
2024-02-14 11:37:21 +00:00
Florian Müllner
f8a257e104 Bump version to 46.beta
Update NEWS.
2024-02-11 15:51:16 +01:00
Bilal Elmoussaoui
9ed180209a docs: Prefer using gi-docgen from a subproject
As that is the recommended process from the upstream developers

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3538>
2024-02-09 12:29:50 +00:00
Bilal Elmoussaoui
bbd06f26e0 clutter: Drop cairo-gobject dependency
It is no longer used since the switch to MtkRegion
and the removal of ClutterCanvas

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3530>
2024-01-27 10:03:15 +00:00
Robert Mader
69446e1fb2 meson: Bump wayland-protocols requirement to 1.33
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3450>
2024-01-22 14:20:30 +00:00
Sebastian Wick
41a7e8e3e0 build: Make g-ir-scanner warnings fatal when -werror is set
This should help catching problems with introspection in CI.

This also pulls out some common arguments to the gnome.generate_gir
call.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3528>
2024-01-17 09:26:00 +00:00
Robert Mader
5ffeb34251 build: Enable no-omit-frame-pointer for all non-plain builds
This is useful for local installations with e.g. the `release`
buildtype.
Further more, Fedora has been doing the same system wide and it
apparently was helpful in various ways, see also

Also add -mno-omit-leaf-frame-pointer, like Fedora.

https://blogs.gnome.org/chergert/2023/10/03/what-have-frame-pointers-given-us-anyway/

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3333>
2024-01-09 16:26:57 +00:00