1
0
Fork 0
Commit graph

30128 commits

Author SHA1 Message Date
Bilal Elmoussaoui
15b25568b2 compositor/x11: Drop duplicated methods calls
Those are called in the handler of MetaDisplay::x11-display-opened

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2445>
2023-05-15 20:41:54 +02:00
Bilal Elmoussaoui
02a436d607 wayland: Move surface check to MetaWaylandSurface
Allows dropping various HAVE_XWAYLAND ifdef as the function would always
return false if Mutter is built without XWayland

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2445>
2023-05-15 20:41:54 +02:00
Bilal Elmoussaoui
a27b9d9707 wayland: Guard XWayland types
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2445>
2023-05-15 20:41:54 +02:00
Bilal Elmoussaoui
0f88f0931c core/events: Guard X11 types
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2445>
2023-05-15 20:36:23 +02:00
Bilal Elmoussaoui
3e95609073 compositor/dnd: Guard X11 types
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2445>
2023-05-15 20:36:23 +02:00
Bilal Elmoussaoui
761a254e6f core/display: Guard X11 types
This also moves a couple of function calls to
MetaDisplay::x11-display-opened a signal handler

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

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2445>
2023-05-15 20:36:23 +02:00
Bilal Elmoussaoui
aaa3f34cc0 compositor: Guard X11 types
This also moves meta_compositor_x11_redirect_windows to DisplayX11
where it makes more sense as meta_display_x11_redirection_windows

Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2272
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2445>
2023-05-15 20:23:37 +02:00
Marco Trevisan (Treviño)
184b8e9c8c x11/x11-display: Fix some wrong code style to please CI checker
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2970>
2023-05-15 19:06:40 +02:00
Marco Trevisan (Treviño)
c9c4b06429 tests/test-client: Use proper style for main arguments
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2970>
2023-05-15 19:06:39 +02:00
Marco Trevisan (Treviño)
8039b58410 x11/x11-display: Always set the compositor manager selection on init
Set the compositor manager selection during the initialization phase as
we do with the window manager selection

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2970>
2023-05-15 19:06:37 +02:00
Marco Trevisan (Treviño)
c653f30283 tests/test-client: Ensure that screen has always a compositor
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2970>
2023-05-15 19:05:00 +02:00
Marco Trevisan (Treviño)
b48351005e tests: Add check for compositor state on XWayland startup
Check that the first X11 window started has a compositor defined.

See: https://gitlab.gnome.org/GNOME/mutter/-/issues/2472#note_1582262
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2970>
2023-05-15 19:05:00 +02:00
Marco Trevisan (Treviño)
28bd3da21a tests/meson: Make tests depending on test-client to actually depend on it
It allows meson to rebuild the client-related sources when a single test
is running using the client, also ensuring that test-run dependencies
are correctly setup

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2970>
2023-05-15 19:05:00 +02:00
Marco Trevisan (Treviño)
2625edec10 x11/x11-display: Set compositor selection earlier on XWayland
When the X11 display is actually XWayland there's no point to delay the
compositor selection, given that mutter itself is the compositor and
doing this may cause the first X11 client that starts not to receive the
right information (and in some cases misbehave).

Since some toolkits are not handling the compositor selection changes
properly at later times, let's make their life easier by just
initializing the selection as early as the other X11 properties, given
that in this case there's nothing to replace.

Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2472
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2970>
2023-05-15 19:04:59 +02:00
Bilal Elmoussaoui
05dd401b64 tests: Make wayland-x11-interop depends on xwayland feature
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2938>
2023-05-15 11:52:35 +00:00
Jonas Ådahl
99a58be104 build: Set built headers as libmutter_dep sources
This should help avoiding compiling objects depending on built headers
to fail if they happen to be built before the sources are built.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3000>
2023-05-15 13:06:40 +02:00
Barnabás Pőcze
f01428bd96 backends/x11: Fix type confusion about object data
Since c390f70edc ("backend: Set up and use ownership chains")
the type of the ClutterInputDevice object's "meta-input-settings-xdevice"
data is `DeviceHandle`, but that commit failed to change the one place
where the object data is queried. As a consequence, that part still
considers it to be an `XDevice`, so everything that uses the return
value of `device_ensure_xdevice()` works with invalid data. Furthermore,
`device_handle_free()` incorrectly uses the `user_data` as the argument
for `XCloseDevice()` leading to a double free.

