mutter/src/wayland/meta-xwayland-private.h
Carlos Garnacho 25c9e66c73 xwayland: Do not block on Xwayland initialization
We artificially made Xwayland initialization synchronous, as we used
to rely on MetaX11Display and other bits during meta_display_open().
With support for Xwayland on demand and --no-x11, this is certainly
not the case.

So drop the main loop surrounding Xwayland initialization, and turn
it into an async operation called from meta_display_init_x11(). This
function is turned then into the high-level entry point that will
get you from no X server to having a MetaX11Display.

The role of meta_init() in Xwayland initialization is thus reduced
to setting up the sockets. Notably no processes are spawned from here,
deferring that till there is a MetaDisplay to poke.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/944
2020-02-28 20:20:35 +00:00

54 lines
2.0 KiB
C

/*
* Copyright (C) 2013 Intel Corporation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_XWAYLAND_PRIVATE_H
#define META_XWAYLAND_PRIVATE_H
#include <glib.h>
#include "wayland/meta-wayland-private.h"
gboolean
meta_xwayland_init (MetaXWaylandManager *manager,
struct wl_display *display);
void
meta_xwayland_complete_init (MetaDisplay *display,
Display *xdisplay);
void
meta_xwayland_shutdown (MetaXWaylandManager *manager);
/* wl_data_device/X11 selection interoperation */
void meta_xwayland_init_dnd (Display *xdisplay);
void meta_xwayland_shutdown_dnd (Display *xdisplay);
gboolean meta_xwayland_dnd_handle_event (XEvent *xevent);
const MetaWaylandDragDestFuncs * meta_xwayland_selection_get_drag_dest_funcs (void);
void meta_xwayland_start_xserver (MetaXWaylandManager *manager,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean meta_xwayland_start_xserver_finish (MetaXWaylandManager *manager,
GAsyncResult *result,
GError **error);
#endif /* META_XWAYLAND_PRIVATE_H */