1
0
Fork 0
Commit graph

31248 commits

Author SHA1 Message Date
Bilal Elmoussaoui
4513abd584 region: Move rectangle helper macro to Mtk
Rename it to Rectangle prefix to avoid confusion with MtkRegion

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3501>
2024-01-09 18:47:34 +00:00
Bilal Elmoussaoui
6f9e75b6f2 boxes: Move Rectangle.is_adjacent_to to Mtk
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3501>
2024-01-09 18:47:34 +00:00
Bilal Elmoussaoui
fcc8cfff11 boxes: Move Rectangle.scale_double to Mtk
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3501>
2024-01-09 18:47:34 +00:00
Bilal Elmoussaoui
59457dff81 boxes: Move Rectangle.crop_and_scale to Mtk
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3501>
2024-01-09 18:47:34 +00:00
Sebastian Wick
abe47769b7 docs: Move kms abstractions documentation out of references
Eventually we want to have all the high-level code documentation in the
component API reference documentation. However, gi-docgen is currently
missing support for mermaid so we just keep the files in `doc/` and link
to them from `code-overview.md`.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3505>
2024-01-09 17:59:15 +00:00
Peter Hutterer
b5e9279ea0 backends/x11: Fetch the tablet serial prop on device add
For tablet device, the tool was created when the "Wacom Serial IDs" prop
changed values. This property does not exist on the xf86-input-libinput
driver but v1.5.0 of that driver has a different property for the serial.

The serial is constant (the driver creates one X device per serial), so
we can fetch it after device creation and set it then. For earlier
versions of the driver we assign the random serial 0xffffffaa - good
enough to have at least a tool.

This fixes the crash in #3120 - clutter_event_motion_new()
overrides event->device to the tool's device (if any). Without a tool
motion events use the Virtual Core Pointer instead and our source device
is never added to the stage's priv->pointer_devices.

When we generate an crossing event (which uses the source device) we
fall afoul of an assert in clutter_stage_update_device() that expects
our source device to be in priv->pointer_devices.

Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/3120

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3383>
2024-01-09 17:33:33 +00:00
Zander Brown
b1dd6973df workspace-manager: Accessors for layout-{columns,rows}
This will allow C code in shell to avoid going though `g_object_get`,
and in future GJS will also be able to take advantage giving a slender
yet not unwelcome boost to perf in some animations

