1
0
Fork 0
Commit graph

32609 commits

Author SHA1 Message Date
Jonas Ådahl
5da94d2c1d clutter/frame-clock: Take deadline evasion into account
This is meant to be the amount of time before a CRTC deadline we're
usually dispatching at. It's not yet set by anything however.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3184>
2024-08-13 10:09:04 +00:00
Michel Dänzer
61ae9eedb6 cogl: Update latest sync fd also from cogl_gl_framebuffer_flush/finish
This ensures that any drawing for screen casting is reflected in the
sync fd.

Fixes: 99209958b9 ("cogl: Store latest GPU work completed sync fd")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3946>
2024-08-13 09:52:34 +00:00
Sophie Herold
f2642dbc31 doap: Remove marge-bot maintainer entry
marge-bot has had GNOME wide Developer access for a while, which should be sufficient.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3940>
2024-08-13 08:48:28 +00:00
Daniel van Vugt
4c91616ff2 kms/update: Don't count trivial custom page flips as empty updates
This includes most frames when using EGL_DEVICE.

While it would be nice to skip all update processing in this case,
we can't go quite that far because EGL_DEVICE is still waiting on
page flip callbacks.

Fixes: 27ed069766 ("kms/impl-device: Add deadline based KMS commit scheduling")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3196
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3939>
2024-08-13 13:55:52 +08:00
Daniel van Vugt
cfb2100d40 onscreen/native: Associate the kms_crtc with EGL_DEVICE updates
Although we track updates for EGL_DEVICE, they are often empty because
the primary plane has a custom page flip method. That means there's
no CRTC latched yet, but we do know exactly which CRTC is associated
with the flip. Set it so the update can still be processed.

Fixes: 27ed069766 ("kms/impl-device: Add deadline based KMS commit scheduling")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3939>
2024-08-13 13:53:17 +08:00
Carlos Garnacho
c179bebb70 wayland: Bypass popup grab focus if other handlers are in effect
If other handlers (e.g. DnD) are on top of the popup grab focus, we
may want it to move outside same-client surfaces as the popup grab
specifies.

Check that it is the current handler before making same-client checks,
so that these handlers on top have an opportunity to find other
surfaces, e.g. during DnD from a popup.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1681
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3937>
2024-08-12 13:50:24 +00:00
Carlos Garnacho
22362378ea wayland: Track pressed mouse buttons for popup grabs through modifiers
Move away from tracking presses/releases directly, since there might be
other event handlers on top that might prevent the popup event handler
to fully track all events. The replacement is using event state modifiers,
which will use information set from the backend, and is enough to determine
there's no more pressed buttons without tracking prior event history.

This makes the popup event handler able to interact with other event
handlers that might be on top, and consume button release events for
themselves (e.g. DnD), no longer resulting in a stuck popup grab.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3937>
2024-08-12 13:50:24 +00:00
José Expósito
115b2c1247 wayland/drm-lease: Make MetaDrmLeaseManager::connectors a GList
The relationship between MetaKmsConnector and MetaDrmLease is already
stored in MetaDrmLeaseManager::leased_connectors.

Change the type of MetaDrmLeaseManager::connectors to a GList.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3922>
2024-08-12 10:25:36 +00:00
José Expósito
fc44437876 wayland/drm-lease: Withdrawn leased connectors
As in the protocol definition for wp_drm_lease_connector_v1::withdrawn:

    Sent to indicate that the compositor will no longer honor requests
    for DRM leases which include this connector. [...] Compositors are
    encouraged to send this event when [...] the connector gets leased
    to a client.

Withdrawn the leased connectors and, if they are available once the
lease finishes, advertise them again.

Related to: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/322/

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3922>
2024-08-12 10:25:36 +00:00
José Expósito
fc8b28a2bd wayland/drm-lease: Remove unused function
The meta_drm_lease_manager_get_connector_from_id() function is not used
and a future commit would need to change it.
Remove the unused code instead.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3922>
2024-08-12 10:25:36 +00:00
José Expósito
5cd15d8aaf wayland/drm-lease: Reset reused variable in loop
The `lease` variable is reused in a loop and might contain values from
previous loop iterations.

