compositor/actor: Guard X11 actor usage
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3540>
This commit is contained in:
parent
b6f38b21b7
commit
67e21e0881
1 changed files with 9 additions and 3 deletions
|
@ -26,13 +26,16 @@
|
|||
#include "backends/meta-screen-cast-window.h"
|
||||
#include "compositor/compositor-private.h"
|
||||
#include "compositor/meta-shaped-texture-private.h"
|
||||
#include "compositor/meta-surface-actor-x11.h"
|
||||
#include "compositor/meta-surface-actor.h"
|
||||
#include "compositor/meta-window-actor-private.h"
|
||||
#include "core/boxes-private.h"
|
||||
#include "core/window-private.h"
|
||||
#include "meta/window.h"
|
||||
|
||||
#ifdef HAVE_X11_CLIENT
|
||||
#include "compositor/meta-surface-actor-x11.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "compositor/meta-surface-actor-wayland.h"
|
||||
#include "wayland/meta-wayland-surface-private.h"
|
||||
|
@ -492,12 +495,14 @@ init_surface_actor (MetaWindowActor *self)
|
|||
MetaWindow *window = priv->window;
|
||||
MetaSurfaceActor *surface_actor = NULL;
|
||||
|
||||
#ifdef HAVE_X11_CLIENT
|
||||
if (!meta_is_wayland_compositor ())
|
||||
{
|
||||
surface_actor = meta_surface_actor_x11_new (window);
|
||||
}
|
||||
#ifdef HAVE_WAYLAND
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_WAYLAND
|
||||
{
|
||||
MetaWaylandSurface *surface = meta_window_get_wayland_surface (window);
|
||||
surface_actor = surface ? meta_wayland_surface_get_actor (surface) : NULL;
|
||||
|
@ -948,10 +953,11 @@ meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
|
|||
|
||||
/* When running as a Wayland compositor we catch size changes when new
|
||||
* buffers are attached */
|
||||
#ifdef HAVE_X11_CLIENT
|
||||
if (META_IS_SURFACE_ACTOR_X11 (priv->surface))
|
||||
meta_surface_actor_x11_set_size (META_SURFACE_ACTOR_X11 (priv->surface),
|
||||
actor_rect.width, actor_rect.height);
|
||||
|
||||
#endif
|
||||
/* Normally we want freezing a window to also freeze its position; this allows
|
||||
* windows to atomically move and resize together, either under app control,
|
||||
* or because the user is resizing from the left/top. But on initial placement
|
||||
|
|
Loading…
Reference in a new issue