Fixes: c390f70edc ("backend: Set up and use ownership chains")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2995>
2023-05-14 23:15:55 +00:00
Simon Elst
10d370eb03 Update French translation 2023-05-12 13:05:48 +00:00
Jonas Ådahl
1a4f03bd79 wayland/surface: NULL check surface resource in handle_output_bound()
Otherwise binding new wl_output's might try to send enter to the
destroyed resource. Fixes the following crash:

     #0 wl_resource_get_client at ../src/wayland-server.c:801
     #1 handle_output_bound at ../src/wayland/meta-wayland-surface.c:1287
     #3 signal_emit_unlocked_R.isra.0 at ../gobject/gsignal.c:3812
     #6 ffi_call_unix64 at ../src/x86/unix64.S:104
     #7 ffi_call_int at ../src/x86/ffi64.c:673
     #8 ffi_call at ../src/x86/ffi64.c:710
     #9 wl_closure_invoke at ../src/connection.c:1025
    #10 wl_client_connection_data at ../src/wayland-server.c:438
    #11 wl_event_loop_dispatch at ../src/event-loop.c:1027
    #12 wayland_event_source_dispatch at ../src/wayland/meta-wayland.c:125
    #15 g_main_context_iterate.isra.0 at ../glib/gmain.c:4276
    #17 meta_context_run_main_loop at ../src/core/meta-context.c:482

Related: https://bugzilla.redhat.com/show_bug.cgi?id=2196527
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2992>
2023-05-09 15:26:32 +00:00
Jonas Ådahl
802c1baec7 compositor-view: Chain up finalize()
The chaining up to the GObject finalize() method was missing, fix that.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2991>
2023-05-09 10:31:38 +00:00
Danial Behzadi
921f52dfc0 Update Persian translation 2023-05-09 09:55:13 +00:00
Alexandre Franke
eab928918d Fix shortcut wording
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2982>
2023-05-08 21:00:05 +00:00
Robert Mader
9884a2c3d2 shaped-texture: Move variable declaration to the top
Just a minor cleanup.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2990>
2023-05-07 23:18:33 +02:00
Robert Mader
2dd5196267 egl: Set EGL_IMAGE_PRESERVED_KHR on DMABUF import
Otherwise drivers would be free to alter the buffer content. While no
driver is known to do so, it's probably good to make things explicit.
See also `import_simple_dmabuf()` in Weston.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2990>
2023-05-07 23:16:37 +02:00
Jonas Ådahl
29ec2d2e20 screen-cast/src: Never dequeue pw_buffer's we refuse to record to
The DMA buffer paths vs MemFd paths differ slightly in when content is
recorded. This was in some places done by trying to record but bail if
the dequeued buffer had the wrong type. This is problematic for two
reasons: we'd update the timestamp even if we refused to record, making
the follow-up attempt fail, and we'd dequeue and queue buffers that
didn't get any content, meaning the receiving end would see empty
buffers potentially with only cursor updates.

Fix this by keeping track if a stream is DMA buffer able or not, and
don't attempt to record at all in the places we would previously require
DMA buffers. This avoids both issues: we don't dequeue/queue pw_buffers
that we refuse to record to, and we won't update the recorded timestamp
when we didn't intend to record to begin with.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2783
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2987>
2023-05-04 13:00:07 +00:00
Jonas Ådahl
39b28ad8c8 build: Join keybindings path correctly too
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2985>
2023-05-04 12:35:38 +00:00
Jonas Ådahl
8a4095308e build: Use / operator instead of format for Wayland protocol paths
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2985>
2023-05-04 12:35:38 +00:00
Jonas Ådahl
61b42e5303 build: Use / operator instead of join_paths everywhere
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2985>
2023-05-04 12:35:38 +00:00
Jonas Ådahl
dcaca398f1 tests: Set a dummy XDG_CONFIG_HOME variable
This avoids a local ~/.config/monitors.xml messing up tests.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2985>
2023-05-04 12:35:38 +00:00
Sebastian Keller
551aebce19 cogl: Remove struct paddings
Due to cogl being a private library we don't need worry about ABI
compatibility.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2986>
2023-05-04 12:11:26 +00:00
Sebastian Keller
5b26db8ae8 clutter: Remove struct paddings
Due to clutter being a private library we don't need worry about ABI
compatibility.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2986>
2023-05-04 12:11:26 +00:00
Andy Holmes
07184e099c docs: Add missing flag documentation
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2983>
2023-05-04 11:46:09 +00:00
Danial Behzadi
153433a8e6 Update Persian translation 2023-05-03 09:12:36 +00:00
msizanoen1
3f85158b85 surface-actor: Queue rectangles of update region separately
This aims to help reduce the amount of pixels redrawn on the screen in
case the damage rectangle is partially occluded by another surface.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2965>
2023-05-03 08:53:36 +00:00
msizanoen1
4048562961 stage: Keep queued actor redraw clip volumes separate
This aims to reduce the amount of pixels that have to be redrawed on the
screen on a clipped actor redraw in case using the union of two
different clips in a surface will substantially increase the redrawn
area.

