1
0
Fork 0
Commit graph

31901 commits

Author SHA1 Message Date
Agustín Dall'Alba
9dff6a5013 backends/native: Remove DO_NOT_AUTO_START flag from rtkit dbus proxy
With this flag, the KMS Thread isn't made realtime at boot when the shell
starts before the rtkit daemon

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3327>
2024-02-21 11:48:49 +00:00
Bilal Elmoussaoui
917526ee9d plugin-manager: Drop MetaPluginClass.xevent_filter
This was added for registering profiling hooks for glx.swapComplete on
x11 code paths.

Nowadays we have sysprof

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3599>
2024-02-20 15:21:21 +00:00
Bilal Elmoussaoui
c72e129eb2 cursor-renderer: Move x11 specific bits to CursorRendererX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3599>
2024-02-20 15:21:21 +00:00
Bilal Elmoussaoui
899b4aad37 x11/display: Don't go through meta_create_x_cursor
As the cursor would always be default in this case and we would
want to move that function to the x11 cursor renderer.See next commit

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3599>
2024-02-20 15:21:21 +00:00
Bilal Elmoussaoui
ea74414b2e cursor-renderer: Make translate_meta_cursor public
Would be used in the upcoming commits

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3599>
2024-02-20 15:21:21 +00:00
Daniel van Vugt
f606a4424a compositor/x11: Sync again at the end of before_paint
The existing comment tells us this is necessary:

> there may be drawing between the last damage event and the
> XDamageSubtract() that needs to be flushed as well.

But the commit message for 551101c65c also tells us that
synchronization is necessary before-update. Assuming both are correct
then it needs to be done in both places.

I did try optimizing out the second sync to only do it if damage
arrived during the update, but that doesn't seem to be the issue.
The damage event is arriving before the update starts and it's some
secondary changes within the damage region running late that need
flushing. So this means the client is reporting damage more frequently
than the frame rate and we're ignoring the secondary damage reports
for efficiency (XDamageReportBoundingBox), which is still a good thing.

Fixes: 551101c65c ("compositor-x11: Move synchronization to before-update")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2880
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3590>
2024-02-20 18:22:00 +08:00
Bilal Elmoussaoui
cf9f7f427e window: Add a copy of XSizeHints
The type ended being used even in wayland code paths
so add a copy of it for now.

Helps https://gitlab.gnome.org/GNOME/mutter/-/issues/2272

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3597>
2024-02-19 20:19:41 +01:00
Matej Urbančič
6732dd540c Update Slovenian translation 2024-02-18 16:40:58 +00:00
Nathan Follens
253b2dba67 Update Dutch translation 2024-02-18 16:09:57 +00:00
Yaron Shahrabani
c4f93a1044 Update Hebrew translation 2024-02-17 21:21:32 +00:00
Bilal Elmoussaoui
97635753d9 clutter/tests: Remove unused color check helpers
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3595>
2024-02-17 14:30:19 +01:00
Bilal Elmoussaoui
85dbdc8fa6 cleanup: Remove unused defines
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3595>
2024-02-17 14:16:20 +01:00
Corentin Noël
e7de5c36f3 build: Remove the config.h inclusion from all public headers
Do not include it at header side as it is not part of the installed headers.

Only keep it in cogl-gl-headers.h as it is a private header.

Add it to all the source files that depend on it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3593>
2024-02-17 11:58:55 +00:00
Daniel van Vugt
5b49e0853c core/events: Restore IS_GESTURE_EVENT check for X11
It got lost during feec896d85 resulting in a PROPAGATE that should
be STOP.

For Wayland, gesture events are already handled (663f9d44).

Fixes: feec896d85 ("core: Simplify meta_display_handle_event()")
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3293
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3589>
2024-02-17 08:26:05 +00:00
Doğukan Korkmaztürk
dc2b2e379b screen-cast-stream: Add explicit modifier support
This change adds modifier-aware screencasting support to Mutter.
Implicit modifier support is kept for backward compatibility and the
code fallbacks to implicit modifiers in case any new functionality added
for explicit modifier support fails.

The advertised modifiers are retrieved by a call to
eglQueryDmaBufModifiersEXT() function. The "external only" modifiers are
excluded as Mutter uses the buffers created with the explicit modifiers
as renderbuffers. Support for implicit modifiers is checked with a test
allocation since there are drivers that do not support them.

