compositor: Create the MetaWaylandStage here

This commit is contained in:
Jasper St. Pierre 2014-04-22 14:35:56 -04:00
parent a0d608e083
commit 168ede9374
2 changed files with 7 additions and 10 deletions

View File

@ -79,6 +79,7 @@
#include <X11/extensions/shape.h>
#include <X11/extensions/Xcomposite.h>
#include "wayland/meta-wayland-stage.h"
#include "wayland/meta-wayland-private.h"
static gboolean
@ -519,16 +520,17 @@ meta_compositor_manage (MetaCompositor *compositor)
MetaScreen *screen = display->screen;
Window xwin = 0;
gint width, height;
MetaWaylandCompositor *wayland_compositor;
meta_screen_set_cm_selection (display->screen);
/* We will have already created a stage if running as a wayland
* compositor... */
if (meta_is_wayland_compositor ())
{
wayland_compositor = meta_wayland_compositor_get_default ();
compositor->stage = wayland_compositor->stage;
MetaWaylandCompositor *wayland_compositor = meta_wayland_compositor_get_default ();
compositor->stage = meta_wayland_stage_new ();
clutter_actor_show (compositor->stage);
wayland_compositor->stage = compositor->stage;
meta_screen_get_size (screen, &width, &height);
clutter_actor_set_size (compositor->stage, width, height);

View File

@ -41,7 +41,6 @@
#include "meta-wayland-private.h"
#include "meta-xwayland-private.h"
#include "meta-wayland-stage.h"
#include "meta-window-actor-private.h"
#include "meta-wayland-seat.h"
#include "meta-wayland-keyboard.h"
@ -631,16 +630,12 @@ meta_wayland_init (void)
compositor->outputs = g_hash_table_new_full (NULL, NULL, NULL, wayland_output_destroy_notify);
compositor->outputs = meta_wayland_compositor_update_outputs (compositor, monitors);
compositor->stage = meta_wayland_stage_new ();
meta_wayland_data_device_manager_init (compositor->wayland_display);
compositor->seat = meta_wayland_seat_new (compositor->wayland_display);
meta_wayland_init_shell (compositor);
clutter_actor_show (compositor->stage);
/* FIXME: find the first free name instead */
compositor->display_name = g_strdup ("wayland-0");
if (wl_display_add_socket (compositor->wayland_display, compositor->display_name))