diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index cc095751b..f0279f95c 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -503,15 +503,7 @@ meta_shaped_texture_get_wayland_surface (MetaShapedTexture *stex) ClutterActor * 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); } void diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index c905fbd77..d738947a9 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -371,12 +371,12 @@ meta_window_actor_constructed (GObject *object) if (!priv->actor) { - if (window->client_type == META_WINDOW_CLIENT_TYPE_X11) - priv->actor = meta_shaped_texture_new_with_xwindow (xwindow); #ifdef HAVE_WAYLAND - else + if (meta_is_wayland_compositor ()) priv->actor = meta_shaped_texture_new_with_wayland_surface (window->surface); + else #endif + priv->actor = meta_shaped_texture_new_with_xwindow (xwindow); clutter_actor_add_child (CLUTTER_ACTOR (self), priv->actor); diff --git a/src/wayland/meta-wayland-private.h b/src/wayland/meta-wayland-private.h index c33f7f943..b4ba57d51 100644 --- a/src/wayland/meta-wayland-private.h +++ b/src/wayland/meta-wayland-private.h @@ -164,7 +164,6 @@ struct _MetaWaylandCompositor pid_t xwayland_pid; struct wl_client *xwayland_client; struct wl_resource *xserver_resource; - GHashTable *window_surfaces; MetaWaylandSeat *seat; @@ -352,8 +351,6 @@ MetaWaylandCompositor *meta_wayland_compositor_get_default (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_set_input_focus (MetaWaylandCompositor *compositor, diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index b260c0d2d..b01c60bad 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -1138,8 +1138,6 @@ xserver_set_window_id (struct wl_client *client, surface->xid = xid; - g_hash_table_insert (compositor->window_surfaces, &xid, surface); - window = meta_display_lookup_x_window (display, xid); if (window) { @@ -1166,13 +1164,6 @@ xserver_set_window_id (struct wl_client *client, 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 = { @@ -1543,9 +1534,6 @@ meta_wayland_init (void) &xserver_interface, 1, 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 * have initialized EGL because EGL implements the "wl_drm" * interface which xwayland requires to determine what drm device