1
0
Fork 0
Commit graph

30593 commits

Author SHA1 Message Date
Jonas Ådahl
dd3c1046c1 cogl/trace: Make each thread have its own trace context ref
This means that when we disable tracing, the writer will be kept alive
until the last thread using it is disabled.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2998>
2023-05-31 08:37:52 +00:00
Jonas Ådahl
604aeba9b3 events: Trace handling of event
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2998>
2023-05-31 08:37:52 +00:00
Marco Trevisan (Treviño)
3eabc4c707 ci: Use virtme-ng
virtme is now deprecated, so let's use the new generation one.

Also we don't require anymore pyelftools but we do need argcomplete

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2821
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3029>
2023-05-31 08:15:04 +00:00
Jonas Ådahl
340d585f91 compositor: Reparent the backend window unmanaging the display
Under X11 hiding the backend implies also unmapping the stage window, if
we do that after that we've closed the display we may end up in a
BadWindow error because such window seems to be destroyed together with
the compositor output parent (even though we are not notified about), so
to prevent this, reparent the backend window during compositor unmanage,
setting it back as a root window child.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2835
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3020>
2023-05-31 07:53:41 +00:00
Marco Trevisan (Treviño)
f013764b57 x11/backend-x11: Close the X11 Display where it's created
We open the clutter backend display inside MetaBackendX11, but we end
up closing it MetaClutterBackendX11, that is not it's direct owner.

So do it where it belongs

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3020>
2023-05-31 07:53:41 +00:00
Marco Trevisan (Treviño)
889cd056e7 x11/x11-errors: Use the default error handler when display is destroyed
An X11 server connection may still be around when we close the display,
and mutter_x_error could be triggered when x11_display has been already
destroyed leading to a crash.

To prevent this use the default X11 error handler.

As per this, also move the ownership of the error traps to x11-errors.

See: https://gitlab.gnome.org/GNOME/mutter/-/issues/2835
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3020>
2023-05-31 07:53:41 +00:00
Marco Trevisan (Treviño)
6d992e9e45 tests: Perform x11 test in both sync and async modes
The former allows better catching of issues, so do both cases

See: https://gitlab.gnome.org/GNOME/mutter/-/issues/2835
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3020>
2023-05-31 07:53:41 +00:00
Robert Mader
ed1d8bed93 Revert "backend/native: Sending modifiers to clients can be disabled via udev"
This is unused now. For testing purposes,
`MUTTER_DEBUG_SEND_KMS_MODIFIERS=0` can still be used.

This reverts commit efc4fa333c.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3030>
2023-05-30 14:25:28 +02:00
Robert Mader
9be511453e Revert "udev-rules: Disable sending modifiers to clients with amdgpu"
Original commit message:
> ATM sending modifiers to clients prevents direct scanout for DRI3
> clients via Xwayland. Xwayland using the dma-buf feedback v4 Wayland
> protocol will solve that, but that might take a while yet to appear in
> the wild. Once that happens, this can be reverted.
>
> Direct scanout still works for native Wayland clients as well.

Xwayland got support for v4 in 23.1.0, thus let's reenable modifiers on
AMD.

This reverts commit 2f825f3a86.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3030>
2023-05-30 14:25:18 +02:00
Marco Trevisan (Treviño)
e103567600 ci: Do not download container builds artifacts at later steps
We don't need their artifacts, so let's just depend on them

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
1d766dfbed ci: Perform MR-checks only in MR-branches only
This avoids even starting some jobs that we don't require

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
b0f35cca4d ci: Do not clone the mutter repo when deploying pages
We don't use any source file

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
3c975f78bc ci: Always perform git cloning as user
We are now building and testing mutter as user, but the clone may happen
as root, before the docker image takes place.

This may create troubles to git, causing errors such as:
 fatal: detected dubious ownership in repository at ...

And we can't fix this using safe.directory option because we have no
control on the system at this scope.

So, let's just handle the cloning manually so that the meta-user is
always the owner of the repository.

This fixes the dist job, but also other jobs that may fail because of
this reason.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
aef3ee4e61 ci: Use named base job to skip git cloning (AKA GIT_STRATEGY: none)
It's not clear what it does, so use some clearer naming

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
c472570194 ci: Use extends to inherit test-setup values
Using the old replace syntax doesn't allow to extend dicts such as
variables or other values, but instead it replaces them.

So use a newer and safer syntax, given we don't need to replace any
parameter where used.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
0adf3dcba0 ci: Do not run meson install with sudo
It will happen automatically since we have pkexec calling it implicitly

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
e613ffb5a5 ci: Always run dist job at marge-bot state
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Marco Trevisan (Treviño)
2ff351cc9b ci: Allow to run dist job manually in non-merge requests
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3024>
2023-05-29 17:19:03 +02:00
Jonas Ådahl
cef1a5d377 wayland/actor-surface: Only set input region of non-X11 window actors
Xwayland nevers sets the input region since that is handled using
`XShapeGetRectangles()` called with `ShapeInput`. Setting it from the
wl_surface would mean setting it to "infinite", effectively undoing what
`ShapeInput` communicated.

