Remove HAVE_WAYLAND ifdefs
Wayland support is always enabled now. https://bugzilla.gnome.org/show_bug.cgi?id=705497
This commit is contained in:
parent
91cdfab495
commit
bd3d5df9ce
@ -84,9 +84,7 @@
|
||||
#include "meta-window-group.h"
|
||||
#include "window-private.h" /* to check window->hidden */
|
||||
#include "display-private.h" /* for meta_display_lookup_x_window() */
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "meta-wayland-private.h"
|
||||
#endif
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <X11/extensions/Xcomposite.h>
|
||||
|
||||
@ -633,9 +631,7 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
Window xwin;
|
||||
gint width, height;
|
||||
#ifdef HAVE_WAYLAND
|
||||
MetaWaylandCompositor *wayland_compositor;
|
||||
#endif
|
||||
|
||||
/* Check if the screen is already managed */
|
||||
if (meta_screen_get_compositor_data (screen))
|
||||
@ -668,14 +664,12 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
|
||||
/* We will have already created a stage if running as a wayland
|
||||
* compositor... */
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (meta_is_wayland_compositor ())
|
||||
{
|
||||
wayland_compositor = meta_wayland_compositor_get_default ();
|
||||
info->stage = wayland_compositor->stage;
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_WAYLAND */
|
||||
{
|
||||
info->stage = clutter_stage_new ();
|
||||
|
||||
|
@ -28,23 +28,17 @@
|
||||
#define __META_SHAPED_TEXTURE_PRIVATE_H__
|
||||
|
||||
#include <meta/meta-shaped-texture.h>
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "meta-wayland-private.h"
|
||||
#endif
|
||||
|
||||
ClutterActor *meta_shaped_texture_new_with_xwindow (Window xwindow);
|
||||
#ifdef HAVE_WAYLAND
|
||||
ClutterActor *meta_shaped_texture_new_with_wayland_surface (MetaWaylandSurface *surface);
|
||||
void meta_shaped_texture_set_wayland_surface (MetaShapedTexture *stex,
|
||||
MetaWaylandSurface *surface);
|
||||
MetaWaylandSurface *meta_shaped_texture_get_wayland_surface (MetaShapedTexture *stex);
|
||||
#endif
|
||||
|
||||
void meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
|
||||
Pixmap pixmap);
|
||||
#ifdef HAVE_WAYLAND
|
||||
void meta_shaped_texture_attach_wayland_buffer (MetaShapedTexture *stex,
|
||||
MetaWaylandBuffer *buffer);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -34,10 +34,8 @@
|
||||
#include "meta-texture-tower.h"
|
||||
|
||||
#include "meta-shaped-texture-private.h"
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "meta-wayland-private.h"
|
||||
#include <cogl/cogl-wayland-server.h>
|
||||
#endif
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <cogl/cogl.h>
|
||||
@ -65,9 +63,7 @@ static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, Clutte
|
||||
typedef enum _MetaShapedTextureType
|
||||
{
|
||||
META_SHAPED_TEXTURE_TYPE_X11_PIXMAP,
|
||||
#ifdef HAVE_WAYLAND
|
||||
META_SHAPED_TEXTURE_TYPE_WAYLAND_SURFACE,
|
||||
#endif
|
||||
} MetaShapedTextureType;
|
||||
|
||||
|
||||
@ -87,11 +83,9 @@ struct _MetaShapedTexturePrivate
|
||||
struct {
|
||||
Pixmap pixmap;
|
||||
} x11;
|
||||
#ifdef HAVE_WAYLAND
|
||||
struct {
|
||||
MetaWaylandSurface *surface;
|
||||
} wayland;
|
||||
#endif
|
||||
};
|
||||
|
||||
CoglTexture *texture;
|
||||
@ -463,7 +457,6 @@ meta_shaped_texture_get_paint_volume (ClutterActor *self,
|
||||
return clutter_paint_volume_set_from_allocation (volume, self);
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
ClutterActor *
|
||||
meta_shaped_texture_new_with_wayland_surface (MetaWaylandSurface *surface)
|
||||
{
|
||||
@ -499,7 +492,6 @@ meta_shaped_texture_get_wayland_surface (MetaShapedTexture *stex)
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
return priv->wayland.surface;
|
||||
}
|
||||
#endif /* HAVE_WAYLAND */
|
||||
|
||||
ClutterActor *
|
||||
meta_shaped_texture_new_with_xwindow (Window xwindow)
|
||||
@ -549,7 +541,6 @@ meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
static void
|
||||
wayland_surface_update_area (MetaShapedTexture *stex,
|
||||
int x,
|
||||
@ -609,7 +600,6 @@ wayland_surface_update_area (MetaShapedTexture *stex,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_WAYLAND */
|
||||
|
||||
static void
|
||||
queue_damage_redraw_with_clip (MetaShapedTexture *stex,
|
||||
@ -679,11 +669,9 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||
cogl_texture_pixmap_x11_update_area (COGL_TEXTURE_PIXMAP_X11 (priv->texture),
|
||||
x, y, width, height);
|
||||
break;
|
||||
#ifdef HAVE_WAYLAND
|
||||
case META_SHAPED_TEXTURE_TYPE_WAYLAND_SURFACE:
|
||||
wayland_surface_update_area (stex, x, y, width, height);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
|
||||
@ -727,7 +715,6 @@ meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
|
||||
COGL_TEXTURE (priv->texture));
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
void
|
||||
meta_shaped_texture_attach_wayland_buffer (MetaShapedTexture *stex,
|
||||
MetaWaylandBuffer *buffer)
|
||||
@ -773,7 +760,6 @@ meta_shaped_texture_attach_wayland_buffer (MetaShapedTexture *stex,
|
||||
meta_texture_tower_set_base_texture (priv->paint_tower,
|
||||
COGL_TEXTURE (priv->texture));
|
||||
}
|
||||
#endif /* HAVE_WAYLAND */
|
||||
|
||||
/**
|
||||
* meta_shaped_texture_get_texture:
|
||||
|
@ -5,10 +5,8 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include <wayland-server.h>
|
||||
#include <meta-wayland-private.h>
|
||||
#endif
|
||||
|
||||
#include <X11/extensions/Xdamage.h>
|
||||
#include <meta/compositor-mutter.h>
|
||||
@ -32,7 +30,6 @@ void meta_window_actor_unmaximize (MetaWindowActor *self,
|
||||
void meta_window_actor_process_x11_damage (MetaWindowActor *self,
|
||||
XDamageNotifyEvent *event);
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
void meta_window_actor_process_wayland_damage (MetaWindowActor *self,
|
||||
int x,
|
||||
int y,
|
||||
@ -42,7 +39,6 @@ void meta_window_actor_set_wayland_surface (MetaWindowActor *self,
|
||||
MetaWaylandSurface *surface);
|
||||
void meta_window_actor_attach_wayland_buffer (MetaWindowActor *self,
|
||||
MetaWaylandBuffer *buffer);
|
||||
#endif
|
||||
|
||||
void meta_window_actor_pre_paint (MetaWindowActor *self);
|
||||
void meta_window_actor_post_paint (MetaWindowActor *self);
|
||||
|
@ -33,9 +33,7 @@
|
||||
#include "meta-window-actor-private.h"
|
||||
#include "meta-texture-rectangle.h"
|
||||
#include "region-utils.h"
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "meta-wayland-private.h"
|
||||
#endif
|
||||
|
||||
enum {
|
||||
POSITION_CHANGED,
|
||||
@ -372,11 +370,9 @@ meta_window_actor_constructed (GObject *object)
|
||||
|
||||
if (!priv->actor)
|
||||
{
|
||||
#ifdef HAVE_WAYLAND
|
||||
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);
|
||||
@ -1321,10 +1317,8 @@ meta_window_actor_destroy (MetaWindowActor *self)
|
||||
|
||||
priv = self->priv;
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (meta_is_wayland_compositor ())
|
||||
meta_shaped_texture_set_wayland_surface (META_SHAPED_TEXTURE (priv->actor), NULL);
|
||||
#endif
|
||||
|
||||
window = priv->window;
|
||||
window_type = meta_window_get_window_type (window);
|
||||
@ -1568,14 +1562,12 @@ meta_window_actor_new (MetaWindow *window)
|
||||
|
||||
meta_verbose ("add window: Meta %p, xwin 0x%x\n", window, (guint)top_window);
|
||||
}
|
||||
#ifdef HAVE_WAYLAND
|
||||
else
|
||||
{
|
||||
meta_verbose ("add window: Meta %p, wayland surface %p\n",
|
||||
window, window->surface);
|
||||
top_window = None;
|
||||
}
|
||||
#endif
|
||||
|
||||
self = g_object_new (META_TYPE_WINDOW_ACTOR,
|
||||
"meta-window", window,
|
||||
@ -2023,7 +2015,6 @@ meta_window_actor_process_x11_damage (MetaWindowActor *self,
|
||||
priv->repaint_scheduled = TRUE;
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
void
|
||||
meta_window_actor_process_wayland_damage (MetaWindowActor *self,
|
||||
int x,
|
||||
@ -2040,7 +2031,6 @@ meta_window_actor_process_wayland_damage (MetaWindowActor *self,
|
||||
x, y, width, height);
|
||||
priv->repaint_scheduled = TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_window_actor_sync_visibility (MetaWindowActor *self)
|
||||
@ -2430,7 +2420,6 @@ meta_window_actor_update_shape (MetaWindowActor *self)
|
||||
clutter_actor_queue_redraw (priv->actor);
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
static void
|
||||
maybe_emit_size_changed (MetaWindowActor *self,
|
||||
MetaWaylandBuffer *new_buffer)
|
||||
@ -2491,7 +2480,6 @@ meta_window_actor_attach_wayland_buffer (MetaWindowActor *self,
|
||||
|
||||
maybe_emit_size_changed (self, buffer);
|
||||
}
|
||||
#endif /* HAVE_WAYLAND */
|
||||
|
||||
static void
|
||||
meta_window_actor_handle_updates (MetaWindowActor *self)
|
||||
|
@ -1906,9 +1906,7 @@ update_focus_window (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
gulong serial)
|
||||
{
|
||||
#ifdef HAVE_WAYLAND
|
||||
MetaWaylandCompositor *compositor;
|
||||
#endif
|
||||
|
||||
display->focus_serial = serial;
|
||||
|
||||
@ -1949,7 +1947,6 @@ update_focus_window (MetaDisplay *display,
|
||||
else
|
||||
meta_topic (META_DEBUG_FOCUS, "* Focus --> NULL with serial %lu\n", serial);
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (meta_is_wayland_compositor ())
|
||||
{
|
||||
compositor = meta_wayland_compositor_get_default ();
|
||||
@ -1962,7 +1959,6 @@ update_focus_window (MetaDisplay *display,
|
||||
else
|
||||
meta_topic (META_DEBUG_FOCUS, "Focus change has no effect, because there is no matching wayland surface");
|
||||
}
|
||||
#endif
|
||||
|
||||
g_object_notify (G_OBJECT (display), "focus-window");
|
||||
meta_display_update_active_window_hint (display);
|
||||
@ -3246,12 +3242,10 @@ event_callback (XEvent *event,
|
||||
erratically because of the lag between updating the window
|
||||
position from the surface position. Instead we bypass the
|
||||
translation altogether by directly using the Clutter events */
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (meta_is_wayland_compositor () &&
|
||||
event->type == GenericEvent &&
|
||||
event->xcookie.evtype == XI_Motion)
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
return meta_display_handle_event (display, event);
|
||||
}
|
||||
|
@ -55,9 +55,7 @@
|
||||
#include "session.h"
|
||||
#include <meta/prefs.h>
|
||||
#include <meta/compositor.h>
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "meta-wayland-private.h"
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gdk/gdkx.h>
|
||||
@ -350,10 +348,8 @@ meta_finalize (void)
|
||||
meta_display_close (display,
|
||||
CurrentTime); /* I doubt correct timestamps matter here */
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (meta_is_wayland_compositor ())
|
||||
meta_wayland_finalize ();
|
||||
#endif
|
||||
}
|
||||
|
||||
static int signal_pipe_fds[2] = { -1, -1 };
|
||||
@ -468,7 +464,6 @@ meta_init (void)
|
||||
g_irepository_prepend_search_path (MUTTER_PKGLIBDIR);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (meta_is_wayland_compositor ())
|
||||
{
|
||||
/* NB: When running as a hybrid wayland compositor we run our own headless X
|
||||
@ -476,7 +471,6 @@ meta_init (void)
|
||||
meta_wayland_init ();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
meta_select_display (opt_display_name);
|
||||
|
||||
meta_set_syncing (opt_sync || (g_getenv ("MUTTER_SYNC") != NULL));
|
||||
|
@ -45,9 +45,7 @@
|
||||
#include <meta/compositor.h>
|
||||
#include "mutter-enum-types.h"
|
||||
#include "core.h"
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "meta-wayland-private.h"
|
||||
#endif
|
||||
#include "meta-cursor-tracker-private.h"
|
||||
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
@ -675,9 +673,7 @@ meta_screen_new (MetaDisplay *display,
|
||||
char buf[128];
|
||||
guint32 manager_timestamp;
|
||||
gulong current_workspace;
|
||||
#ifdef HAVE_WAYLAND
|
||||
MetaWaylandCompositor *compositor;
|
||||
#endif
|
||||
|
||||
replace_current_wm = meta_get_replace_current_wm ();
|
||||
|
||||
@ -837,7 +833,6 @@ meta_screen_new (MetaDisplay *display,
|
||||
screen->xroot = xroot;
|
||||
screen->rect.x = screen->rect.y = 0;
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (meta_is_wayland_compositor ())
|
||||
{
|
||||
compositor = meta_wayland_compositor_get_default ();
|
||||
@ -845,7 +840,6 @@ meta_screen_new (MetaDisplay *display,
|
||||
screen->rect.height = clutter_actor_get_height (compositor->stage);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
screen->rect.width = WidthOfScreen (screen->xscreen);
|
||||
screen->rect.height = HeightOfScreen (screen->xscreen);
|
||||
|
@ -44,9 +44,7 @@
|
||||
#include <X11/Xutil.h>
|
||||
#include <cairo.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "meta-wayland-private.h"
|
||||
#endif
|
||||
|
||||
/* XXX: We should find a nicer approach to deal with the
|
||||
* circular dependency we have with the current headers
|
||||
|
@ -62,9 +62,7 @@
|
||||
|
||||
#include <X11/extensions/Xcomposite.h>
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
#include "meta-wayland-private.h"
|
||||
#endif
|
||||
|
||||
/* Windows that unmaximize to a size bigger than that fraction of the workarea
|
||||
* will be scaled down to that size (while maintaining aspect ratio).
|
||||
@ -853,9 +851,7 @@ meta_window_new_shared (MetaDisplay *display,
|
||||
window->dialog_pid = -1;
|
||||
|
||||
window->client_type = client_type;
|
||||
#ifdef HAVE_WAYLAND
|
||||
window->surface = surface;
|
||||
#endif
|
||||
window->xwindow = xwindow;
|
||||
|
||||
/* this is in window->screen->display, but that's too annoying to
|
||||
@ -1375,7 +1371,6 @@ display_notify_window (MetaDisplay *display, MetaWindow *window)
|
||||
g_signal_emit_by_name (window->display, "window-marked-urgent", window);
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
MetaWindow *
|
||||
meta_window_new_for_wayland (MetaDisplay *display,
|
||||
int width,
|
||||
@ -1447,7 +1442,6 @@ meta_window_new_for_wayland (MetaDisplay *display,
|
||||
|
||||
return window;
|
||||
}
|
||||
#endif
|
||||
|
||||
MetaWindow*
|
||||
meta_window_new_with_attrs (MetaDisplay *display,
|
||||
@ -2107,10 +2101,8 @@ meta_window_unmanage (MetaWindow *window,
|
||||
meta_error_trap_pop (window->display);
|
||||
}
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (window->surface)
|
||||
meta_wayland_surface_free (window->surface);
|
||||
#endif
|
||||
|
||||
meta_prefs_remove_listener (prefs_changed_callback, window);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user