mirror of
https://github.com/brl/mutter.git
synced 2025-02-08 17:44:09 +00:00
wayland: fix a #warning
Remove window_surfaces, as the FIXME asks for. We don't need it because we can obtain the surface from the MetaWindow, and follow the wayland compositor path for both types of clients. https://bugzilla.gnome.org/show_bug.cgi?id=705818
This commit is contained in:
parent
ef9ef87d91
commit
03f55b9485
@ -503,14 +503,6 @@ meta_shaped_texture_get_wayland_surface (MetaShapedTexture *stex)
|
|||||||
ClutterActor *
|
ClutterActor *
|
||||||
meta_shaped_texture_new_with_xwindow (Window xwindow)
|
meta_shaped_texture_new_with_xwindow (Window xwindow)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_WAYLAND
|
|
||||||
if (meta_is_wayland_compositor ())
|
|
||||||
{
|
|
||||||
MetaWaylandSurface *surface = meta_wayland_lookup_surface_for_xid (xwindow);
|
|
||||||
return meta_shaped_texture_new_with_wayland_surface (surface);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
return g_object_new (META_TYPE_SHAPED_TEXTURE, NULL);
|
return g_object_new (META_TYPE_SHAPED_TEXTURE, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,12 +371,12 @@ meta_window_actor_constructed (GObject *object)
|
|||||||
|
|
||||||
if (!priv->actor)
|
if (!priv->actor)
|
||||||
{
|
{
|
||||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_X11)
|
|
||||||
priv->actor = meta_shaped_texture_new_with_xwindow (xwindow);
|
|
||||||
#ifdef HAVE_WAYLAND
|
#ifdef HAVE_WAYLAND
|
||||||
else
|
if (meta_is_wayland_compositor ())
|
||||||
priv->actor = meta_shaped_texture_new_with_wayland_surface (window->surface);
|
priv->actor = meta_shaped_texture_new_with_wayland_surface (window->surface);
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
priv->actor = meta_shaped_texture_new_with_xwindow (xwindow);
|
||||||
|
|
||||||
clutter_actor_add_child (CLUTTER_ACTOR (self), priv->actor);
|
clutter_actor_add_child (CLUTTER_ACTOR (self), priv->actor);
|
||||||
|
|
||||||
|
@ -164,7 +164,6 @@ struct _MetaWaylandCompositor
|
|||||||
pid_t xwayland_pid;
|
pid_t xwayland_pid;
|
||||||
struct wl_client *xwayland_client;
|
struct wl_client *xwayland_client;
|
||||||
struct wl_resource *xserver_resource;
|
struct wl_resource *xserver_resource;
|
||||||
GHashTable *window_surfaces;
|
|
||||||
|
|
||||||
MetaWaylandSeat *seat;
|
MetaWaylandSeat *seat;
|
||||||
|
|
||||||
@ -352,8 +351,6 @@ MetaWaylandCompositor *meta_wayland_compositor_get_default (void);
|
|||||||
|
|
||||||
void meta_wayland_handle_sig_child (void);
|
void meta_wayland_handle_sig_child (void);
|
||||||
|
|
||||||
MetaWaylandSurface *meta_wayland_lookup_surface_for_xid (guint32 xid);
|
|
||||||
|
|
||||||
void meta_wayland_compositor_repick (MetaWaylandCompositor *compositor);
|
void meta_wayland_compositor_repick (MetaWaylandCompositor *compositor);
|
||||||
|
|
||||||
void meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
|
void meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
|
||||||
|
@ -1138,8 +1138,6 @@ xserver_set_window_id (struct wl_client *client,
|
|||||||
|
|
||||||
surface->xid = xid;
|
surface->xid = xid;
|
||||||
|
|
||||||
g_hash_table_insert (compositor->window_surfaces, &xid, surface);
|
|
||||||
|
|
||||||
window = meta_display_lookup_x_window (display, xid);
|
window = meta_display_lookup_x_window (display, xid);
|
||||||
if (window)
|
if (window)
|
||||||
{
|
{
|
||||||
@ -1166,13 +1164,6 @@ xserver_set_window_id (struct wl_client *client,
|
|||||||
meta_wayland_compositor_set_input_focus (compositor, window);
|
meta_wayland_compositor_set_input_focus (compositor, window);
|
||||||
|
|
||||||
}
|
}
|
||||||
#warning "FIXME: Handle surface destroy and remove window_surfaces mapping"
|
|
||||||
}
|
|
||||||
|
|
||||||
MetaWaylandSurface *
|
|
||||||
meta_wayland_lookup_surface_for_xid (guint32 xid)
|
|
||||||
{
|
|
||||||
return g_hash_table_lookup (_meta_wayland_compositor.window_surfaces, &xid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct xserver_interface xserver_implementation = {
|
static const struct xserver_interface xserver_implementation = {
|
||||||
@ -1543,9 +1534,6 @@ meta_wayland_init (void)
|
|||||||
&xserver_interface, 1,
|
&xserver_interface, 1,
|
||||||
compositor, bind_xserver);
|
compositor, bind_xserver);
|
||||||
|
|
||||||
/* We need a mapping from xids to wayland surfaces... */
|
|
||||||
compositor->window_surfaces = g_hash_table_new (g_int_hash, g_int_equal);
|
|
||||||
|
|
||||||
/* XXX: It's important that we only try and start xwayland after we
|
/* XXX: It's important that we only try and start xwayland after we
|
||||||
* have initialized EGL because EGL implements the "wl_drm"
|
* have initialized EGL because EGL implements the "wl_drm"
|
||||||
* interface which xwayland requires to determine what drm device
|
* interface which xwayland requires to determine what drm device
|
||||||
|
Loading…
x
Reference in New Issue
Block a user