This change also removes various implicit modifier support checks that
disable DMA-BUF screen casting support globally as they are no longer
needed. DMA-BUF support for screencasting is determined by the available
formats and modifiers case-by-case now.

It also effectively enables DMA-BUF screencasting on NVIDIA hardware as
well since GBM buffer objects with linear modifiers are no longer used
by default to create a renderbuffer object for screencasting.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3537>
2024-02-16 09:15:34 -05:00
Doğukan Korkmaztürk
34d00d769e render-device: Update DMA-BUF allocation API to allow modifiers
meta_render_device_gbm_allocate_dma_buf() function is updated to take a
list of modifiers. If no modifiers are specified, the modifier is
selected by the allocator, and implicit modifiers are used to import the
created DMA-BUF.

Co-authored-by: Jonas Ådahl <jadahl@gmail.com>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3537>
2024-02-16 08:22:04 -05:00
Bilal Elmoussaoui
ab1322781d tests/cogl: Remove unused legacy_mode
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3553>
2024-02-16 12:13:23 +01:00
Bilal Elmoussaoui
2c613df4eb cogl: Drop Pipeline.set_color_*
Those setters variants makes it very hard to do across project changes
to the
color type. As part of
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544
I would like to switch from using integers to floats inside CoglColor
which this PR would simplify

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3553>
2024-02-16 12:13:23 +01:00
Bilal Elmoussaoui
b00fcbf948 clutter: Remove unused Color APIs
Nothing uses them in GNOME Shell, so let us simplify the API
a little bit

Helps https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3588>
2024-02-16 10:24:24 +00:00
Bilal Elmoussaoui
72c2d8913e clutter: Drop static colors
There is literally zero reasons nowadays to still provide the tango color
palette as part of the Clutter API. End users of Mutter can define the
colors on their side if they want to.

The change simplifies https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3588>
2024-02-16 10:24:24 +00:00
Bilal Elmoussaoui
41cc85c857 window: Move shape_region to WindowX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3584>
2024-02-15 13:40:07 +00:00
Bilal Elmoussaoui
5e8e7df5bd window: Move input_region to WindowX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3584>
2024-02-15 13:40:07 +00:00
Bilal Elmoussaoui
606197de46 window: Move opaque_region to WindowX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3584>
2024-02-15 13:40:07 +00:00
Bilal Elmoussaoui
bf5f597141 window: Remove unused fields
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3584>
2024-02-15 13:40:07 +00:00
Bilal Elmoussaoui
09fc3e966a window: Move wm_client_machine to WindowX11
Also removes the public getter as nothing uses it and it no longer
make sense to expose X11-ism as API

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3584>
2024-02-15 13:40:07 +00:00
Bilal Elmoussaoui
692414c078 window: Move sm_client_id to WindowX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3584>
2024-02-15 13:40:07 +00:00
Bilal Elmoussaoui
72326d8ca5 window: Move grab_on_frame to WindowX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3584>
2024-02-15 13:40:07 +00:00
Bilal Elmoussaoui
de2a24b313 window: Move keys_grabbed to WindowX11
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3584>
2024-02-15 13:40:07 +00:00
msizanoen
b6802e1f00 wayland-surface: Fix get_absolute_coordinates() for active transition cases
Currently, we blindly apply the transformation matrices of all parent
actors when calculating the absolute coordinates. This means if this
function is called while the window actor containing the surface is in
the middle of a transition (e.g. window open animation), it may return
incorrect values. As this function is used for calculating pointer
confinement bounds for a specific surface, this will result in incorrect
bounds value being used if pointer constraints are applied by the
application at the same time the window is created and the mouse is
inside the surface's bounds when it's created.

Fix this by only applying transformation matrices up to the window actor
of the surface and then calculating the absolute coordinates by adding
the position of the window actor.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3585>
2024-02-15 13:20:33 +00:00
Daniel van Vugt
c63fdba6b3 cogl/onscreen/glx: Remove extraneous spaces
check-code-style was complaining about this.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3587>
2024-02-15 15:13:17 +08:00
Daniel van Vugt
53ca3a0089 cogl/onscreen/glx: Remove comment about clipped redraws not being supported
They've been supported for a very long time.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3587>
2024-02-15 14:57:23 +08:00
Daniel van Vugt
ea486b200f cogl/onscreen/glx: Remove duplicate wait function
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3587>
2024-02-15 14:55:18 +08:00
Sebastian Wick
8677e36c4c edid: Change HDR Static Metadata luminances to be float
They are float in libdisplay-info and our own EDID parsing also returns
a float but when then converted both to an integer. Especially the min
luminance can be <1.

