1
0
Fork 0

Rename MetaWaylandStage to MetaStage and put in compositor/

This commit is contained in:
Jasper St. Pierre 2014-04-22 14:46:57 -04:00
parent 6072e981a8
commit 2769683521
5 changed files with 70 additions and 69 deletions

View file

@ -120,6 +120,8 @@ libmutter_la_SOURCES = \
compositor/meta-surface-actor-x11.h \
compositor/meta-surface-actor-wayland.c \
compositor/meta-surface-actor-wayland.h \
compositor/meta-stage.h \
compositor/meta-stage.c \
compositor/meta-texture-rectangle.c \
compositor/meta-texture-rectangle.h \
compositor/meta-texture-tower.c \
@ -229,8 +231,6 @@ libmutter_la_SOURCES = \
wayland/meta-wayland-pointer.h \
wayland/meta-wayland-seat.c \
wayland/meta-wayland-seat.h \
wayland/meta-wayland-stage.h \
wayland/meta-wayland-stage.c \
wayland/meta-wayland-surface.c \
wayland/meta-wayland-surface.h \
wayland/meta-wayland-types.h \

View file

@ -72,6 +72,7 @@
#include <meta/meta-shadow-factory.h>
#include "meta-window-actor-private.h"
#include "meta-window-group.h"
#include "meta-stage.h"
#include "window-private.h" /* to check window->hidden */
#include "display-private.h" /* for meta_display_lookup_x_window() */
#include "util-private.h"
@ -79,7 +80,6 @@
#include <X11/extensions/shape.h>
#include <X11/extensions/Xcomposite.h>
#include "wayland/meta-wayland-stage.h"
#include "wayland/meta-wayland-private.h"
static gboolean
@ -527,7 +527,7 @@ meta_compositor_manage (MetaCompositor *compositor)
{
MetaWaylandCompositor *wayland_compositor = meta_wayland_compositor_get_default ();
compositor->stage = meta_wayland_stage_new ();
compositor->stage = meta_stage_new ();
clutter_actor_show (compositor->stage);
wayland_compositor->stage = compositor->stage;

View file

@ -1,7 +1,5 @@
/*
* Wayland Support
*
* Copyright (C) 2012 Intel Corporation
* Copyright (C) 2014 Red Hat
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@ -17,21 +15,24 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* Written by:
* Jasper St. Pierre <jstpierre@mecheye.net>
*/
#include <config.h>
#include "meta-wayland-stage.h"
#include "meta-stage.h"
#include "meta-backend.h"
#include <meta/util.h>
G_DEFINE_TYPE (MetaWaylandStage, meta_wayland_stage, CLUTTER_TYPE_STAGE);
G_DEFINE_TYPE (MetaStage, meta_stage, CLUTTER_TYPE_STAGE);
static void
meta_wayland_stage_paint (ClutterActor *actor)
meta_stage_paint (ClutterActor *actor)
{
CLUTTER_ACTOR_CLASS (meta_wayland_stage_parent_class)->paint (actor);
CLUTTER_ACTOR_CLASS (meta_stage_parent_class)->paint (actor);
if (meta_is_wayland_compositor ())
{
@ -42,23 +43,23 @@ meta_wayland_stage_paint (ClutterActor *actor)
}
static void
meta_wayland_stage_class_init (MetaWaylandStageClass *klass)
meta_stage_class_init (MetaStageClass *klass)
{
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
actor_class->paint = meta_wayland_stage_paint;
actor_class->paint = meta_stage_paint;
}
static void
meta_wayland_stage_init (MetaWaylandStage *self)
meta_stage_init (MetaStage *self)
{
clutter_stage_set_user_resizable (CLUTTER_STAGE (self), FALSE);
}
ClutterActor *
meta_wayland_stage_new (void)
meta_stage_new (void)
{
return g_object_new (META_TYPE_WAYLAND_STAGE,
return g_object_new (META_TYPE_STAGE,
"cursor-visible", FALSE,
NULL);
}

View file

@ -0,0 +1,53 @@
/*
* Copyright (C) 2012 Intel Corporation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_STAGE_H
#define META_STAGE_H
#include <clutter/clutter.h>
G_BEGIN_DECLS
#define META_TYPE_STAGE (meta_stage_get_type ())
#define META_STAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_STAGE, MetaStage))
#define META_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_STAGE, MetaStageClass))
#define META_IS_STAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_STAGE))
#define META_IS_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_STAGE))
#define META_STAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_STAGE, MetaStageClass))
typedef struct _MetaStage MetaStage;
typedef struct _MetaStageClass MetaStageClass;
struct _MetaStageClass
{
ClutterStageClass parent_class;
};
struct _MetaStage
{
ClutterStage parent;
};
GType meta_stage_get_type (void) G_GNUC_CONST;
ClutterActor *meta_stage_new (void);
G_END_DECLS
#endif /* META_STAGE_H */

View file

@ -1,53 +0,0 @@
/*
* Copyright (C) 2012 Intel Corporation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_WAYLAND_STAGE_H
#define META_WAYLAND_STAGE_H
#include <clutter/clutter.h>
G_BEGIN_DECLS
#define META_TYPE_WAYLAND_STAGE (meta_wayland_stage_get_type ())
#define META_WAYLAND_STAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_WAYLAND_STAGE, MetaWaylandStage))
#define META_WAYLAND_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_WAYLAND_STAGE, MetaWaylandStageClass))
#define META_IS_WAYLAND_STAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_WAYLAND_STAGE))
#define META_IS_WAYLAND_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_WAYLAND_STAGE))
#define META_WAYLAND_STAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_WAYLAND_STAGE, MetaWaylandStageClass))
typedef struct _MetaWaylandStage MetaWaylandStage;
typedef struct _MetaWaylandStageClass MetaWaylandStageClass;
struct _MetaWaylandStageClass
{
ClutterStageClass parent_class;
};
struct _MetaWaylandStage
{
ClutterStage parent;
};
GType meta_wayland_stage_get_type (void) G_GNUC_CONST;
ClutterActor *meta_wayland_stage_new (void);
G_END_DECLS
#endif /* META_WAYLAND_STAGE_H */