summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests: Give mutter-test-runner the RUNPATH to find Clutterwip/smcv/42-rpathSimon McVittie2022-08-181-0/+5
| | | | | | | | | | | | | | | Until recently, mutter-test-runner called into libraries that indirectly depend on (mutter's fork of) Clutter, but did not actually call into Clutter itself. Commit 1bf70334 "tests/runner: Make test runner use the headless backend" gave it a direct call into Clutter, which means the runtime linker will fail unless the executable's RUNPATH is sufficient to find Clutter. For future-proofing, do the same for the other test executables. Resolves: https://gitlab.gnome.org/GNOME/mutter/-/issues/2389 Signed-off-by: Simon McVittie <smcv@debian.org> Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2580>
* Update meta connector types enumSteev Klimaszewski2022-08-172-0/+8
| | | | | | | | | | | | This adds the 4 new connector types that mutter didn't know about from drm_mode.h in the kernel. Noticed because mutter kept crashing when plugging in a USB-C adapter to use an external monitor. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2577> (cherry picked from commit 642791673c345bd1432f97d6b7c5e4632e01f2fd)
* Update Georgian translationZurab Kargareteli2022-08-151-3202/+513
|
* wayland: Fix thinko in paired tablet loop filterCarlos Garnacho2022-08-131-1/+1
| | | | | | | | | | | This condition is inverted of how it should be. Since pad focus relies on grouped devices lookups (e.g. pads not grouped with a tablet do not focus surfaces), this fixes issues in pad focus and event propagation to wayland clients. Fixes: fff3654941 - wayland: Check input device capabilities in tablet seats (cherry-picked from commit 3dbc62eec29f52b3deb364a4545b29a5eec9cc18)
* backend: Fix cursor visibility on X11 with only tablets as inputCarlos Garnacho2022-08-121-1/+6
| | | | | | | | | | Since tablets on X11 drive the Virtual Core Pointer as every other pointing device, we should consider it as a pointer device when determining whether the pointer cursor should be visible. Fixes the cursor being hidden if there are only tablets for input. (cherry-picked from commit 633635d608dbc503f73c5425dec8015bfdcae637)
* Bump version to 42.442.4Florian Müllner2022-08-112-1/+18
| | | | Update NEWS.
* pointer-constraints/native: Fix borders array memory leaksSebastian Keller2022-08-111-3/+2
| | | | | | | | The borders arrays were not (fully) freed when going out of scope. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2337 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2497> (cherry picked from commit fe0a383d6ffc47d5a29376b392c8f2afc51dc588)
* tests: Test hotplugs when having unmapped Wayland windowJonas Ådahl2022-08-112-0/+21
| | | | | | | | | | | | | | | | | | | | | | | This checks that an unmapped but created Wayland window correctly handle monitor changes. This is specifically added to test an edge case causing a crash with the following backtrace: ``` ... 4) 0x00007ffff78a2a6b in g_assertion_message_expr () 5) 0x00007ffff7defd5b in meta_window_update_for_monitors_changed () at ../src/core/window.c:3745 6) 0x00007ffff7899758 in g_slist_foreach () at ../glib/gslist.c:885 7) 0x00007ffff7dbe562 in meta_display_foreach_window () at ../src/core/display.c:3185 8) 0x00007ffff7dbe5fd in on_monitors_changed_internal () at ../src/core/display.c:3210 9) 0x00007ffff796f4ff in g_closure_invoke () at ../gobject/gclosure.c:830 10) 0x00007ffff7981316 in signal_emit_unlocked_R () at ../gobject/gsignal.c:3740 11) 0x00007ffff7987699 in g_signal_emit_valist () at ../gobject/gsignal.c:3495 12) 0x00007ffff7987bc2 in g_signal_emit () at ../gobject/gsignal.c:3551 13) 0x00007ffff7d89915 in meta_monitor_manager_notify_monitors_changed () at ../src/backends/meta-monitor-manager.c:3517 ... ``` Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* window/wayland: Always update the monitor when updatingJonas Ådahl2022-08-111-1/+4
| | | | | | | | | | | | | | | | | | | | | If the window didn't have a size, it would still have a monitor, and when we are asked to update, we must update, as the old monitor might not be kept around, leaving us vulnerable to use after free. Avoid not updating the monitor by using the stored IDs (preferred, or previous) to find suitable logical monitors, with the primary monitor being the last fallback unless we're completely headless. This fixes the assert !window->monitor || g_list_find (meta_monitor_manager_get_logical_monitors (monitor_manager), window->monitor) in meta_window_update_for_monitors_changed() being hit when a Wayland window has been created, but not mapped, when a hotplug happens. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* window: Add monitor finder using stored IDsJonas Ådahl2022-08-112-11/+28
| | | | | | | This will be used to find new monitors on e.g. "winsys ID" of previous monitors. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* window: Get backend from context when updating monitorsJonas Ådahl2022-08-111-1/+2
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* window: Make monitor from rect finder helper more clearly namedJonas Ådahl2022-08-115-6/+6
| | | | | | | | | | | The function finds a suitable logical monitor given the window rectangle; this wasn't all that clear from the name "calculate_main_logical_monitor". This is in preparation for finding a new logical monitor using things other than the geometry of the window. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* tests/respect-constraints: Explicitly set monitor sizeJonas Ådahl2022-08-111-0/+2
| | | | | | | The test depends on a certain monitor size; make sure to set that up front. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* tests/runner: Add 'sync_shown' commandJonas Ådahl2022-08-111-0/+18
| | | | | | | | | | | This command will block until a previously asynchronously shown window is shown. E.g. show w/1 async ... do stuff .. sync_shown w/1 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* tests/runner: Add 'resize_monitor' metatest commandJonas Ådahl2022-08-112-0/+24
| | | | | | | | | This will allow tests to change monitor resolution. The first argument is the monitor ID; there is always one monitor added by default, and it has the id 0. It's currently not possible to add more monitors, so passing '0' is the only valid way to resize monitors. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* tests/runner: Recreate the virtual monitor for each testJonas Ådahl2022-08-111-4/+3
| | | | | | | This ensures that the virtual monitor has an expected initial state each test. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* tests/runner: Make test runner use the headless backendJonas Ådahl2022-08-111-1/+12
| | | | | | | Using the headless backend means we can use virtual monitors, which means we can unblock add support for hotplugging via metatests. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* tests/runner: Remove support running tests as an X11 WMJonas Ådahl2022-08-111-9/+5
| | | | | | | | | This hasn't worked for a while, since the test always runs the nested backend, meaning it's a Wayland compositor. To unblock testing window management in combination to monitor changes, lets remove the unreachable X11 WM paths, so that we can start using virtual monitors. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2554>
* x11-display: Unset GDK_BACKEND environment variableMichel Dänzer2022-08-101-0/+8
| | | | | | | | | | | | | | | | | | | | | mutter needs GDK to use the x11 backend. It already calls gdk_set_allowed_backends ("x11") for this purpose; however, if GDK_BACKEND=wayland (or any other non-x11 backend possibly) happened to be in the environment, GDK would fail to initialize at all. This would result in mutter not registering as X11 window manager, and all X11 clients hanging. Big thanks to Olivier Fourdan for figuring this out! v2: * Restore original value of GDK_BACKEND environment variable after initializing GDK. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2022283 Bug: https://bugs.debian.org/1008992 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2496> (cherry picked from commit 23526a99c7bfc48ef6e13637be93ad8783b6aacb)
* wayland/dma-buf: Don't require modifiers support for scanout trancheDor Askayo2022-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building the list of formats to be sent as part of the scanout tranche, avoid requiring modifier support by the DRM driver for formats relying on implicit modifiers (DRM_FORMAT_MOD_INVALID). Specifically, the previous check required the DRM driver to have advertised some modifier support for the given format in its IN_FORMATS KMS plane property, regardless of modifier it was. If it hadn't, the format was left out of the list of formats to be sent in the scanout tranche. When no formats remained to be sent in the scanout tranche, the tranche simply wasn't sent. This resulted in the scanout tranche never being sent for GPUs where modifiers aren't supported. In those cases, no formats are advertised using the IN_FORMATS property, and thus the list of formats to be sent in the scanout tranche remained empty. Since Mesa doesn't use scanout-compatible buffers for native Wayland clients unless specifically requested to do so using the "scanout" tranche flag, it effectively means that direct scanout of native Wayland clients wasn't supported for GPUs without modifiers support. Sending a tranche with formats paired with the implicit modifier (DRM_FORMAT_MOD_INVALID) is both allowed by the protocol and is already done by default for GPUs with modifiers support, unless the experimental support for explicit modifiers is enabled in Mutter. So instead of requiring modifiers to be supported for each format being evaluated for the scanout tranche, when processing formats which rely on implicit modifiers, only check if the format in question is supported by the DRM driver for scanout on the primary plane. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2510> (cherry picked from commit f037c9df661098cb3190eceafc94d8811c3ecd95)
* tests/screen-cast: Avoid undefined behavior with GSourceDor Askayo2022-08-021-17/+25
| | | | | | | | Follow the existing convention in Mutter and avoid downcasting custom GSource structs. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2406> (cherry picked from commit 40edfbcbeb64df445249ab7c467dd240ee44d7cb)
* screen-cast/src: Avoid undefined behavior with GSourceDor Askayo2022-08-021-16/+22
| | | | | | | | | | | | | | | | | | Follow the existing convention in Mutter and avoid downcasting custom GSource structs. This fixes the following warning: ../src/backends/meta-screen-cast-stream-src.c:1301:20: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] 1301 | g_clear_pointer ((GSource **) &priv->pipewire_source, g_source_destroy); /usr/include/glib-2.0/glib/glib-typeof.h:36:36: note: in definition of macro ‘glib_typeof’ 36 | #define glib_typeof(t) __typeof__ (t) | ^ ../src/backends/meta-screen-cast-stream-src.c:1301:3: note: in expansion of macro ‘g_clear_pointer’ 1301 | g_clear_pointer ((GSource **) &priv->pipewire_source, g_source_destroy); | ^~~~~~~~~~~~~~~ Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2406> (cherry picked from commit 61c9e344e4273e23f3cf55fed7c9c86a97691911)
* clutter/actor: Make has_pointer a counter instead of a boolJonas Dreßler2022-07-291-9/+19
| | | | | | | | | | | Somewhat long overdue... We've been supporting more than a single pointer for quite a long time now, let's make sure things don't break if two pointer devices enter the same ClutterActor: Count the number of pointers an actor has instead of using a simple boolean value. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2348> (cherry picked from commit f4416fa662c13c2e1077c2abc3e1d4d0c84a1930)
* renderer-native: Fall back to ARGB if XRGB is not supportedDaniel van Vugt2022-07-291-6/+22
| | | | | | | | | This fixes mutter failing to start on some ARM/Mali boards. Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2354 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2519> (cherry picked from commit 7c8ffe7efebaf9a962484132a7dbfb4ce086c15a)
* clutter/actor: Fix indentation in add_child_internal()Robert Mader2022-07-291-1/+1
| | | | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2530> (cherry picked from commit fad070eb40bf04a44b52feba108fab23b97bfd7d)
* clutter/actor: Queue relayouts in more clone casesRobert Mader2022-07-291-0/+24
| | | | | | | | | | | | | | | | In certain edge cases it's currently possible that an actor never gets a valid allocation and paint volume. One such case is adding an unmapped, hidden child to an unmapped cloned parent and then showing the child. This happens currently e.g. if a Wayland subsurface is added to a already mapped window while the user is in the overview. Ensure relayouts in two more such cases. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2530> (cherry picked from commit 8d04b9067d75dea5973adc94b6f4c049657d5dfd)
* clutter/actor: Check for clones in update_default_paint_volume()Robert Mader2022-07-291-1/+3
| | | | | | | | | This does not fix any known bug but should help ensuring correctness when clones are used. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2530> (cherry picked from commit e7a64db51aa2f5bc3e3f36c56e24ed86b51bea68)
* clutter/actor: Check for clones in finish_layout()Robert Mader2022-07-291-1/+2
| | | | | | | | | This does not fix any known bug but should help ensuring correctness when clones are used. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2530> (cherry picked from commit b64d6997093eeee8e37515982fd2d9f4f0dd42e1)
* clutter/actor: Handle repicks when actors become reactiveCarlos Garnacho2022-07-261-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | The notification list in the GNOME Shell calendar popup triggers some interesting interactions when closing a notification: - Close button is clicked - The notification animates to be hidden - The next notification ends up hovered as a result of the animation - The notification being hovered sets its close button as non-transparent and reactive - The pointer is now again over a close button At this point the reactiveness change should trigger a repick, so that the new notification's close button is picked, and future button presses are directed to it, but we do not handle this situation. To fix this, handle actors becoming reactive so that if the closest reactive parent has a pointer, it will be repicked again just in case the pointer is over the newly reactive actor. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2364 (cherry-picked from commit 550b66d4e64b6d2efd122d9e04e91aa31c27a37b) Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2533>
* clutter/stage: Add function to maybe invalidate pointers on an actorCarlos Garnacho2022-07-262-4/+17
| | | | | | | | | | | | | The function that currently invalidates pointers over an specific actor also asserts for the situations where this invalidation makes sense to happen (i.e. the actor became unmapped, or non-reactive). We want to have a function that is more forgiving, and that doesn't enforce any guarantees about the pointer focus actually changing. (cherry-picked from commit 6dabdec10ea4d5a256d90b48695adf0669883d51) Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2533>
* wayland/actor-surface: Consider clones in is_on_logical_monitor()Robert Mader2022-07-201-29/+16
| | | | | | | | | | | | | | | | | While the check for `clutter_actor_has_mapped_clones` clearly indicates an intention to take clones into account, the following code does not do so, likely because it predates the introduction of `clutter_actor_is_effectively_on_stage_view()`. Switch to that newer API in order to take clones into account. This avoids unnecessary `wl_surface_send_enter()` and `wl_surface_send_leave()` events when entering the overview, reducing client work. This also avoids unnecessarily allocating a `cairo_region_t`. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2502> (cherry picked from commit 1a56a53909550b6a1e7f59c93e4e57a139158aaa)
* window-actor/wayland: Skip unnecessary set_child_at_index() callsRobert Mader2022-07-201-11/+14
| | | | | | | | | | | `clutter_actor_set_child_at_index()` is far from a no-op, even if the current index is equal to the new one - presumably for good reasons. For the use-case here we want it to be a no-op though, so skip calling it if the index already matches. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2501> (cherry picked from commit 0f8f30c93f7a24cbbfbd40d2981347994e300afb)
* wayland/subsurface: Move actor unparenting back to rebuild_surface_tree()Robert Mader2022-07-202-16/+33
| | | | | | | | | | | | | | | | | | | | | | | Unparenting the surface actor when the subsurface object is destroyed has several issues: - subsurface actors can be unparented while a close animation is still ongoing, breaking the animation for e.g. Firefox. - adding and removing the actor to/from the parent is not handled in one place, making the code harder to follow. - if the destroyed subsurface had children of its own, they potentially stick around until a surface-tree rebuild. This makes the Firefox hamburger menu not close with the "compositor" backend. Move the unparenting back to `meta_window_actor_wayland_rebuild_surface_tree()` and instead just notify the parent of a state change, if it still exist. This will ensure a correct mapping between the subsurface node tree and the flat surface actor list. In case of the closing animation the parent will already be removed and the call is skipped. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2501> (cherry picked from commit 57881ba612f1571f2bf3f1642f416741fc4d3610)
* backends/screen-cast-stream-src: Set correct stride when using dmabufsPascal Nowack2022-07-141-2/+24
| | | | | | | | | | | | | | | | | Currently, mutter hardcodes the stride of all recorded images in a screencast to width * 4. While this stride is valid for general memory buffers, it is not necessarily valid for dmabuf buffers, as the driver may need a specific alignment of the stride. This can currently result into import failures, e.g. when using the AMD driver. To fix this issue, retrieve the actual dmabuf stride, when using dmabuf screencasts, and set it as the stride value in the PipeWire buffer. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1913 Fixes: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/101 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2514>
* Bump version to 42.342.3Florian Müllner2022-07-042-1/+12
| | | | Update NEWS.
* output/kms: Replace common mode bandwidth check with clock checkJonas Ådahl2022-07-013-8/+5
| | | | | | | | | | | | | | The pixel clock determines how fast pixels can be processed. When adding non-native common modes, avoid adding modes that exceed the max pixel clock frequency of the native modes. Avoiding these avoids potential mode setting failures where the GPU can't handle the modeline since the configured pixel clock is too fast. This replaces the "bandwidth" check which used the number of pixels and refresh rate, which wasn't enough to avoid incompatible modes. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2492> (cherry picked from commit 43860110ff0f2485ce043c8b999654c0170c920b)
* screen-cast/monitor: Always use clutter_stage_paint_to_framebuffer()Jonas Ådahl2022-06-291-38/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'screen-cast/monitor-src: Use clutter_stage_paint_to_buffer' (6c818cd8d5d29a21288d64fcbb13eae6a69d65df) made the non-dma-buf path use clutter_stage_paint_to_buffer() to avoid running into direct scanout issues. At a glance, the dma-buf paths didn't have the same issue since it explicitly handled dma-bufs by blitting them. What it also did was move the recording to an idle callback, to avoid paint reentry issues. A side effect of this, however, is that it also broke the dma-buf paths, as they rely on the back buffer existing, and the stage view direct scanout already being setup, which it isn't in an idle callback. Fix this by using the dma-buf variant of clutter_stage_paint_to_buffer(): clutter_stage_paint_to_framebuffer(). This has some negative performance impact, but we can't use cogl_blit_framebuffer() when using an idle callback for recording. Potential performance improvements to make things work more as they did before is to enhance 'cogl_blit_framebuffer()' a bit, making it a vfunc that could be implemented by MetaOnscreenNative. A flag to say whether to look at the back or front buffer would let MetaOnscreenNative know whether to use the already committed-to-KMS buffer, or the current back buffer. Fixes: 6c818cd8d5d29a21288d64fcbb13eae6a69d65df Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2282 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2462>
* wayland/dma-buf: Free feedback in surface_feedback_surface_destroyed_cbMichel Dänzer2022-06-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Fixes leak: ==14889== 2,168 (16 direct, 2,152 indirect) bytes in 1 blocks are definitely lost in loss record 15,308 of 15,584 ==14889== at 0x48445EF: calloc (vg_replace_malloc.c:1328) ==14889== by 0x4BAC1D0: g_malloc0 (gmem.c:155) ==14889== by 0x4AAFF60: meta_wayland_dma_buf_feedback_new (meta-wayland-dma-buf.c:298) ==14889== by 0x4AAFFE0: meta_wayland_dma_buf_feedback_copy (meta-wayland-dma-buf.c:317) ==14889== by 0x4AB16B6: ensure_surface_feedback (meta-wayland-dma-buf.c:1121) ==14889== by 0x4AB1848: dma_buf_handle_get_surface_feedback (meta-wayland-dma-buf.c:1169) ==14889== by 0x66F77E9: ??? (in /usr/lib/x86_64-linux-gnu/libffi.so.8.1.0) ==14889== by 0x66F6922: ??? (in /usr/lib/x86_64-linux-gnu/libffi.so.8.1.0) ==14889== by 0x5318750: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-server.so.0.20.0) ==14889== by 0x5313B99: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-server.so.0.20.0) ==14889== by 0x5316649: wl_event_loop_dispatch (in /usr/lib/x86_64-linux-gnu/libwayland-server.so.0.20.0) ==14889== by 0x4AA7C19: wayland_event_source_dispatch (meta-wayland.c:110) Fixes: 64e6bedb6bcd ("wayland/dma-buf: Add support for scanout surface feedback") Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2469> (cherry picked from commit 4af54225de3a653e7b44ab1905b64ebddf57da4a)
* wayland/surface: Swap 90 and 270 degree transformsRobert Mader2022-06-031-4/+4
| | | | | | | | | | | | | | | | | | | | Our internal interpretation of output transforms is not in line with the Wayland spec. Wayland describes them as the transform that a compositor will apply to a surface to compensate for the rotation or mirroring of an output device - counter-clockwise. Mutter in turn interprets it the other way around. One could argue it does the same but clock-wise - or it interprets the transform from the viewpoint of the content, not the device. In either way, the difference is that 90 and 270 degree values are switched. Thus swap these accordingly when we translate from `WL_OUTPUT_TRANSFORM` to `META_MONITOR_TRANSFORM`. See: https://gitlab.freedesktop.org/wayland/weston/issues/99 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1055> (cherry picked from commit 8d9bbe109b16969557672330da0d6a26adc8eae2)
* xwayland: Remove stray newlineJonas Ådahl2022-06-011-1/+0
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* tests: Check that X11 selections handle Xwayland disappearingJonas Ådahl2022-06-012-0/+197
| | | | | | | | | It works by using an X11 client to set the clipboard content, using a mimetype that on purpose is not handled by the clipboard manager. The test then makes sure we don't crash when trying to transfer data from the old X11 selection source. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* tests/async-waiter: Keep track of X11 display it was created withJonas Ådahl2022-06-013-19/+42
| | | | | | | | The Xwayland server can go away at any time; when this happen we might have a test client running, and for it to tear down more nicely, make sure to avoid trying to clean up X11 resources on the old X11 display. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* x11/input-selection-stream: Handle Xwayland going awayJonas Ådahl2022-06-011-4/+21
| | | | | | | | | | | Xwayland can disappear at any time, for example during a new_async() or read_async() call. When we eventually finalize the stream, the X11 display it was created for is gone, thus can't clean up the X11 resources. Handle this by making the MetaX11Display pointer a weak pointer, and ignore cleaning up if it disappeared. This is fine since the X11 server it created those resources one is gone already. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* selection: Return an error if trying to transfer from NULL sourceJonas Ådahl2022-06-011-0/+7
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* xwayland: Add API to send signal to the Xwayland processJonas Ådahl2022-06-012-0/+21
| | | | | | Will be used for test cases to fake-crash the Xwayland process. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* xwayland: Only warn on X IO errors when X11 is mandatoryJonas Ådahl2022-06-012-1/+13
| | | | | | | This avoids warnings when we're just slightly unlucky when Xwayland went away due to inactivity. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* wayland: Add getter for XWayland manager objectJonas Ådahl2022-06-014-2/+13
| | | | Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* tests/test-client: Add clipboard-set commandJonas Ådahl2022-06-012-0/+59
| | | | | | To be used for clipboard testing. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* x11/selection: Unset selection ownership on shutdownJonas Ådahl2022-06-011-3/+11
| | | | | | | This makes sure we don't accidentally try to paste from past Xwayland connection instances. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364>
* Bump version to 42.242.2Florian Müllner2022-05-282-1/+20
| | | | Update NEWS.