https://gitlab.gnome.org/GNOME/mutter/-/issues/2788

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3022>
2023-05-29 13:21:14 +00:00
Jonas Ådahl
e829862249 wayland/actor-surface: Set opaque region even without X11 client support
A `#ifdef` macro wrapped too much making opaque regions no longer being
set if mutter would be compiled without X11 client support.

Fixes: 6e818c8c38 ("build: Allow disabling xwayland")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3022>
2023-05-29 13:21:14 +00:00
Carlos Garnacho
b5900dd97a backends: Avoid orientation changes around suspend/resume if locked
We currently lock the capability of the MetaOrientationManager to emit
the ::orientation-changed signal, but otherwise keep reading the current
orientation and returning it if we are asked politely through
meta_orientation_manager_get_orientation().

This may bring issues e.g. around suspend/resume, since there may be other
parts of the code trying to get the current orientation without receiving
::orientation-changed signals, this may result in the display orientation
being effectively rotated, then stay locked after that.

In order to fix this, make the MetaOrientationManager return a fixed
orientation while locked, only updated after changes in the lock state.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2600
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3021>
2023-05-27 19:19:09 +00:00
Carlos Garnacho
410c08e1e2 backends/x11: Chain up in nested backend cursor renderer
This is missed, leaving the cursor renderer disconnected from the stage
updates that could trigger further frame callbacks on the cursor, leaving
some clients like Xwayland stuck with cursors.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3025>
2023-05-27 10:23:20 +00:00
Rafael Fontenelle
ce6c36a5a3 Update Brazilian Portuguese translation
(cherry picked from commit 96b560d0add6e3a394fe2e0bd77a0735f43fe19e)
2023-05-26 22:54:10 +00:00
Marco Trevisan (Treviño)
233fb6b7e6 ci: Disable building introspection when not needed
We can just save few cycles when the build-test doesn't require it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
0b30b2a1d7 ci: Print error logs on failures
Indeed we have more detailed logs, but this allows quicker checks.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
079745ca9f tests/dbusmock-templates/colord: Remove unused variables
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
7d95a41ec2 tests/dbusmock-templates/colord: Support usernames with dash chars
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
69cc65d15f ci: Run all the pipeline jobs as User
It's just closer to reality of an user session.

