wayland: Move surface check to MetaWaylandSurface

Allows dropping various HAVE_XWAYLAND ifdef as the function would always
return false if Mutter is built without XWayland

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2445>
This commit is contained in:
Bilal Elmoussaoui
2022-06-01 10:45:20 +02:00
parent a27b9d9707
commit 02a436d607
7 changed files with 21 additions and 25 deletions

View File

@ -92,8 +92,7 @@ cursor_sprite_prepare_at (MetaCursorSprite *cursor_sprite,
MetaWaylandSurfaceRole *role = META_WAYLAND_SURFACE_ROLE (cursor_surface);
MetaWaylandSurface *surface = meta_wayland_surface_role_get_surface (role);
#ifdef HAVE_XWAYLAND
if (!meta_xwayland_is_xwayland_surface (surface))
if (!meta_wayland_surface_is_xwayland (surface))
{
MetaWaylandSurfaceRole *surface_role =
META_WAYLAND_SURFACE_ROLE (cursor_surface);
@ -123,7 +122,6 @@ cursor_sprite_prepare_at (MetaCursorSprite *cursor_sprite,
surface->buffer_transform);
}
}
#endif
meta_wayland_surface_update_outputs (surface);
}