This should not result in excessive memory consumption as callers of
`clutter_actor_queue_redraw_with_clip` are expected to ensure that the
redraw clip rectangles are adequately deduplicated.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2965>
2023-05-03 08:53:36 +00:00
Marco Trevisan (Treviño)
17414fd242 clutter: Remove class paddings
mutter-clutter is a private library that is only used by the shell and
not meant to be ABI/API compatible in between versions, so there's no
need to add padding to classes.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2903>
2023-05-02 19:48:03 +00:00
adarshgm
7f18cae282 edid: Integrate libdisplay-info for edid parsing
Hides libdisplay-info under a build time default-off flag,
provides provision to parse essential edid parameters with
APIs provided by libdisplay-info. This implementaion increases
readibility, avoids code duplication and decreases complexity
of edid parsing.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2642>
2023-05-02 17:37:01 +00:00
Sebastian Keller
d643eb5c6f frames: Disable XDND support on the frame window
All X11 surfaces created by gtk4 claim to support XDND via the XdndAware
property. This was leading some clients, e.g. Qt, to consider the frame
window as drop target instead of the client window.

Avoid this issue by removing the XdndAware property again after gtk has
created the surface.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2715
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2978>
2023-04-28 12:46:58 +02:00
Florian Müllner
28a6447ff0 Bump version to 44.1
Update NEWS.
2023-04-25 18:16:17 +02:00
Carlos Garnacho
18be74edeb core: Fix map transitions for X11 windows on Wayland
We are attempting to show windows that do not yet have a
surface/buffer, this makes GNOME Shell avoid transitions
for these windows.

Since on Wayland X11 windows are also Wayland surfaces,
this check is also valid for these, and is thus made more
generic to also cater for these windows.

Eventually, meta_window_update_visibility() is called
when the surface gets its buffer, so the window can be
neatly animated.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2611
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2975>
2023-04-25 17:34:24 +02:00
Carlos Garnacho
5eb17a362e tests: Avoid CSD window in test
This ATM triggers missed .commit events for the window in question,
to be addressed in Xwayland. Since the test does not seem to specifically
rely on this window being CSD, make it a regular window instead.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2975>
2023-04-25 17:34:24 +02:00
Carlos Garnacho
57fdd7efd2 frames: Use cairo renderer on GTK frames
Going for the default GL renderer is known to trigger rendering
artifacts using the NVidia proprietary driver. Since we don't have
too many expectatives about frames being flashy (not to the point
of mandating GL), resort to the cairo renderer in the mean time.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2976>
2023-04-24 12:07:06 +02:00
Sebastian Wick
cca07612b8 output: Check the EDID for the supported sink Colorimetry
Just like the HDR Metadata property the Colorspace property values only
indicate that the display driver supports signaling certain colorimetry.
It does not indidcate that the sink actually supports processing the
colorimetry. For this we have to look up the colorimetry support in the
EDID.

The default colorimetry is always supported. If we want bt.2020 we might
get either the RGB or YCC variant even if we ask for the RGB variant but
there is nothing we can do about it so let's just pretend it's a driver
issue.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2919>
2023-04-21 00:00:24 +02:00
Robert Mader
754a1a1ce6 wayland/dma-buf: Enable modifiers by default on non-native backend
If the used EGL backend supports it. In practice this should currently
only affect the nested backend.

Enabling modifiers can help with app development. An example is
`weston-simple-dmabuf-v4l`, which requires the linear modifier to be
available.

Note that Weston behaves similar already.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2972>
2023-04-20 15:34:00 +00:00
Sebastian Keller
04fa926eea core: Remove meta_frame_get_flags()
It is private and the last caller was removed in 92feea30.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2971>
2023-04-20 15:49:55 +02:00
Robert Mader
b56ab36704 xdg-shell: Always handle frame callbacks in popup_apply_state()
Just like we do in `toplevel_apply_state()`.

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

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2963>
2023-04-20 12:34:47 +00:00
Daniel van Vugt
dd6be7cf2a backends/x11: Trap errors from XIChangeProperty
And report them as warnings instead of crashing.

https://launchpad.net/bugs/2014986

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2960>
2023-04-18 20:18:01 +00:00
Jonas Ådahl
86b5d9d809 Replace using sscanf() to parse mode strings with new helper
This fixes issues when the locale uses characters other than `.` in
floating point numbers.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2902>
2023-04-18 18:38:03 +00:00
Jonas Ådahl
2fd9834d94 monitor: Add helper to parse simple mode strings
This will be used to extract the resolution and refresh rate from
strings like "1920x1080@60.0" or "1280x720". This aims to replace the
use of the locale dependent sscanf() function.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2902>
2023-04-18 18:38:03 +00:00
Jonas Ådahl
550a1dadf1 monitor: Don't use locale dependent mode ID string
The result of printf("%f", number) depends on the locale. To avoid
unpredictable mode IDs, make sure they always are generated the same no
matter the locale.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2902>
2023-04-18 18:38:03 +00:00