1
0
Fork 0
Commit graph

31228 commits

Author SHA1 Message Date
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
Bilal Elmoussaoui
7f1b890df1 cogl: Add missing new block in switch case
Closes #3226
Fixes: 6efd4a228 ("cogl/cleanup: Use construct-only properties for
CoglBuffer")

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3478>
2024-01-04 15:51:52 +00:00
Bilal Elmoussaoui
b64381d366 x11: Rename cairo_rects to mtk_rects
Avoids the result from showing up in a grep cairo

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3486>
2024-01-04 14:00:26 +00:00
Bilal Elmoussaoui
9d7d25e9ee clutter/stage: Remove no longer used struct
Drops a cairo usage

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3486>
2024-01-04 14:00:26 +00:00
Daniel van Vugt
6db9a0d77e clutter/stage: Fix indentation check-code-style is complaining about
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3487>
2024-01-04 12:26:38 +00:00
Sebastian Wick
40305f53f0 docs: Import Clutter Rendering Model wiki page
This one was overlooked when we migrated the wiki to the repo, so let's
add it before we delete the wiki.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3485>
2024-01-03 22:41:10 +01:00
Sebastian Wick
50936e9953 docs: Prefix code documentation files
with the subsystem they belong to. This makes it easier to see which
files belong where.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3485>
2024-01-03 22:41:07 +01:00
Sebastian Wick
9ac2da99d6 docs/building-and-running: Add note about updating ref-tests
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3465>
2024-01-03 20:54:57 +00:00
Sebastian Wick
e583d3c0f7 docs/debugging: Expand debugging docs
Add information on different mutter specific debugging techniques.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3465>
2024-01-03 20:54:57 +00:00
Sebastian Wick
dedc2766d2 docs: Add Building and Running topic
There are a lot of ways to build and run mutter. Let's try to document
them and reduce the tribal knowledge.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3465>
2024-01-03 20:54:57 +00:00
Sebastian Wick
9682ea496c README: Mention the GNOME Handbook Development page
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3465>
2024-01-03 20:54:57 +00:00
Sebastian Wick
edfd1880c9 docs: Move the gitlab wiki and other docs to the docs/ directory
Let's try to consolidate our documentation in doc/ in the repo. This
includes some documentation from README.md, the HACKING.md coding style
and the gitlab wiki.

The README.md file now links to all top-level topics (i.e. not reachable
via other topics).

This also includes a few small changes to make things more consistent.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3465>
2024-01-03 20:54:57 +00:00
Sebastian Wick
86d61de5bd docs: Remove outdated documentation
The value of those documents is questionable. They mostly refer to the
X11 complications and have not been updated for a long time.

Let's just get rid of them.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3465>
2024-01-03 20:54:57 +00:00
Carlos Garnacho
4f68713020 frames: Notify borders on first content resize
This addresses the following race condition:
1. Window+MetaFrame are created non-fullscreen, _MUTTER_FRAME_EXTENTS
   is initialized through widget measuring, accounting for frame.
2. Window and MetaFrame become fullscreen.
3. MetaFrameContent gets first size allocation, already fullscreen.
4. Borders were initialized to 0,0,0,0, become set to 0,0,0,0 correctly
   reflecting fullscreen, however notify::borders is not emitted.
5. _MUTTER_FRAME_EXTENTS stays accounting for the frame extents.

It sounds sensible to have the borders initialized to a meaningful value,
so account for the first time the border would be set due to the content
being (re)sized, and let this first value trigger notify::borders resulting
in _MUTTER_FRAME_EXTENTS updates.

Since all later _MUTTER_FRAME_EXTENTS changes happen through content
resizes, we only have to cater for this initial handover between the
frame/content initialization paths done through widget measuring and
the later paths done through MetaFrameContent resizes.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2937
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3476>
2024-01-03 19:31:51 +00:00
Bilal Elmoussaoui
5964ccb385 wayland: Fix building without native backend
Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/1026

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3480>
2024-01-03 14:46:41 +01:00
Bilal Elmoussaoui
cebde5c2d1 backend/native: Move DrmFormatBuf to cogl-drm-formats
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3480>
2024-01-03 14:46:41 +01:00
Bilal Elmoussaoui
786a9d9072 build: Require libdrm >= 2.4.95
So we can drop the DRM_FORMAT_INVALID fallback

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3480>
2024-01-03 14:46:04 +01:00
Bilal Elmoussaoui
a72f44132d build: Make use of defined req variables
Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/752

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3482>
2024-01-03 12:09:46 +00:00
Bilal Elmoussaoui
50fd53d465 x11/seat: Initialize group/mode for pad events
Otherwise, if Mutter is built without libwacom, garbage values would be
passed to clutter_event_pad_button_new

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

Fixes: 1611979fa ("x11: Implement ClutterSeat")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3479>
2024-01-03 10:56:11 +00:00
Mart Raudsepp
d7db784b54 build: Fix building without wayland headers
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3046
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3471>
2024-01-03 10:48:00 +00:00
Robert Mader
cb794329e7 clutter/stage-view: Remove superfluous return in void function
Fixes: 9d3e4fd402 ("clutter/stage-cogl: Use buffer age when view monitor is rotated")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3473>
2024-01-02 13:54:38 +00:00