Fixes: 4a5fcef38d ("native/kms-lease: Implement leasing out a set of connectors")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3922>
2024-08-12 10:25:36 +00:00
Daniel Șerbănescu
5bce390fe8 Update Romanian translation
(cherry picked from commit dec5ffdadf)
2024-08-11 11:28:52 +00:00
Sebastian Wick
608d66afa5 renderer-view: Set ClutterColorStates from a MetaColorDevice
And stop passing in the color states from the RendererNative. We also
keep the color states updated by listening for changes in the color
device.

The RendererX11Cm has a single view and no mapping to a specific color
device, so we handle the absense of a color device as well and rely on
ClutterStageView to have the default color states.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
5b44d589b1 clutter/stage-view: Move offscreen creation functions around
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
a91fd4a72c clutter/stage-view: Move offscreen creation from renderer to view
This allows us to destroy and create a new offscreen dynamically, when
the rotation or color state changes.

An idle gsource with priority higher than CLUTTER_PRIORITY_REDRAW is
used to ensure the an offscreen exists when required without having to
allocate in the redraw process.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
6a1749009f clutter/stage-view: Pass the format when creating offscreens
Also use g_autoptr to make the code easier.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
163efa620b clutter/stage-view: Ensure we have view and output ColorStates
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
d8ecd07f9f clutter/color-state: Allow comparing NULL color states
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
0ed160bc5a stage-view: Move transform from MetaRenderereView to ClutterStageView
This is possible because MonitorTransform is a Mtk type now. It will
allow us to create the offscreens in ClutterStageView.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
243140069c renderer-native: Get the color state for the view from the MetaColorDevice
The color state will eventually not be derivable just from the monitor
configuration alone but the color device will be able to track all of
this.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
ccede14a09 renderer: Pass through the monitor to the create_view vfunc
We will want to use the monitor in a later commit and going there from a
logical monitor or output is ambiguous.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
af83233be3 wayland/outputs: Return a monitor instead of a logical monitor
Going from the monitor to a logical monitor is possible but going from a
logical monitor to a monitor is ambiguous.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
dcaa57c2c8 mtk: Move meta_rectangle_transform to Mtk
Both MtkMonitorTransform and MtkRectangle are Mtk types, so we can push
this into Mtk and start using it in Clutter as well.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
89af55d8aa mtk: Move MetaMonitorTransform to Mtk
This makes it possible to use MtkMonitorTransform in Clutter which will
be used to track the transform in ClutterStageView.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
54b2abfe1b backends: Move monitor_transform_from_orientation to orientation manager
This removes the dependency on MetaOrientation from MetaMonitorTransform
which makes it possible to move MetaMonitorTransform to Mtk.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
2024-08-09 15:51:36 +00:00
Sebastian Wick
f88b54502c ci: Downgrade libX11 to avoid a bug in teardown
Xlib would always report the error

  XIO:  fatal IO error 9 (Bad file descriptor) on X server ":102"

when mutter is tearing down. This behavior changed somewhere between
version 1.8.7 to 1.8.10 and is tracked at
https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/264.

Until we have a fixed libX11, we downgrade it to a known-good version.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3918>
2024-08-09 08:29:21 +00:00
Sebastian Wick
adf28cad71 tests/x11: Get the right mutter pid and be more verbose
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3918>
2024-08-09 08:29:21 +00: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
97978962fb ci: Bump image
Let's pull in gsettings-desktop-schemas 47.beta, so we can
bump the requirement.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3918>
2024-08-09 08:29:21 +00:00
Florian Müllner
b67afb6fd5 ci: Update gsettings-desktop-schemas check
`accent-color` is no longer the most recent setting
we require, but the tablet tool settings for
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3794.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3918>
2024-08-09 08:29:21 +00:00
Carlos Garnacho
ef3de1e58e wayland: Also cancel XDnD drops with no selected target
This is usually an indication of a failed drop operation if the
drop site didn't request any target. Check for this specifically
on XDnD button release, so that we can cancel the DnD operation
right away.

