2012-01-18 23:03:23 +00:00
|
|
|
/*
|
|
|
|
* Wayland Support
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "meta-wayland-stage.h"
|
2014-04-22 00:49:38 +00:00
|
|
|
|
2014-04-22 18:32:55 +00:00
|
|
|
#include "meta-backend.h"
|
|
|
|
#include <meta/util.h>
|
2012-01-18 23:03:23 +00:00
|
|
|
|
|
|
|
G_DEFINE_TYPE (MetaWaylandStage, meta_wayland_stage, CLUTTER_TYPE_STAGE);
|
|
|
|
|
|
|
|
static void
|
|
|
|
meta_wayland_stage_paint (ClutterActor *actor)
|
|
|
|
{
|
|
|
|
CLUTTER_ACTOR_CLASS (meta_wayland_stage_parent_class)->paint (actor);
|
|
|
|
|
2014-04-22 18:32:55 +00:00
|
|
|
if (meta_is_wayland_compositor ())
|
|
|
|
{
|
|
|
|
MetaBackend *backend = meta_get_backend ();
|
|
|
|
MetaCursorRenderer *renderer = meta_backend_get_cursor_renderer (backend);
|
|
|
|
meta_cursor_renderer_paint (renderer);
|
|
|
|
}
|
2012-01-18 23:03:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
meta_wayland_stage_class_init (MetaWaylandStageClass *klass)
|
|
|
|
{
|
|
|
|
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
|
|
|
|
|
|
|
|
actor_class->paint = meta_wayland_stage_paint;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
meta_wayland_stage_init (MetaWaylandStage *self)
|
|
|
|
{
|
2013-08-19 09:12:42 +00:00
|
|
|
clutter_stage_set_user_resizable (CLUTTER_STAGE (self), FALSE);
|
2012-01-18 23:03:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ClutterActor *
|
|
|
|
meta_wayland_stage_new (void)
|
|
|
|
{
|
2014-04-22 01:06:18 +00:00
|
|
|
return g_object_new (META_TYPE_WAYLAND_STAGE,
|
|
|
|
"cursor-visible", FALSE,
|
|
|
|
NULL);
|
2012-01-18 23:03:23 +00:00
|
|
|
}
|