compositor: Move various functions to their correct namespace
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4131>
This commit is contained in:
parent
38a4b2e102
commit
1d7740d537
@ -42,8 +42,8 @@
|
|||||||
* There's two containers in the stage that are used to place window actors, here
|
* There's two containers in the stage that are used to place window actors, here
|
||||||
* are listed in the order in which they are painted:
|
* are listed in the order in which they are painted:
|
||||||
*
|
*
|
||||||
* - window group, accessible with meta_get_window_group_for_display()
|
* - window group, accessible with [method@Meta.Compositor.get_window_group]
|
||||||
* - top window group, accessible with meta_get_top_window_group_for_display()
|
* - top window group, accessible with [method@Meta.Compositor.get_top_window_group]
|
||||||
*
|
*
|
||||||
* Mutter will place actors representing windows in the window group, except for
|
* Mutter will place actors representing windows in the window group, except for
|
||||||
* override-redirect windows (ie. popups and menus) which will be placed in the
|
* override-redirect windows (ie. popups and menus) which will be placed in the
|
||||||
@ -62,7 +62,6 @@
|
|||||||
#include "compositor/meta-window-group-private.h"
|
#include "compositor/meta-window-group-private.h"
|
||||||
#include "core/util-private.h"
|
#include "core/util-private.h"
|
||||||
#include "core/window-private.h"
|
#include "core/window-private.h"
|
||||||
#include "meta/compositor-mutter.h"
|
|
||||||
#include "meta/main.h"
|
#include "meta/main.h"
|
||||||
#include "meta/meta-backend.h"
|
#include "meta/meta-backend.h"
|
||||||
#include "meta/meta-background-actor.h"
|
#include "meta/meta-background-actor.h"
|
||||||
@ -201,49 +200,35 @@ meta_compositor_destroy (MetaCompositor *compositor)
|
|||||||
g_object_unref (compositor);
|
g_object_unref (compositor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* compat helper */
|
|
||||||
static MetaCompositor *
|
|
||||||
get_compositor_for_display (MetaDisplay *display)
|
|
||||||
{
|
|
||||||
return display->compositor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_get_window_group_for_display:
|
* meta_compositor_get_window_group:
|
||||||
* @display: a #MetaDisplay
|
* @compositor: a #MetaCompositor
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): The window group corresponding to @display
|
* Returns: (transfer none): The window group corresponding to @compositor
|
||||||
*/
|
*/
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
meta_get_window_group_for_display (MetaDisplay *display)
|
meta_compositor_get_window_group (MetaCompositor *compositor)
|
||||||
{
|
{
|
||||||
MetaCompositor *compositor;
|
|
||||||
MetaCompositorPrivate *priv;
|
MetaCompositorPrivate *priv;
|
||||||
|
|
||||||
g_return_val_if_fail (display, NULL);
|
|
||||||
|
|
||||||
compositor = get_compositor_for_display (display);
|
|
||||||
g_return_val_if_fail (compositor, NULL);
|
g_return_val_if_fail (compositor, NULL);
|
||||||
|
|
||||||
priv = meta_compositor_get_instance_private (compositor);
|
priv = meta_compositor_get_instance_private (compositor);
|
||||||
|
|
||||||
return priv->window_group;
|
return priv->window_group;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_get_top_window_group_for_display:
|
* meta_compositor_get_top_window_group:
|
||||||
* @display: a #MetaDisplay
|
* @compositor: a #MetaCompositor
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): The top window group corresponding to @display
|
* Returns: (transfer none): The top window group corresponding to @compositor
|
||||||
*/
|
*/
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
meta_get_top_window_group_for_display (MetaDisplay *display)
|
meta_compositor_get_top_window_group (MetaCompositor *compositor)
|
||||||
{
|
{
|
||||||
MetaCompositor *compositor;
|
|
||||||
MetaCompositorPrivate *priv;
|
MetaCompositorPrivate *priv;
|
||||||
|
|
||||||
g_return_val_if_fail (display, NULL);
|
|
||||||
|
|
||||||
compositor = get_compositor_for_display (display);
|
|
||||||
g_return_val_if_fail (compositor, NULL);
|
g_return_val_if_fail (compositor, NULL);
|
||||||
priv = meta_compositor_get_instance_private (compositor);
|
priv = meta_compositor_get_instance_private (compositor);
|
||||||
|
|
||||||
@ -268,20 +253,16 @@ meta_compositor_get_feedback_group (MetaCompositor *compositor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_get_window_actors:
|
* meta_compositor_get_window_actors:
|
||||||
* @display: a #MetaDisplay
|
* @compositor: a #MetaCompositor
|
||||||
*
|
*
|
||||||
* Returns: (transfer none) (element-type Clutter.Actor): The set of #MetaWindowActor on @display
|
* Returns: (transfer none) (element-type Clutter.Actor): The set of #MetaWindowActor on @compositor
|
||||||
*/
|
*/
|
||||||
GList *
|
GList *
|
||||||
meta_get_window_actors (MetaDisplay *display)
|
meta_compositor_get_window_actors (MetaCompositor *compositor)
|
||||||
{
|
{
|
||||||
MetaCompositor *compositor;
|
|
||||||
MetaCompositorPrivate *priv;
|
MetaCompositorPrivate *priv;
|
||||||
|
|
||||||
g_return_val_if_fail (display, NULL);
|
|
||||||
|
|
||||||
compositor = get_compositor_for_display (display);
|
|
||||||
g_return_val_if_fail (compositor, NULL);
|
g_return_val_if_fail (compositor, NULL);
|
||||||
priv = meta_compositor_get_instance_private (compositor);
|
priv = meta_compositor_get_instance_private (compositor);
|
||||||
|
|
||||||
@ -1237,47 +1218,41 @@ meta_compositor_class_init (MetaCompositorClass *klass)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_disable_unredirect_for_display:
|
* meta_compositor_disable_unredirect:
|
||||||
* @display: a #MetaDisplay
|
* @compositor: a #MetaCompositor
|
||||||
*
|
*
|
||||||
* Disables unredirection, can be useful in situations where having
|
* Disables unredirection, can be useful in situations where having
|
||||||
* unredirected windows is undesirable like when recording a video.
|
* unredirected windows is undesirable like when recording a video.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
meta_disable_unredirect_for_display (MetaDisplay *display)
|
meta_compositor_disable_unredirect (MetaCompositor *compositor)
|
||||||
{
|
{
|
||||||
MetaCompositor *compositor;
|
|
||||||
MetaCompositorPrivate *priv;
|
MetaCompositorPrivate *priv;
|
||||||
|
|
||||||
if (display->closing)
|
|
||||||
return;
|
|
||||||
|
|
||||||
compositor = get_compositor_for_display (display);
|
|
||||||
priv = meta_compositor_get_instance_private (compositor);
|
priv = meta_compositor_get_instance_private (compositor);
|
||||||
|
if (priv->display->closing)
|
||||||
|
return;
|
||||||
|
|
||||||
priv->disable_unredirect_count++;
|
priv->disable_unredirect_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_enable_unredirect_for_display:
|
* meta_compositor_enable_unredirect:
|
||||||
* @display: a #MetaDisplay
|
* @compositor: a #MetaCompositor
|
||||||
*
|
*
|
||||||
* Enables unredirection which reduces the overhead for apps like games.
|
* Enables unredirection which reduces the overhead for apps like games.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
meta_enable_unredirect_for_display (MetaDisplay *display)
|
meta_compositor_enable_unredirect (MetaCompositor *compositor)
|
||||||
{
|
{
|
||||||
MetaCompositor *compositor;
|
MetaCompositorPrivate *priv =
|
||||||
MetaCompositorPrivate *priv;
|
meta_compositor_get_instance_private (compositor);
|
||||||
|
|
||||||
if (display->closing)
|
if (priv->display->closing)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
compositor = get_compositor_for_display (display);
|
|
||||||
priv = meta_compositor_get_instance_private (compositor);
|
|
||||||
|
|
||||||
if (priv->disable_unredirect_count == 0)
|
if (priv->disable_unredirect_count == 0)
|
||||||
g_warning ("Called enable_unredirect_for_display while unredirection is enabled.");
|
g_warning ("Called enable_unredirect_for_display while unredirection is enabled.");
|
||||||
if (priv->disable_unredirect_count > 0)
|
if (priv->disable_unredirect_count > 0)
|
||||||
|
@ -63,12 +63,11 @@ meta_feedback_actor_constructed (GObject *object)
|
|||||||
MetaFeedbackActor *self = META_FEEDBACK_ACTOR (object);
|
MetaFeedbackActor *self = META_FEEDBACK_ACTOR (object);
|
||||||
MetaFeedbackActorPrivate *priv =
|
MetaFeedbackActorPrivate *priv =
|
||||||
meta_feedback_actor_get_instance_private (self);
|
meta_feedback_actor_get_instance_private (self);
|
||||||
MetaDisplay *display = meta_compositor_get_display (priv->compositor);
|
|
||||||
ClutterActor *feedback_group;
|
ClutterActor *feedback_group;
|
||||||
|
|
||||||
feedback_group = meta_compositor_get_feedback_group (priv->compositor);
|
feedback_group = meta_compositor_get_feedback_group (priv->compositor);
|
||||||
clutter_actor_add_child (feedback_group, CLUTTER_ACTOR (object));
|
clutter_actor_add_child (feedback_group, CLUTTER_ACTOR (object));
|
||||||
meta_disable_unredirect_for_display (display);
|
meta_compositor_disable_unredirect (priv->compositor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -77,9 +76,8 @@ meta_feedback_actor_finalize (GObject *object)
|
|||||||
MetaFeedbackActor *self = META_FEEDBACK_ACTOR (object);
|
MetaFeedbackActor *self = META_FEEDBACK_ACTOR (object);
|
||||||
MetaFeedbackActorPrivate *priv =
|
MetaFeedbackActorPrivate *priv =
|
||||||
meta_feedback_actor_get_instance_private (self);
|
meta_feedback_actor_get_instance_private (self);
|
||||||
MetaDisplay *display = meta_compositor_get_display (priv->compositor);
|
|
||||||
|
|
||||||
meta_enable_unredirect_for_display (display);
|
meta_compositor_enable_unredirect (priv->compositor);
|
||||||
|
|
||||||
G_OBJECT_CLASS (meta_feedback_actor_parent_class)->finalize (object);
|
G_OBJECT_CLASS (meta_feedback_actor_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
#include "compositor/meta-plugin-manager.h"
|
#include "compositor/meta-plugin-manager.h"
|
||||||
#include "compositor/meta-surface-actor.h"
|
#include "compositor/meta-surface-actor.h"
|
||||||
#include "meta/compositor-mutter.h"
|
|
||||||
|
|
||||||
struct _MetaWindowActorClass
|
struct _MetaWindowActorClass
|
||||||
{
|
{
|
||||||
|
@ -264,7 +264,8 @@ on_switch_workspace_effect_stopped (ClutterTimeline *timeline,
|
|||||||
MetaPlugin *plugin = META_PLUGIN (data);
|
MetaPlugin *plugin = META_PLUGIN (data);
|
||||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||||
GList *l = meta_get_window_actors (display);
|
MetaCompositor *compositor = meta_display_get_compositor (display);
|
||||||
|
GList *l = meta_compositor_get_window_actors (compositor);
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
@ -434,11 +435,12 @@ start (MetaPlugin *plugin)
|
|||||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||||
MetaContext *context = meta_display_get_context (display);
|
MetaContext *context = meta_display_get_context (display);
|
||||||
MetaBackend *backend = meta_context_get_backend (context);
|
MetaBackend *backend = meta_context_get_backend (context);
|
||||||
|
MetaCompositor *compositor = meta_display_get_compositor (display);
|
||||||
MetaMonitorManager *monitor_manager =
|
MetaMonitorManager *monitor_manager =
|
||||||
meta_backend_get_monitor_manager (backend);
|
meta_backend_get_monitor_manager (backend);
|
||||||
|
|
||||||
self->priv->background_group = meta_background_group_new ();
|
self->priv->background_group = meta_background_group_new ();
|
||||||
clutter_actor_insert_child_below (meta_get_window_group_for_display (display),
|
clutter_actor_insert_child_below (meta_compositor_get_window_group (compositor),
|
||||||
self->priv->background_group, NULL);
|
self->priv->background_group, NULL);
|
||||||
|
|
||||||
g_signal_connect (monitor_manager, "monitors-changed",
|
g_signal_connect (monitor_manager, "monitors-changed",
|
||||||
@ -501,7 +503,9 @@ switch_workspace (MetaPlugin *plugin,
|
|||||||
clutter_actor_add_child (stage, workspace1);
|
clutter_actor_add_child (stage, workspace1);
|
||||||
clutter_actor_add_child (stage, workspace2);
|
clutter_actor_add_child (stage, workspace2);
|
||||||
|
|
||||||
for (l = g_list_last (meta_get_window_actors (display)); l; l = l->prev)
|
for (l = g_list_last (meta_compositor_get_window_actors (compositor));
|
||||||
|
l;
|
||||||
|
l = l->prev)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = l->data;
|
MetaWindowActor *window_actor = l->data;
|
||||||
ActorPrivate *apriv = get_actor_private (window_actor);
|
ActorPrivate *apriv = get_actor_private (window_actor);
|
||||||
@ -803,6 +807,7 @@ static DisplayTilePreview *
|
|||||||
get_display_tile_preview (MetaDisplay *display)
|
get_display_tile_preview (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
DisplayTilePreview *preview;
|
DisplayTilePreview *preview;
|
||||||
|
MetaCompositor *compositor;
|
||||||
|
|
||||||
if (!display_tile_preview_data_quark)
|
if (!display_tile_preview_data_quark)
|
||||||
{
|
{
|
||||||
@ -820,7 +825,8 @@ get_display_tile_preview (MetaDisplay *display)
|
|||||||
clutter_actor_set_background_color (preview->actor, &COGL_COLOR_INIT (0, 0, 255, 255));
|
clutter_actor_set_background_color (preview->actor, &COGL_COLOR_INIT (0, 0, 255, 255));
|
||||||
clutter_actor_set_opacity (preview->actor, 100);
|
clutter_actor_set_opacity (preview->actor, 100);
|
||||||
|
|
||||||
clutter_actor_add_child (meta_get_window_group_for_display (display), preview->actor);
|
compositor = meta_display_get_compositor (display);
|
||||||
|
clutter_actor_add_child (meta_compositor_get_window_group (compositor), preview->actor);
|
||||||
g_signal_connect (display,
|
g_signal_connect (display,
|
||||||
"closing",
|
"closing",
|
||||||
G_CALLBACK (on_display_closing),
|
G_CALLBACK (on_display_closing),
|
||||||
|
@ -53,7 +53,6 @@
|
|||||||
#include "core/util-private.h"
|
#include "core/util-private.h"
|
||||||
#include "core/window-private.h"
|
#include "core/window-private.h"
|
||||||
#include "core/workspace-private.h"
|
#include "core/workspace-private.h"
|
||||||
#include "meta/compositor-mutter.h"
|
|
||||||
#include "meta/compositor.h"
|
#include "meta/compositor.h"
|
||||||
#include "meta/main.h"
|
#include "meta/main.h"
|
||||||
#include "meta/meta-backend.h"
|
#include "meta/meta-backend.h"
|
||||||
|
@ -78,7 +78,6 @@
|
|||||||
#include "core/stack.h"
|
#include "core/stack.h"
|
||||||
#include "core/util-private.h"
|
#include "core/util-private.h"
|
||||||
#include "core/workspace-private.h"
|
#include "core/workspace-private.h"
|
||||||
#include "meta/compositor-mutter.h"
|
|
||||||
#include "meta/meta-cursor-tracker.h"
|
#include "meta/meta-cursor-tracker.h"
|
||||||
#include "meta/meta-enum-types.h"
|
#include "meta/meta-enum-types.h"
|
||||||
#include "meta/prefs.h"
|
#include "meta/prefs.h"
|
||||||
|
@ -1,45 +0,0 @@
|
|||||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2008 Matthew Allum
|
|
||||||
* Copyright (C) 2007 Iain Holmes
|
|
||||||
* Based on xcompmgr - (c) 2003 Keith Packard
|
|
||||||
* xfwm4 - (c) 2005-2007 Olivier Fourdan
|
|
||||||
*
|
|
||||||
* 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, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "clutter/clutter.h"
|
|
||||||
#include "meta/compositor.h"
|
|
||||||
#include "meta/meta-window-actor.h"
|
|
||||||
#include "meta/types.h"
|
|
||||||
|
|
||||||
/* Public compositor API */
|
|
||||||
|
|
||||||
META_EXPORT
|
|
||||||
GList *meta_get_window_actors (MetaDisplay *display);
|
|
||||||
|
|
||||||
META_EXPORT
|
|
||||||
ClutterActor *meta_get_window_group_for_display (MetaDisplay *display);
|
|
||||||
|
|
||||||
META_EXPORT
|
|
||||||
ClutterActor *meta_get_top_window_group_for_display (MetaDisplay *display);
|
|
||||||
|
|
||||||
META_EXPORT
|
|
||||||
void meta_disable_unredirect_for_display (MetaDisplay *display);
|
|
||||||
|
|
||||||
META_EXPORT
|
|
||||||
void meta_enable_unredirect_for_display (MetaDisplay *display);
|
|
@ -77,3 +77,18 @@ MetaBackend * meta_compositor_get_backend (MetaCompositor *compositor);
|
|||||||
|
|
||||||
META_EXPORT
|
META_EXPORT
|
||||||
ClutterStage * meta_compositor_get_stage (MetaCompositor *compositor);
|
ClutterStage * meta_compositor_get_stage (MetaCompositor *compositor);
|
||||||
|
|
||||||
|
META_EXPORT
|
||||||
|
ClutterActor * meta_compositor_get_window_group (MetaCompositor *compositor);
|
||||||
|
|
||||||
|
META_EXPORT
|
||||||
|
GList * meta_compositor_get_window_actors (MetaCompositor *compositor);
|
||||||
|
|
||||||
|
META_EXPORT
|
||||||
|
ClutterActor * meta_compositor_get_top_window_group (MetaCompositor *compositor);
|
||||||
|
|
||||||
|
META_EXPORT
|
||||||
|
void meta_compositor_disable_unredirect (MetaCompositor *compositor);
|
||||||
|
|
||||||
|
META_EXPORT
|
||||||
|
void meta_compositor_enable_unredirect (MetaCompositor *compositor);
|
||||||
|
@ -3,7 +3,6 @@ mutter_public_headers = [
|
|||||||
'boxes.h',
|
'boxes.h',
|
||||||
'common.h',
|
'common.h',
|
||||||
'compositor.h',
|
'compositor.h',
|
||||||
'compositor-mutter.h',
|
|
||||||
'display.h',
|
'display.h',
|
||||||
'keybindings.h',
|
'keybindings.h',
|
||||||
'main.h',
|
'main.h',
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
|
|
||||||
#include "clutter/clutter.h"
|
#include "clutter/clutter.h"
|
||||||
#include "meta/compositor-mutter.h"
|
|
||||||
#include "meta/compositor.h"
|
#include "meta/compositor.h"
|
||||||
#include "meta/meta-close-dialog.h"
|
#include "meta/meta-close-dialog.h"
|
||||||
#include "meta/meta-inhibit-shortcuts-dialog.h"
|
#include "meta/meta-inhibit-shortcuts-dialog.h"
|
||||||
|
#include "meta/meta-window-actor.h"
|
||||||
#include "meta/types.h"
|
#include "meta/types.h"
|
||||||
|
|
||||||
#define META_TYPE_PLUGIN (meta_plugin_get_type ())
|
#define META_TYPE_PLUGIN (meta_plugin_get_type ())
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#include "backends/meta-gpu.h"
|
#include "backends/meta-gpu.h"
|
||||||
#include "backends/meta-stage-private.h"
|
#include "backends/meta-stage-private.h"
|
||||||
#include "clutter/clutter/clutter-stage-view-private.h"
|
#include "clutter/clutter/clutter-stage-view-private.h"
|
||||||
#include "meta/compositor-mutter.h"
|
#include "meta/compositor.h"
|
||||||
#include "tests/meta-ref-test-utils.h"
|
#include "tests/meta-ref-test-utils.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -154,9 +154,10 @@ capture_view (ClutterStageView *stage_view)
|
|||||||
MetaStage *stage = META_STAGE (meta_backend_get_stage (backend));
|
MetaStage *stage = META_STAGE (meta_backend_get_stage (backend));
|
||||||
MetaContext *context = meta_backend_get_context (backend);
|
MetaContext *context = meta_backend_get_context (backend);
|
||||||
MetaDisplay *display = meta_context_get_display (context);
|
MetaDisplay *display = meta_context_get_display (context);
|
||||||
|
MetaCompositor *compositor = meta_display_get_compositor (display);
|
||||||
CaptureViewData data = { 0 };
|
CaptureViewData data = { 0 };
|
||||||
|
|
||||||
meta_disable_unredirect_for_display (display);
|
meta_compositor_disable_unredirect (compositor);
|
||||||
|
|
||||||
data.loop = g_main_loop_new (NULL, FALSE);
|
data.loop = g_main_loop_new (NULL, FALSE);
|
||||||
data.watch = meta_stage_watch_view (stage, stage_view,
|
data.watch = meta_stage_watch_view (stage, stage_view,
|
||||||
@ -172,7 +173,7 @@ capture_view (ClutterStageView *stage_view)
|
|||||||
g_assert_null (data.watch);
|
g_assert_null (data.watch);
|
||||||
g_assert_nonnull (data.out_image);
|
g_assert_nonnull (data.out_image);
|
||||||
|
|
||||||
meta_enable_unredirect_for_display (display);
|
meta_compositor_enable_unredirect (compositor);
|
||||||
|
|
||||||
return data.out_image;
|
return data.out_image;
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,8 @@ on_switch_workspace_effect_stopped (ClutterTimeline *timeline,
|
|||||||
MetaPlugin *plugin = META_PLUGIN (data);
|
MetaPlugin *plugin = META_PLUGIN (data);
|
||||||
MetaTestShell *test_shell = META_TEST_SHELL (plugin);
|
MetaTestShell *test_shell = META_TEST_SHELL (plugin);
|
||||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||||
GList *l = meta_get_window_actors (display);
|
MetaCompositor *compositor = meta_display_get_compositor (display);
|
||||||
|
GList *l = meta_compositor_get_window_actors (compositor);
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
@ -347,13 +348,14 @@ meta_test_shell_start (MetaPlugin *plugin)
|
|||||||
{
|
{
|
||||||
MetaTestShell *test_shell = META_TEST_SHELL (plugin);
|
MetaTestShell *test_shell = META_TEST_SHELL (plugin);
|
||||||
MetaDisplay *display = meta_plugin_get_display (plugin);
|
MetaDisplay *display = meta_plugin_get_display (plugin);
|
||||||
|
MetaCompositor *compositor = meta_display_get_compositor (display);
|
||||||
MetaContext *context = meta_display_get_context (display);
|
MetaContext *context = meta_display_get_context (display);
|
||||||
MetaBackend *backend = meta_context_get_backend (context);
|
MetaBackend *backend = meta_context_get_backend (context);
|
||||||
MetaMonitorManager *monitor_manager =
|
MetaMonitorManager *monitor_manager =
|
||||||
meta_backend_get_monitor_manager (backend);
|
meta_backend_get_monitor_manager (backend);
|
||||||
|
|
||||||
test_shell->background_group = meta_background_group_new ();
|
test_shell->background_group = meta_background_group_new ();
|
||||||
clutter_actor_insert_child_below (meta_get_window_group_for_display (display),
|
clutter_actor_insert_child_below (meta_compositor_get_window_group (compositor),
|
||||||
test_shell->background_group, NULL);
|
test_shell->background_group, NULL);
|
||||||
|
|
||||||
g_signal_connect (monitor_manager, "monitors-changed",
|
g_signal_connect (monitor_manager, "monitors-changed",
|
||||||
@ -415,7 +417,9 @@ meta_test_shell_switch_workspace (MetaPlugin *plugin,
|
|||||||
clutter_actor_add_child (stage, workspace1);
|
clutter_actor_add_child (stage, workspace1);
|
||||||
clutter_actor_add_child (stage, workspace2);
|
clutter_actor_add_child (stage, workspace2);
|
||||||
|
|
||||||
for (l = g_list_last (meta_get_window_actors (display)); l; l = l->prev)
|
for (l = g_list_last (meta_compositor_get_window_actors (compositor));
|
||||||
|
l;
|
||||||
|
l = l->prev)
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = l->data;
|
MetaWindowActor *window_actor = l->data;
|
||||||
ActorPrivate *actor_priv = get_actor_private (window_actor);
|
ActorPrivate *actor_priv = get_actor_private (window_actor);
|
||||||
@ -713,6 +717,7 @@ static DisplayTilePreview *
|
|||||||
get_display_tile_preview (MetaDisplay *display)
|
get_display_tile_preview (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
DisplayTilePreview *preview;
|
DisplayTilePreview *preview;
|
||||||
|
MetaCompositor *compositor;
|
||||||
|
|
||||||
if (!display_tile_preview_data_quark)
|
if (!display_tile_preview_data_quark)
|
||||||
{
|
{
|
||||||
@ -730,7 +735,8 @@ get_display_tile_preview (MetaDisplay *display)
|
|||||||
clutter_actor_set_background_color (preview->actor, &COGL_COLOR_INIT (0, 0, 255, 255));
|
clutter_actor_set_background_color (preview->actor, &COGL_COLOR_INIT (0, 0, 255, 255));
|
||||||
clutter_actor_set_opacity (preview->actor, 100);
|
clutter_actor_set_opacity (preview->actor, 100);
|
||||||
|
|
||||||
clutter_actor_add_child (meta_get_window_group_for_display (display),
|
compositor = meta_display_get_compositor (display);
|
||||||
|
clutter_actor_add_child (meta_compositor_get_window_group (compositor),
|
||||||
preview->actor);
|
preview->actor);
|
||||||
g_signal_connect (display,
|
g_signal_connect (display,
|
||||||
"closing",
|
"closing",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user