wayland: Guard XWayland types
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2445>
This commit is contained in:
@ -474,8 +474,10 @@ should_constraint_be_enabled (MetaWaylandPointerConstraint *constraint)
|
||||
* associate the X11 Window with the wl_surface.
|
||||
* For subsurfaces the window of the ancestor might be gone already.
|
||||
*/
|
||||
#ifdef HAVE_XWAYLAND
|
||||
g_warn_if_fail (meta_xwayland_is_xwayland_surface (constraint->surface) ||
|
||||
META_IS_WAYLAND_SUBSURFACE (constraint->surface->role));
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
@ -92,7 +92,9 @@ struct _MetaWaylandCompositor
|
||||
GHashTable *outputs;
|
||||
GList *frame_callback_surfaces;
|
||||
|
||||
#ifdef HAVE_XWAYLAND
|
||||
MetaXWaylandManager xwayland_manager;
|
||||
#endif
|
||||
|
||||
MetaWaylandSeat *seat;
|
||||
MetaWaylandTabletManager *tablet_manager;
|
||||
|
@ -894,6 +894,7 @@ meta_wayland_get_wayland_display_name (MetaWaylandCompositor *compositor)
|
||||
return compositor->display_name;
|
||||
}
|
||||
|
||||
#ifdef HAVE_XWAYLAND
|
||||
const char *
|
||||
meta_wayland_get_public_xwayland_display_name (MetaWaylandCompositor *compositor)
|
||||
{
|
||||
@ -905,6 +906,7 @@ meta_wayland_get_private_xwayland_display_name (MetaWaylandCompositor *composito
|
||||
{
|
||||
return compositor->xwayland_manager.private_connection.name;
|
||||
}
|
||||
#endif /* HAVE_XWAYLAND */
|
||||
|
||||
void
|
||||
meta_wayland_compositor_restore_shortcuts (MetaWaylandCompositor *compositor,
|
||||
@ -1004,7 +1006,9 @@ meta_wayland_compositor_notify_surface_id (MetaWaylandCompositor *compositor,
|
||||
GINT_TO_POINTER (id));
|
||||
if (window)
|
||||
{
|
||||
#ifdef HAVE_XWAYLAND
|
||||
meta_xwayland_associate_window_with_surface (window, surface);
|
||||
#endif
|
||||
meta_wayland_compositor_remove_surface_association (compositor, id);
|
||||
}
|
||||
}
|
||||
|
@ -72,10 +72,12 @@ GQueue *meta_wayland_compositor_get_committed_transactions (Meta
|
||||
META_EXPORT_TEST
|
||||
const char *meta_wayland_get_wayland_display_name (MetaWaylandCompositor *compositor);
|
||||
|
||||
#ifdef HAVE_XWAYLAND
|
||||
META_EXPORT_TEST
|
||||
const char *meta_wayland_get_public_xwayland_display_name (MetaWaylandCompositor *compositor);
|
||||
|
||||
const char *meta_wayland_get_private_xwayland_display_name (MetaWaylandCompositor *compositor);
|
||||
#endif
|
||||
|
||||
void meta_wayland_compositor_restore_shortcuts (MetaWaylandCompositor *compositor,
|
||||
ClutterInputDevice *source);
|
||||
@ -94,8 +96,10 @@ void meta_wayland_compositor_notify_surface_id (MetaWaylandCo
|
||||
int id,
|
||||
MetaWaylandSurface *surface);
|
||||
|
||||
#ifdef HAVE_XWAYLAND
|
||||
META_EXPORT_TEST
|
||||
MetaXWaylandManager * meta_wayland_compositor_get_xwayland_manager (MetaWaylandCompositor *compositor);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user