As per this:
 - We need to bump the required CI template to use this feature.
 - Use sudo in the actions that require it
 - Replace pkexec with sudo (it wouldn't work otherwise)
 - Ensure we don't rebuild during install not to break build dir
 - Give permission to use /dev/kvm to our user (we do this during the
   image creation because we don't have an user when $FDO_DISTRIBUTION_EXEC
   happens)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
0c56b143a2 ci: Use dry-run install during the build test
We already test install as part of other jobs (such as
can-build-gnome-shell) and in general that's wrong because we may
add to the final install path artifacts that are required during tests,
hiding potential issues with meson test when those files are not
installed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
4540284c06 ci: Avoid using trailing && in FDO_DISTRIBUTION_EXEC
It's not required and makes things hard to maintain, we can just rely on
the fact we're in a shell and just use `set -e` to prevent any
unexpected failure to go unnoticed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Marco Trevisan (Treviño)
a383917b23 ci: Use improved version of install-meson-project
Copied from
  https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/.gitlab-ci/install-meson-project.sh

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3016>
2023-05-25 09:21:57 +00:00
Robert Mader
4a5a31edc6 mutter: Remove stray spaces
To silence code-style-check complains.

Fixes d44f02ba64

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3018>
2023-05-24 14:16:41 +02:00
Georges Basile Stavracas Neto
52579c545b clutter/text: Use named pipelines
Cleanup the static color pipeline in favour of using named
pipelines. This is a more modern approach, and helps when
tearing down CoglContext.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3007>
2023-05-23 12:47:07 +00:00
Georges Basile Stavracas Neto
8f6ebe4800 clutter/text: Don't paint background
The background is already painted by clutter_actor_paint_node(),
there's no need to (re)paint the background.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3007>
2023-05-23 12:47:07 +00:00
Georges Basile Stavracas Neto
28774a23aa clutter/text: Plug a pipeline leak
ClutterText paints selected text using the selection_paint()
function. This function has to main branches of execution:
when the position is in the selection bound, or not. In the
former, we are leaking the CoglPipeline created by copying
the default color pipeline.

Unref the copied pipeline after using it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3007>
2023-05-23 12:47:07 +00:00
Georges Basile Stavracas Neto
0e8356936c clutter/actor: Move root node to ClutterStage
For now, it goes the "easy" way of creating the root node and
immediately painting and destroying it. From now on, the main
root node is created only by ClutterStage itself.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3007>
2023-05-23 12:47:07 +00:00
Georges Basile Stavracas Neto
894b4c713f meta/stage: Remove "actors-painted" signal
It is currently unused.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3007>
2023-05-23 12:47:07 +00:00
Carlos Garnacho
8c0809995a backends: Do not prevent mapping/keep-aspect changes on integrated tablets
We do in fact allow these combinations of configuration since the Settings
Wacom panel revamp. We no longer need to look up Wacom device features,
since this is allowed for all the devices that have these settings.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3012>
2023-05-22 17:01:59 +00:00
Carlos Garnacho
ee412cc4a3 backends/native: Change handling of display mapping for rel tablet tools
We avoided setting the device matrix applying to the tablet tool (used if the
tablet is in absolute coordinates mode) if the device is configured for relative
motion, but forgot to apply the matrix if changing the device back to absolute
mode, this made the device seemingly forget its attached display until later
configuration changes.

In order to avoid the hassle of looking up the right display again on unrelated
configuration changes, make the matrix be always set on the device, but only
actually used in absolute coordinates mode. This makes the device able to
seamlessly switch between modes and remain mapped to the right display.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3012>
2023-05-22 17:01:59 +00:00
Carlos Garnacho
558f3156dc backends/native: Fix relative motion filtering for tablet tools
This was somewhat ineffective since it was applied after figuring out
the x/y absolute coordinates. Change the order (filter first, then
figure out abs coords), and use coordinates from the correct device
while at it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3012>
2023-05-22 17:01:59 +00:00
Dmitry V. Levin
26d13f4269 udev-rules: Fix warnings reported by udevadm verify
Fix the following warnings reported by udevadm verify:

data/61-mutter.rules:2 Whitespace after comma is expected.
...
data/61-mutter.rules:116 Whitespace after comma is expected.
data/61-mutter.rules: udev rules check failed

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3011>
2023-05-22 16:35:24 +00:00
Carlos Garnacho
3bea86298d core: Avoid placing hidden windows too early on Wayland
This check only waited for windows without a buffer for wayland
clients. This should happen for all windows on a Wayland backend
here, unlike the other places calling client_window_should_be_mapped()
that expect to get ahead of the window state.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2786
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2999>
2023-05-22 16:12:36 +00:00
Bilal Elmoussaoui
d44f02ba64 mutter: Cleanup gi-docgen annotations
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2939>
2023-05-22 15:47:37 +00:00
Carlos Garnacho
4fcfd0350e core: Sync actor frozen state after destroying frame
A window may become undecorated while the frame window is
frozen due to updates. In that case we would both miss a
reply for the frame window, and any other means to trigger
the window actor being thawed.

Check the frozen state after destroying the frame, so that
meta_window_x11_are_updates_frozen() may end up changing
opinion if the frame window was caught in this situation.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2639
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2996>
2023-05-22 15:13:30 +00:00
msizanoen1
ae4755cc61 surface-actor: Fix meta_surface_actor_is_obscured_on_stage_view
`meta_surface_actor_is_obscured_on_stage_view` currently fails to
account for non-identity scaling of actor size (e.g. window actor
geometry scale or surface pixel alignment).

Fix this by using the new `meta_region_apply_matrix_transform_expand` to
calculate the unobscured region in stage coordinates.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2726>
2023-05-22 14:44:33 +00:00
msizanoen1
231729b7f2 window-actor/wayland: Check opacity before subtracting background in cull
This ensures that the background regions don't get marked as obscured if
the window itself is transparent (e.g. in window animation).

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2726>
2023-05-22 14:44:33 +00:00
msizanoen1
caca38106f surface-actor: Use clutter_actor_get_paint_opacity
This prevents opaque regions from being subtracted from the unobscured
regions while MetaWindowActor is transparent (e.g. in window close
animation).

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2726>
2023-05-22 14:44:33 +00:00
msizanoen1
8b3c1f4b87 cullable: Generalize actor coordinates space translation for regions
This allows MetaCullable to work with actors using arbitrary transforms
which will be needed for implementing surface pixel alignment for
fractional-scale-v1.

This also deletes meta_cullable_is_untransformed as it's no longer
necessary, and we can also stop manually scaling the region objects
while performing opaque region culling in surfaces since it's now
handled transparently by the new `meta_cullable_cull_out_children`
implementation.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2726>
2023-05-22 14:44:33 +00:00
msizanoen1
ab835787bd clutter/actor: Publish get_relative_transformation_matrix
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2726>
2023-05-22 14:44:33 +00:00
msizanoen1
ae403f2e94 wayland: Use new highest scale monitor tracking for fractional_scale_v1
This ensures consistency with the surface pixel alignment transforms.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2726>
2023-05-22 14:44:33 +00:00