(Semi relates to https://gitlab.gnome.org/GNOME/mutter/-/issues/3083)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3351>
2024-01-09 16:38:25 +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
Robert Mader
ee65ca791b build: Harmonize c_args handling
The slightly different styles in the different build files make it
harder to reason about or share c_args.

This notably ensures we never set any extra c_args for plain builds and
fixes the cc.get_supported_arguments() check in Cogl, Clutter and Mtk.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3333>
2024-01-09 16:26:57 +00:00
Bilal Elmoussaoui
aaa63c1e08 clutter: Remove no longer useful since tags
As they represent the pre-merge version of Clutter

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3489>
2024-01-09 15:23:04 +00:00
Bilal Elmoussaoui
346e9a7f2c docs: Remove remaining SECTIONs
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3489>
2024-01-09 15:23:04 +00:00
Bilal Elmoussaoui
52c64d44fc docs: Move kms abstractions to a separate file
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3489>
2024-01-09 15:23:04 +00:00
Bilal Elmoussaoui
00b4d4c4bc docs: Update more links to gi-docgen
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3489>
2024-01-09 15:23:04 +00:00
Bilal Elmoussaoui
e7a920f94d docs: Migrate remaining content to markdown
By stopping using gtk-doc annotations

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3489>
2024-01-09 15:23:04 +00:00
Sebastian Wick
a0a1d102a0 cogl/bitmap-conversion: Don't break strict-aliasing for flt_pack/unpack
Simply reinterpreting the bytes differently is a strict-aliasing
violation if the type of the object isn't char or the target type of the
reinterpretation. None of that is the case here, so we have to resort to
a memcpy.

Fixes: 60c082caa ("cogl/bitmap-conversion: Support packing fp16 formats")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3499>
2024-01-09 14:43:16 +00:00
Sebastian Wick
0cd85e4adf cogl/half-float: Include SSE intrinsics
The intel intrinsics (including SSE) are only included in the header if
the arch is x86_64 which made the i686 build fail.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3234
Fixes: 568506ecb ("cogl: Add half float implementation")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3499>
2024-01-09 14:43:16 +00:00
Bilal Elmoussaoui
84739c0e96 docs: Remove extra slash from the git show command
It adds extra slashes in the end result

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3504>
2024-01-09 14:02:59 +00:00
Albert Esteve
1a0d00467d backends/native: Fix atomic cursor plane assign
Make atomic cursor plane assignment not depending on
cursor hotspot support.

Fixes: 4b9d1271a ("backends/native: Add PLANE_PROP_HOTSPOT_[X,Y]")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3238
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3503>
2024-01-09 13:52:37 +00:00
Bilal Elmoussaoui
133adc6fb4 docs: Add a logo
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3484>
2024-01-09 13:38:54 +00:00
Bilal Elmoussaoui
fded7d29df data: Remove no longer used icon
It is also very ugly and doesn't represent the current state of Mutter

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3484>
2024-01-09 13:38:54 +00:00
Bilal Elmoussaoui
39a8b153d5 backends: Drop unused private functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3492>
2024-01-09 13:14:35 +00:00
Bilal Elmoussaoui
57b59f95a6 x11: Drop unused private functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3492>
2024-01-09 13:14:35 +00:00
Bilal Elmoussaoui
74cab06b72 core: Drop unused private functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3492>
2024-01-09 13:14:35 +00:00
Bilal Elmoussaoui
ad49ecccf7 compositor: Drop unused private functions
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3492>
2024-01-09 13:14:35 +00:00
Bilal Elmoussaoui
77d71b5530 misc: Add common noisy dirs to gitignore
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3500>
2024-01-08 19:53:57 +01:00
Bilal Elmoussaoui
fb959f3a5d clutter: Remove no longer useful gitignore
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3500>
2024-01-08 19:50:50 +01:00
Zack Rusin
27f798b6d0 kms/impl-device/atomic: Implement mouse cursor hotspots
DRM's kms atomic code was updated to include an API to set the mouse
cursor hotspot. This has historically been missing in the atomic kms
which meant that the virtualized drivers which require mouse cursor
hotspot info to properly render had to be put on a deny list and
had to fallback to the legacy DRM kms code.

Implement the new hotspot API by checking whether the device supports
hotspot properties and if it does set them on the cursor plane. This
enables atomic kms on all virtualized drivers for kernels where
mouse cursor hotspots are in drm core.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3337>
2024-01-08 15:54:15 +01:00
Albert Esteve
3885d2b3f6 backends/native: Set hotspot property on updates
Add a `has_update` flag to the cursor hotspot struct
to allow selective update of the hotsport property
only when it will take an effect.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3337>
2024-01-08 15:54:01 +01:00
Albert Esteve
4b9d1271a0 backends/native: Add PLANE_PROP_HOTSPOT_[X,Y]
Add META_KMS_PLANE_PROP_HOTSPOT_[X,Y] properties
to the MetaKmsPlaneProp enumeration, and
properly initialise them.

Also, add a convenience method in meta-kms-plane
(i.e., `meta_kms_plane_supports_cursor_hotspot`)
to check whether a plane supports hotspot
property setting.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3337>
2024-01-08 15:15:25 +01:00
Daniel van Vugt
8252f71447 onscreen/native: Replace an old strerror with g_strerror
For consistency with the previous commit.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3418>
2024-01-08 13:05:17 +00:00
Daniel van Vugt
ee3968981f onscreen/native: Explain why surface creation failed in the error message
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3418>
2024-01-08 13:05:17 +00:00
Bilal Elmoussaoui
9e4d1f51ee misc: Drop remaining nick/blurbs
Those were added again after we dropped their usage in the codebase

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3498>
2024-01-08 11:54:58 +00:00
Ekaterine Papava
51904d1ec3 Update Georgian translation 2024-01-08 08:54:47 +00:00
Florian Müllner
d0abc9d7c7 Bump version to 46.alpha
Update NEWS.
2024-01-06 22:28:28 +01:00
Florian Müllner
e3237ed899 Bump API version
We forgot to do this when branching, so let's do it now before
the alpha release.
2024-01-06 22:28:28 +01:00
Bilal Elmoussaoui
5273422aef cleanup: Make meta includes consistent
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3491>
2024-01-05 14:22:22 +01:00
Bilal Elmoussaoui
6b8c1c430e cleanup: Make clutter includes consistent
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3491>
2024-01-05 14:22:22 +01:00
Bilal Elmoussaoui
0f6df633fe cogl/pango: Drop PANGO_ENABLE_BACKEND usage
Dropped before Pango 1.46 which is the min required version
so the backward compatibility is no longer needed

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3491>
2024-01-05 14:22:22 +01:00
Bilal Elmoussaoui
3b4fe5d577 cleanup: Make cogl includes consistent
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3491>
2024-01-05 14:22:22 +01:00
Bilal Elmoussaoui
2317fbe7c4 cogl: Remove no longer useful define
No longer a public lib so the comment no longer applies as well

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3491>
2024-01-05 14:22:22 +01:00
Bilal Elmoussaoui
3fcff05847 cogl/pango: Remove no longer needed version check
We require pango 1.46 nowadays

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3491>
2024-01-05 14:22:22 +01:00
Bilal Elmoussaoui
f20cb09f34 cogl: Generate a GType for Buffer{BindTarget|UpdateHint}
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3357>
2024-01-05 12:25:00 +00:00
Bilal Elmoussaoui
3280fee8bc cogl: Make BufferBindTarget public
It would be used in the next commit to generate a gtype and
be used for Buffer::default-target

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3357>
2024-01-05 12:25:00 +00:00
Bilal Elmoussaoui
63a558950b cogl: Generate a GType for PixelFormat
So that CoglTexture uses the proper pspec type for it format property

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3357>
2024-01-05 12:25:00 +00:00
Peter Hutterer
e7ba16689d backends/native: Use a pre-sampled bezier pressure curve
Based on the pressure curve control points sample a bezier curve and
then look up the pressure at that point of the curve.

We sample 256 points and do linear interpolation in between, this
strikes a balance between having to calculate the point for all
8K pressure points a modern pen supports while still giving us
reasonable detailed curves.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3158
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3399>
2024-01-05 10:21:42 +00:00
Peter Hutterer
4d6add290e backends/native: Switch the pressurecurve points to graphene points
No functional changes but a little bit of type-safety for future
patches.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3399>
2024-01-05 10:21:42 +00:00
Peter Hutterer
5ec67a8e90 backends/native: Change the MetaBezier API to sampling and lookup
This keeps the existing ClutterBezier implementation but changes
the visible API to match the needs of the tablet tool pressure curve:
a bezier defined within a [0.0/0.0, 1.0/1.0] box,(sampled
into a set of x->y mappings for each possible pressure input x, and
a lookup function to get those values out of the curve.

This patch moves the internally-only functions to be statics and changes
meta_bezier_init() to take only the second and third control point, as
normalized doubles. Because internally we still work with integers, the
bezier curve now has an integer "precision" that defines how many points
between 0.0 and 1.0 we can sample.

The meta_bezier_rasterize() function calculates the x->y mapping for
each point on the bezier curve given the initial scale of the curve.
That value is then available to the caller via meta_bezier_lookup().

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3399>
2024-01-05 10:21:42 +00:00
Peter Hutterer
f2ed377f48 backends/native: Update MetaBezier coding style for modern standards
Let's try to get past that pesky code-style checker.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3399>
2024-01-05 10:21:42 +00:00
Peter Hutterer
414357a70f backends/native: Restore the ClutterBezier code to here
The ClutterBezier code was removed in
    580d62b9b clutter: Remove unused Path related types
because it wasn't used anywhere. We do need a bezier curve for the
tablet tool pressure curve calculation though so let's move it
to the native backend and rename it to MetaBezier in the process.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3399>
2024-01-05 10:21:42 +00:00
Sebastian Wick
985e93f9fa cogl/cpu-caps: Build cpuid and xgetbv only for x86_64
This also adds the cpuid functionality inline and checks for GCC ASM
flag output support.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3226
Fixes: 3bf6de60b ("cogl: Add CPU capability detection helper")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3488>
2024-01-04 16:45:37 +00:00