We also don't need a variable for indicating presence of a CTA Static
Metadata block. The values are all zero if it is absent.

Found by Dor Askayo.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3574>
2024-02-14 21:46:26 +00:00
Florian Müllner
a06362a001 ci: Bump image
gsettings-desktop-schemas had its beta release, so rebuild the
image to pull that in, so that we can officially depend on it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3586>
2024-02-14 20:06:11 +00:00
Bilal Elmoussaoui
32082f26ce keybindings: Simplify initializing builtin keybindings
Reduces code duplication

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3583>
2024-02-14 19:10:21 +00:00
Bilal Elmoussaoui
ec3d658968 keybindings: Drop unneeded function declaration
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3583>
2024-02-14 19:10:21 +00:00
Bilal Elmoussaoui
bd1ca76168 keybindings: Move grab/freeze functions per backend
By making those functions virtual functions of MetaBackend
and have the BackendNative implementation no op

Helps https://gitlab.gnome.org/GNOME/mutter/-/issues/2272

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3583>
2024-02-14 19:10:21 +00: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
Bilal Elmoussaoui
e31c47877a frame: Inline get_mask where it is used
The function was used only once so just move it content where it is
called. It allows us to drop more cairo paths from the API surface even
if it is not part of a public api

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3581>
2024-02-14 11:20:30 +00:00
Yuri Chornoivan
007ac59919 Update Ukrainian translation 2024-02-13 18:00:22 +00:00
Robert Mader
8cfbdb4313 wayland/surface: Add fallback for get_highest_output_scale
If we don't have a monitor for a surface - e.g. because the surface is
not mapped yet - return the highest scale of all outputs. This makes us
send a preferred scale before a client draws its first frame. The highest
scale is always correct in single monitor cases and arguably a good
option otherwise as scaling down usually looks better than scaling up.

Note that this is currently only used by the fractional scale protocol,
but will also be used for the core `send_preferred_scale()` once we
implement it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3217>
2024-02-13 12:42:13 +00:00
Robert Mader
6034100160 wayland/surface: Move a function
So it's closer to where it's used.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3217>
2024-02-13 12:42:13 +00:00
Carlos Garnacho
feec896d85 core: Simplify meta_display_handle_event()
With all early "goto out" paths bypassing wayland, we can pretty
much avoid the goto and use early returns in this function. This
will hopefully improve readability.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
2024-02-13 12:36:27 +01:00
Carlos Garnacho
663f9d4495 wayland: Return boolean value handling pointer events
We've so far returned FALSE (i.e. PROPAGATE) here, somehow
oblivious of the fact that the core event handler would stop
all non-gesture events directed to windows.

Incorporate this knowledge there, in order to be able to
streamline this piece of event handling in core/ code.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
2024-02-13 12:36:27 +01:00
Carlos Garnacho
c496b17b3d core: Move display->current_time out of meta_display_handle_event()
While this updates the display current time a bit earlier, it allows
for early returns in the big bad function.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
2024-02-13 12:36:26 +01:00
Carlos Garnacho
93a9e7f3f4 core: Move code ignoring events on windows with modals to Wayland
This is Wayland specific code, handle it directly in MetaWaylandPointer.
This also fixes issues with the crossing event itself managing to reach
the window occluded by modals.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
2024-02-13 12:36:26 +01:00
Carlos Garnacho
f46205417f compositor: Drop grab_begin/end vfuncs
These do no longer anything on any implementation, and may be
removed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
2024-02-13 12:36:26 +01:00
Carlos Garnacho
3c5bbedb7c compositor: Move code to sync pointer position to backends/x11
Since the backend also knows when did we start/stop being grabbed,
we can shuffle this backend-y code to the backend.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
2024-02-13 12:36:26 +01:00
Carlos Garnacho
afed7fde03 wayland: Update DnD surface scale according to correct device
Pass the device/sequence to the DnD surface role, so it can to
coordinate tracking for scale updates.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
2024-02-13 12:36:26 +01:00
Carlos Garnacho
e7f436bc39 compositor: Refactor MetaDnD wayland event handling
Hook MetaDnD event delivery in the case of Wayland DnD ops
directly in the Wayland code, instead of indirectly in core/
code.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
2024-02-13 12:36:26 +01:00