Inspired on a fix from Jonas Ådahl.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3821>
2024-08-08 12:38:24 +00:00
Carlos Garnacho
6f2f4c5767 wayland: Fix thinko checking for pointers with pressed buttons
These are bail out paths, so we should ignore pointers with no
buttons pressed. Spotted by Jonas Ådahl.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3821>
2024-08-08 12:38:24 +00:00
Carlos Garnacho
fd1d8c778b wayland: Redirect the focus explicitly to the Xdnd drag source
We were relying on the drag source surface to keep receiving events
thanks to it being implicitly grabbed by the button press. This
broke at some point, making the Xdnd drag source unable to keep
directing the DnD operation as it is expected by X11 clients.

To fix this, make the Xdnd MetaWaylandEventInterface stick itself
to the drag source surface keeping the focus of the device driving
the DnD operation, so that the X11 client can still handle events
from it.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3511
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3821>
2024-08-08 12:38:24 +00:00
Carlos Garnacho
a4ec154c8b wayland: Add getter for DnD origin surface
This private method will be used in later commits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3821>
2024-08-08 12:38:24 +00:00
Sebastian Wick
4bf02746e2 tests/kvm: Use the anonymous git remote to check out the kernel
Otherwise this fails if one can't authenticate to gitlab.freedesktop.org
or is banned there for whatever reason.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3931>
2024-08-08 02:40:58 +02:00
Bilal Elmoussaoui
9c7eafc8c3 clutter/context: Track if accessibility enabled
Currently, we would only disable a11y if a certain flag is passed
but the function is always called with NONE flag. Instead
drop the flag, use a new environment variable for that

That value is then used by actors to short-circuit get_accessible
implementation and return NULL if the accessibility is not enabled

Also clean the other accessibility functions

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
4eb46eb3d4 clutter/actor: Remove has_accessible
Instead, the users of the API can check if get_accessible returns NULL
which is more correct and avoids the extra vfunc that is not even used

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
f7c828f012 clutter: Remove unused FeatureFlags
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
334a85099d clutter: Remove unused ScrollActor
As GNOME Shell has a more complete solution with StScrollable /
StViewport / StScrollbar and does not make use of the Clutter actor.
We might want to "upstream" GNOME Shell infrastructure later at some
point but the current "solution" is too poor, so just drop it

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
ec028553d3 accessibility: Set various accessible names
For actors that are created by libmutter itself.
Although, not sure if such names should be translatable?

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
6874e98e5d clutter/actor: Remove AtkObject.get_attributes impl
It returns useless information, the toolkit and it versions are reported
in the ClutterStageManagerAccessible

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
defa3a302d clutter/actor: Implement AtkComponent.get_alpha
And a little clean up along the way

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
cbbf1b7b51 clutter/stage: Set accessible-role at construct time
Allows dropping the initialize override

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
cc4d72a343 clutter: Remove CloneAccessible
As it only sets the role, which we can set nowadays through a
property in ClutterActor

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
db05ef9c63 clutter/actor: Move few accessible bits from StWidget
As they are better fit in ClutterActor
The accessible_role is intentionally put in the public fields
as ClutterActorAccessible needs access to that without going
in recursion

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
f5c2b6949d clutter/actor: Better fallback for has_accessible
Check if the accessible field is set instead of always returning
True

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
471d8d913e clutter: Rename CallyText to TextAccessible
Moving it to the correct namespace and making it final & private
As there is nothing subclassing it

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
71f5d30d7f clutter: Rename CallyRoot to StageManagerAccessible
Moving it to the correct namespace and marking it as a private type
as it is not supposed to be replaced externally

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
3d22e4fe40 clutter: Rename CallyStage to StageAccessible
Moving it to the correct namespace and marking it a final private
type

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00
Bilal Elmoussaoui
02c6473175 clutter: Rename CallyClone to CloneAccessible
Moving it to the correct namespace and marking as final

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3917>
2024-08-07 22:46:16 +00:00