• Bug#1109275: unblock: mutter/48.4-2 (2/2)

    From Simon McVittie@21:1/5 to Simon McVittie on Wed Jul 16 11:30:02 2025
    [continued from previous message]

    + if (!g_unix_open_pipe (p, FD_CLOEXEC, NULL))
    + {
    + meta_wayland_data_source_notify_finish (source);
    + return;
    + }
    +
    + if (!g_unix_set_fd_nonblocking (p[0], TRUE, NULL) ||
    + !g_unix_set_fd_nonblocking (p[1], TRUE, NULL))
    + {
    + meta_wayland_data_source_notify_finish (source);
    + close (p[0]);
    + close (p[1]);
    + return;
    + }
    +
    + meta_wayland_data_source_send (source, mimetype, p[1]);
    + close (p[1]);
    + channel = g_io_channel_unix_new (p[0]);
    + g_io_channel_set_close_on_unref (channel, TRUE);
    + priv->fake_read_channel = channel;
    + priv->fake_read_watch_id =
    + g_io_add_watch (channel, G_IO_HUP, on_fake_read_hup, source);
    +}
    +
    gboolean
    meta_wayland_data_source_add_mime_type (MetaWaylandDataSource *source,
    const char *mime_type)
    diff -Nru mutter-48.3.1/src/wayland/meta-wayland-data-source.h mutter-48.4/src/wayland/meta-wayland-data-source.h
    --- mutter-48.3.1/src/wayland/meta-wayland-data-source.h 2025-06-02 23:01:18.000000000 +0100
    +++ mutter-48.4/src/wayland/meta-wayland-data-source.h 2025-06-29 11:00:20.000000000 +0100
    @@ -111,6 +111,9 @@
    void meta_wayland_data_source_notify_drop_performed (MetaWaylandDataSource *source);
    void meta_wayland_data_source_notify_finish (MetaWaylandDataSource *source);

    +void meta_wayland_data_source_fake_read (MetaWaylandDataSource *source,
    + const char *mimetype);
    +
    void
    meta_wayland_data_source_set_toplevel_drag (MetaWaylandDataSource *source,
    MetaWaylandToplevelDrag *toplevel_drag);
    diff -Nru mutter-48.3.1/src/wayland/meta-wayland-seat.c mutter-48.4/src/wayland/meta-wayland-seat.c
    --- mutter-48.3.1/src/wayland/meta-wayland-seat.c 2025-06-02 23:01:18.000000000 +0100
    +++ mutter-48.4/src/wayland/meta-wayland-seat.c 2025-06-29 11:00:20.000000000 +0100
    @@ -98,10 +98,10 @@
    wl_resource_set_implement