Adapt to removal of Mutter namespace
MutterWindow and MutterPlugin have been renamed to MetaWindowActor and MetaPlugin, mutter_plugin_list_windows() to meta_plugin_list_window_actors(). Adapt to those changes. https://bugzilla.gnome.org/show_bug.cgi?id=632500
This commit is contained in:
parent
6b47b78d4d
commit
2fa6f7ba7e
@ -233,7 +233,7 @@ Chrome.prototype = {
|
||||
},
|
||||
|
||||
_windowsRestacked: function() {
|
||||
let windows = global.get_windows();
|
||||
let windows = global.get_window_actors();
|
||||
let primary = global.get_primary_monitor();
|
||||
|
||||
// The chrome layer should be visible unless there is a window
|
||||
|
@ -220,7 +220,7 @@ WindowList.prototype = {
|
||||
|
||||
_updateWindowList: function() {
|
||||
this.actor.get_children().forEach(function (actor) { actor.destroy(); });
|
||||
let windows = global.get_windows();
|
||||
let windows = global.get_window_actors();
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
for (let i = 0; i < windows.length; i++) {
|
||||
let metaWindow = windows[i].metaWindow;
|
||||
|
@ -253,11 +253,11 @@ function _relayout() {
|
||||
// metacity-clutter currently uses the same prefs as plain metacity,
|
||||
// which probably means we'll be starting out with multiple workspaces;
|
||||
// remove any unused ones. (We do this from an idle handler, because
|
||||
// global.get_windows() still returns NULL at the point when start()
|
||||
// global.get_window_actors() still returns NULL at the point when start()
|
||||
// is called.)
|
||||
function _removeUnusedWorkspaces() {
|
||||
|
||||
let windows = global.get_windows();
|
||||
let windows = global.get_window_actors();
|
||||
let maxWorkspace = 0;
|
||||
for (let i = 0; i < windows.length; i++) {
|
||||
let win = windows[i];
|
||||
|
@ -415,7 +415,7 @@ WindowManager.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
let windows = global.get_windows();
|
||||
let windows = global.get_window_actors();
|
||||
|
||||
/* @direction is the direction that the "camera" moves, so the
|
||||
* screen contents have to move one screen's worth in the
|
||||
|
@ -602,7 +602,7 @@ Workspace.prototype = {
|
||||
this.actor.height = global.screen_height;
|
||||
this.scale = 1.0;
|
||||
|
||||
let windows = global.get_windows().filter(this._isMyWindow, this);
|
||||
let windows = global.get_window_actors().filter(this._isMyWindow, this);
|
||||
|
||||
// Find the desktop window
|
||||
for (let i = 0; i < windows.length; i++) {
|
||||
|
@ -190,7 +190,7 @@ GenericWorkspacesView.prototype = {
|
||||
},
|
||||
|
||||
_onRestacked: function() {
|
||||
let stack = global.get_windows();
|
||||
let stack = global.get_window_actors();
|
||||
let stackIndices = {};
|
||||
|
||||
for (let i = 0; i < stack.length; i++) {
|
||||
|
@ -25,8 +25,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define MUTTER_BUILDING_PLUGIN 1
|
||||
#include <mutter-plugin.h>
|
||||
#include <meta-plugin.h>
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
@ -57,38 +56,40 @@
|
||||
static void gnome_shell_plugin_dispose (GObject *object);
|
||||
static void gnome_shell_plugin_finalize (GObject *object);
|
||||
|
||||
static void gnome_shell_plugin_start (MutterPlugin *plugin);
|
||||
static void gnome_shell_plugin_minimize (MutterPlugin *plugin,
|
||||
MutterWindow *actor);
|
||||
static void gnome_shell_plugin_maximize (MutterPlugin *plugin,
|
||||
MutterWindow *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
static void gnome_shell_plugin_unmaximize (MutterPlugin *plugin,
|
||||
MutterWindow *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
static void gnome_shell_plugin_map (MutterPlugin *plugin,
|
||||
MutterWindow *actor);
|
||||
static void gnome_shell_plugin_destroy (MutterPlugin *plugin,
|
||||
MutterWindow *actor);
|
||||
static void gnome_shell_plugin_start (MetaPlugin *plugin);
|
||||
static void gnome_shell_plugin_minimize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
static void gnome_shell_plugin_maximize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
static void gnome_shell_plugin_unmaximize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
static void gnome_shell_plugin_map (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
static void gnome_shell_plugin_destroy (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
|
||||
static void gnome_shell_plugin_switch_workspace (MutterPlugin *plugin,
|
||||
gint from,
|
||||
gint to,
|
||||
MetaMotionDirection direction);
|
||||
static void gnome_shell_plugin_switch_workspace (MetaPlugin *plugin,
|
||||
gint from,
|
||||
gint to,
|
||||
MetaMotionDirection direction);
|
||||
|
||||
static void gnome_shell_plugin_kill_window_effects (MutterPlugin *plugin,
|
||||
MutterWindow *actor);
|
||||
static void gnome_shell_plugin_kill_switch_workspace (MutterPlugin *plugin);
|
||||
static void gnome_shell_plugin_kill_window_effects (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
static void gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin);
|
||||
|
||||
|
||||
static gboolean gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
|
||||
XEvent *event);
|
||||
static const MetaPluginInfo *gnome_shell_plugin_plugin_info (MetaPlugin *plugin);
|
||||
|
||||
static gboolean gnome_shell_plugin_xevent_filter (MutterPlugin *plugin,
|
||||
XEvent *event);
|
||||
static const MutterPluginInfo *gnome_shell_plugin_plugin_info (MutterPlugin *plugin);
|
||||
|
||||
#define GNOME_TYPE_SHELL_PLUGIN (gnome_shell_plugin_get_type ())
|
||||
#define GNOME_SHELL_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_SHELL_PLUGIN, GnomeShellPlugin))
|
||||
@ -102,7 +103,7 @@ typedef struct _GnomeShellPluginClass GnomeShellPluginClass;
|
||||
|
||||
struct _GnomeShellPlugin
|
||||
{
|
||||
MutterPlugin parent;
|
||||
MetaPlugin parent;
|
||||
|
||||
GjsContext *gjs_context;
|
||||
Atom panel_action;
|
||||
@ -116,20 +117,20 @@ struct _GnomeShellPlugin
|
||||
|
||||
struct _GnomeShellPluginClass
|
||||
{
|
||||
MutterPluginClass parent_class;
|
||||
MetaPluginClass parent_class;
|
||||
};
|
||||
|
||||
/*
|
||||
* Create the plugin struct; function pointers initialized in
|
||||
* g_module_check_init().
|
||||
*/
|
||||
MUTTER_PLUGIN_DECLARE(GnomeShellPlugin, gnome_shell_plugin);
|
||||
META_PLUGIN_DECLARE(GnomeShellPlugin, gnome_shell_plugin);
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_class_init (GnomeShellPluginClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
MutterPluginClass *plugin_class = MUTTER_PLUGIN_CLASS (klass);
|
||||
MetaPluginClass *plugin_class = META_PLUGIN_CLASS (klass);
|
||||
|
||||
gobject_class->dispose = gnome_shell_plugin_dispose;
|
||||
gobject_class->finalize = gnome_shell_plugin_finalize;
|
||||
@ -306,7 +307,7 @@ gvc_muted_debug_log_handler (const char *log_domain,
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_start (MutterPlugin *plugin)
|
||||
gnome_shell_plugin_start (MetaPlugin *plugin)
|
||||
{
|
||||
GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin);
|
||||
MetaScreen *screen;
|
||||
@ -336,7 +337,7 @@ gnome_shell_plugin_start (MutterPlugin *plugin)
|
||||
NULL);
|
||||
update_font_options (settings);
|
||||
|
||||
screen = mutter_plugin_get_screen (plugin);
|
||||
screen = meta_plugin_get_screen (plugin);
|
||||
display = meta_screen_get_display (screen);
|
||||
|
||||
xdisplay = meta_display_get_xdisplay (display);
|
||||
@ -371,7 +372,7 @@ gnome_shell_plugin_start (MutterPlugin *plugin)
|
||||
/* Initialize the global object here. */
|
||||
global = shell_global_get ();
|
||||
|
||||
_shell_global_set_plugin (global, MUTTER_PLUGIN(shell_plugin));
|
||||
_shell_global_set_plugin (global, META_PLUGIN(shell_plugin));
|
||||
_shell_global_set_gjs_context (global, shell_plugin->gjs_context);
|
||||
|
||||
add_statistics (shell_plugin);
|
||||
@ -427,8 +428,8 @@ get_shell_wm (void)
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_minimize (MutterPlugin *plugin,
|
||||
MutterWindow *actor)
|
||||
gnome_shell_plugin_minimize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
_shell_wm_minimize (get_shell_wm (),
|
||||
actor);
|
||||
@ -436,70 +437,70 @@ gnome_shell_plugin_minimize (MutterPlugin *plugin,
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_maximize (MutterPlugin *plugin,
|
||||
MutterWindow *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
gnome_shell_plugin_maximize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
_shell_wm_maximize (get_shell_wm (),
|
||||
actor, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_unmaximize (MutterPlugin *plugin,
|
||||
MutterWindow *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
gnome_shell_plugin_unmaximize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
_shell_wm_unmaximize (get_shell_wm (),
|
||||
actor, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_map (MutterPlugin *plugin,
|
||||
MutterWindow *actor)
|
||||
gnome_shell_plugin_map (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
_shell_wm_map (get_shell_wm (),
|
||||
actor);
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_destroy (MutterPlugin *plugin,
|
||||
MutterWindow *actor)
|
||||
gnome_shell_plugin_destroy (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
_shell_wm_destroy (get_shell_wm (),
|
||||
actor);
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_switch_workspace (MutterPlugin *plugin,
|
||||
gint from,
|
||||
gint to,
|
||||
MetaMotionDirection direction)
|
||||
gnome_shell_plugin_switch_workspace (MetaPlugin *plugin,
|
||||
gint from,
|
||||
gint to,
|
||||
MetaMotionDirection direction)
|
||||
{
|
||||
_shell_wm_switch_workspace (get_shell_wm(), from, to, direction);
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_kill_window_effects (MutterPlugin *plugin,
|
||||
MutterWindow *actor)
|
||||
gnome_shell_plugin_kill_window_effects (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
_shell_wm_kill_window_effects (get_shell_wm(), actor);
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_kill_switch_workspace (MutterPlugin *plugin)
|
||||
gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin)
|
||||
{
|
||||
_shell_wm_kill_switch_workspace (get_shell_wm());
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnome_shell_plugin_xevent_filter (MutterPlugin *plugin,
|
||||
XEvent *xev)
|
||||
gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
|
||||
XEvent *xev)
|
||||
{
|
||||
#ifdef GLX_INTEL_swap_event
|
||||
GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin);
|
||||
@ -539,9 +540,9 @@ gnome_shell_plugin_xevent_filter (MutterPlugin *plugin,
|
||||
}
|
||||
|
||||
static const
|
||||
MutterPluginInfo *gnome_shell_plugin_plugin_info (MutterPlugin *plugin)
|
||||
MetaPluginInfo *gnome_shell_plugin_plugin_info (MetaPlugin *plugin)
|
||||
{
|
||||
static const MutterPluginInfo info = {
|
||||
static const MetaPluginInfo info = {
|
||||
.name = "GNOME Shell",
|
||||
.version = "0.1",
|
||||
.author = "Various",
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <gjs/gjs.h>
|
||||
|
||||
void _shell_global_set_plugin (ShellGlobal *global,
|
||||
MutterPlugin *plugin);
|
||||
MetaPlugin *plugin);
|
||||
void _shell_global_set_gjs_context (ShellGlobal *global,
|
||||
GjsContext *context);
|
||||
|
||||
|
@ -52,7 +52,7 @@ struct _ShellGlobal {
|
||||
XserverRegion input_region;
|
||||
|
||||
GjsContext *js_context;
|
||||
MutterPlugin *plugin;
|
||||
MetaPlugin *plugin;
|
||||
ShellWM *wm;
|
||||
GSettings *settings;
|
||||
const char *datadir;
|
||||
@ -124,7 +124,7 @@ shell_global_get_property(GObject *object,
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_OVERLAY_GROUP:
|
||||
g_value_set_object (value, mutter_plugin_get_overlay_group (global->plugin));
|
||||
g_value_set_object (value, meta_plugin_get_overlay_group (global->plugin));
|
||||
break;
|
||||
case PROP_SCREEN:
|
||||
g_value_set_object (value, shell_global_get_screen (global));
|
||||
@ -136,7 +136,7 @@ shell_global_get_property(GObject *object,
|
||||
{
|
||||
int width, height;
|
||||
|
||||
mutter_plugin_query_screen_size (global->plugin, &width, &height);
|
||||
meta_plugin_query_screen_size (global->plugin, &width, &height);
|
||||
g_value_set_int (value, width);
|
||||
}
|
||||
break;
|
||||
@ -144,18 +144,18 @@ shell_global_get_property(GObject *object,
|
||||
{
|
||||
int width, height;
|
||||
|
||||
mutter_plugin_query_screen_size (global->plugin, &width, &height);
|
||||
meta_plugin_query_screen_size (global->plugin, &width, &height);
|
||||
g_value_set_int (value, height);
|
||||
}
|
||||
break;
|
||||
case PROP_STAGE:
|
||||
g_value_set_object (value, mutter_plugin_get_stage (global->plugin));
|
||||
g_value_set_object (value, meta_plugin_get_stage (global->plugin));
|
||||
break;
|
||||
case PROP_STAGE_INPUT_MODE:
|
||||
g_value_set_enum (value, global->input_mode);
|
||||
break;
|
||||
case PROP_WINDOW_GROUP:
|
||||
g_value_set_object (value, mutter_plugin_get_window_group (global->plugin));
|
||||
g_value_set_object (value, meta_plugin_get_window_group (global->plugin));
|
||||
break;
|
||||
case PROP_WINDOW_MANAGER:
|
||||
g_value_set_object (value, global->wm);
|
||||
@ -391,9 +391,9 @@ shell_global_focus_stage (ShellGlobal *global)
|
||||
ClutterActor *stage;
|
||||
Window xstage;
|
||||
|
||||
stage = mutter_plugin_get_stage (global->plugin);
|
||||
stage = meta_plugin_get_stage (global->plugin);
|
||||
xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
||||
xdpy = mutter_plugin_get_xdisplay (global->plugin);
|
||||
xdpy = meta_plugin_get_xdisplay (global->plugin);
|
||||
XSetInputFocus (xdpy, xstage, RevertToPointerRoot,
|
||||
shell_global_get_current_time (global));
|
||||
}
|
||||
@ -430,11 +430,11 @@ shell_global_set_stage_input_mode (ShellGlobal *global,
|
||||
g_return_if_fail (SHELL_IS_GLOBAL (global));
|
||||
|
||||
if (mode == SHELL_STAGE_INPUT_MODE_NONREACTIVE || global->gtk_grab_active)
|
||||
mutter_plugin_set_stage_reactive (global->plugin, FALSE);
|
||||
meta_plugin_set_stage_reactive (global->plugin, FALSE);
|
||||
else if (mode == SHELL_STAGE_INPUT_MODE_FULLSCREEN || !global->input_region)
|
||||
mutter_plugin_set_stage_reactive (global->plugin, TRUE);
|
||||
meta_plugin_set_stage_reactive (global->plugin, TRUE);
|
||||
else
|
||||
mutter_plugin_set_stage_input_region (global->plugin, global->input_region);
|
||||
meta_plugin_set_stage_input_region (global->plugin, global->input_region);
|
||||
|
||||
if (mode == SHELL_STAGE_INPUT_MODE_FOCUSED)
|
||||
shell_global_focus_stage (global);
|
||||
@ -503,7 +503,7 @@ shell_global_set_cursor (ShellGlobal *global,
|
||||
}
|
||||
if (!global->stage_window)
|
||||
{
|
||||
ClutterStage *stage = CLUTTER_STAGE (mutter_plugin_get_stage (global->plugin));
|
||||
ClutterStage *stage = CLUTTER_STAGE (meta_plugin_get_stage (global->plugin));
|
||||
|
||||
global->stage_window = gdk_window_foreign_new (clutter_x11_get_stage_window (stage));
|
||||
}
|
||||
@ -542,7 +542,7 @@ void
|
||||
shell_global_set_stage_input_region (ShellGlobal *global,
|
||||
GSList *rectangles)
|
||||
{
|
||||
MetaScreen *screen = mutter_plugin_get_screen (global->plugin);
|
||||
MetaScreen *screen = meta_plugin_get_screen (global->plugin);
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdpy = meta_display_get_xdisplay (display);
|
||||
MetaRectangle *rect;
|
||||
@ -583,7 +583,7 @@ shell_global_set_stage_input_region (ShellGlobal *global,
|
||||
MetaScreen *
|
||||
shell_global_get_screen (ShellGlobal *global)
|
||||
{
|
||||
return mutter_plugin_get_screen (global->plugin);
|
||||
return meta_plugin_get_screen (global->plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -600,18 +600,18 @@ shell_global_get_gdk_screen (ShellGlobal *global)
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_global_get_windows:
|
||||
* shell_global_get_window_actors:
|
||||
*
|
||||
* Gets the list of MutterWindows for the plugin's screen
|
||||
* Gets the list of #MetaWindowActor for the plugin's screen
|
||||
*
|
||||
* Return value: (element-type Meta.MutterWindow) (transfer none): the list of windows
|
||||
* Return value: (element-type Meta.WindowActor) (transfer none): the list of windows
|
||||
*/
|
||||
GList *
|
||||
shell_global_get_windows (ShellGlobal *global)
|
||||
shell_global_get_window_actors (ShellGlobal *global)
|
||||
{
|
||||
g_return_val_if_fail (SHELL_IS_GLOBAL (global), NULL);
|
||||
|
||||
return mutter_plugin_get_windows (global->plugin);
|
||||
return meta_plugin_get_window_actors (global->plugin);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -620,7 +620,7 @@ update_screen_size (gpointer data)
|
||||
int width, height;
|
||||
ShellGlobal *global = SHELL_GLOBAL (data);
|
||||
|
||||
mutter_plugin_query_screen_size (global->plugin, &width, &height);
|
||||
meta_plugin_query_screen_size (global->plugin, &width, &height);
|
||||
|
||||
if (global->last_change_screen_width == width && global->last_change_screen_height == height)
|
||||
return FALSE;
|
||||
@ -683,8 +683,8 @@ global_stage_after_paint (ClutterStage *stage,
|
||||
}
|
||||
|
||||
void
|
||||
_shell_global_set_plugin (ShellGlobal *global,
|
||||
MutterPlugin *plugin)
|
||||
_shell_global_set_plugin (ShellGlobal *global,
|
||||
MetaPlugin *plugin)
|
||||
{
|
||||
ClutterActor *stage;
|
||||
MetaScreen *screen;
|
||||
@ -696,7 +696,7 @@ _shell_global_set_plugin (ShellGlobal *global,
|
||||
global->plugin = plugin;
|
||||
global->wm = shell_wm_new (plugin);
|
||||
|
||||
stage = mutter_plugin_get_stage (plugin);
|
||||
stage = meta_plugin_get_stage (plugin);
|
||||
|
||||
g_signal_connect (stage, "notify::width",
|
||||
G_CALLBACK (global_stage_notify_width), global);
|
||||
@ -718,7 +718,7 @@ _shell_global_set_plugin (ShellGlobal *global,
|
||||
"End of stage page repaint",
|
||||
"");
|
||||
|
||||
screen = mutter_plugin_get_screen (global->plugin);
|
||||
screen = meta_plugin_get_screen (global->plugin);
|
||||
display = meta_screen_get_display (screen);
|
||||
g_signal_connect (display, "notify::focus-window",
|
||||
G_CALLBACK (focus_window_changed), global);
|
||||
@ -751,10 +751,10 @@ gboolean
|
||||
shell_global_begin_modal (ShellGlobal *global,
|
||||
guint32 timestamp)
|
||||
{
|
||||
ClutterStage *stage = CLUTTER_STAGE (mutter_plugin_get_stage (global->plugin));
|
||||
ClutterStage *stage = CLUTTER_STAGE (meta_plugin_get_stage (global->plugin));
|
||||
Window stagewin = clutter_x11_get_stage_window (stage);
|
||||
|
||||
return mutter_plugin_begin_modal (global->plugin, stagewin, None, 0, timestamp);
|
||||
return meta_plugin_begin_modal (global->plugin, stagewin, None, 0, timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -767,7 +767,7 @@ void
|
||||
shell_global_end_modal (ShellGlobal *global,
|
||||
guint32 timestamp)
|
||||
{
|
||||
mutter_plugin_end_modal (global->plugin, timestamp);
|
||||
meta_plugin_end_modal (global->plugin, timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -788,7 +788,7 @@ shell_global_end_modal (ShellGlobal *global,
|
||||
gboolean
|
||||
shell_global_display_is_grabbed (ShellGlobal *global)
|
||||
{
|
||||
MetaScreen *screen = mutter_plugin_get_screen (global->plugin);
|
||||
MetaScreen *screen = meta_plugin_get_screen (global->plugin);
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
|
||||
return meta_display_get_grab_op (display) != META_GRAB_OP_NONE;
|
||||
@ -1262,7 +1262,7 @@ shell_global_create_root_pixmap_actor (ShellGlobal *global)
|
||||
/* Initialize to the stage color, since that's what will be seen
|
||||
* in the main view if there's no actual background window.
|
||||
*/
|
||||
stage = mutter_plugin_get_stage (global->plugin);
|
||||
stage = meta_plugin_get_stage (global->plugin);
|
||||
clutter_stage_get_color (CLUTTER_STAGE (stage), &stage_color);
|
||||
clutter_texture_set_from_rgb_data (CLUTTER_TEXTURE (global->root_pixmap),
|
||||
/* ClutterColor has the same layout
|
||||
|
@ -2,7 +2,7 @@
|
||||
#ifndef __SHELL_GLOBAL_H__
|
||||
#define __SHELL_GLOBAL_H__
|
||||
|
||||
#include "mutter-plugin.h"
|
||||
#include "meta-plugin.h"
|
||||
#include <clutter/clutter.h>
|
||||
#include <glib-object.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
@ -70,7 +70,7 @@ void shell_global_set_stage_input_mode (ShellGlobal *global,
|
||||
void shell_global_set_stage_input_region (ShellGlobal *global,
|
||||
GSList *rectangles);
|
||||
|
||||
GList *shell_global_get_windows (ShellGlobal *global);
|
||||
GList *shell_global_get_window_actors (ShellGlobal *global);
|
||||
|
||||
gboolean shell_global_begin_modal (ShellGlobal *global,
|
||||
guint32 timestamp);
|
||||
|
@ -8,32 +8,32 @@ G_BEGIN_DECLS
|
||||
|
||||
/* These forward along the different effects from GnomeShellPlugin */
|
||||
|
||||
void _shell_wm_minimize (ShellWM *wm,
|
||||
MutterWindow *actor);
|
||||
void _shell_wm_maximize (ShellWM *wm,
|
||||
MutterWindow *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void _shell_wm_unmaximize (ShellWM *wm,
|
||||
MutterWindow *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void _shell_wm_map (ShellWM *wm,
|
||||
MutterWindow *actor);
|
||||
void _shell_wm_destroy (ShellWM *wm,
|
||||
MutterWindow *actor);
|
||||
void _shell_wm_minimize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void _shell_wm_maximize (ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void _shell_wm_unmaximize (ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void _shell_wm_map (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void _shell_wm_destroy (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
|
||||
void _shell_wm_switch_workspace (ShellWM *wm,
|
||||
gint from,
|
||||
gint to,
|
||||
MetaMotionDirection direction);
|
||||
void _shell_wm_kill_window_effects (ShellWM *wm,
|
||||
MutterWindow *actor);
|
||||
void _shell_wm_kill_switch_workspace (ShellWM *wm);
|
||||
void _shell_wm_switch_workspace (ShellWM *wm,
|
||||
gint from,
|
||||
gint to,
|
||||
MetaMotionDirection direction);
|
||||
void _shell_wm_kill_window_effects (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void _shell_wm_kill_switch_workspace (ShellWM *wm);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
102
src/shell-wm.c
102
src/shell-wm.c
@ -13,7 +13,7 @@
|
||||
struct _ShellWM {
|
||||
GObject parent;
|
||||
|
||||
MutterPlugin *plugin;
|
||||
MetaPlugin *plugin;
|
||||
};
|
||||
|
||||
/* Signals */
|
||||
@ -63,7 +63,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1,
|
||||
MUTTER_TYPE_COMP_WINDOW);
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
shell_wm_signals[MAXIMIZE] =
|
||||
g_signal_new ("maximize",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -72,7 +72,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
NULL, NULL,
|
||||
_shell_marshal_VOID__OBJECT_INT_INT_INT_INT,
|
||||
G_TYPE_NONE, 5,
|
||||
MUTTER_TYPE_COMP_WINDOW, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
|
||||
META_TYPE_WINDOW_ACTOR, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
|
||||
shell_wm_signals[UNMAXIMIZE] =
|
||||
g_signal_new ("unmaximize",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -81,7 +81,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
NULL, NULL,
|
||||
_shell_marshal_VOID__OBJECT_INT_INT_INT_INT,
|
||||
G_TYPE_NONE, 1,
|
||||
MUTTER_TYPE_COMP_WINDOW, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
|
||||
META_TYPE_WINDOW_ACTOR, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
|
||||
shell_wm_signals[MAP] =
|
||||
g_signal_new ("map",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -90,7 +90,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1,
|
||||
MUTTER_TYPE_COMP_WINDOW);
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
shell_wm_signals[DESTROY] =
|
||||
g_signal_new ("destroy",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -99,7 +99,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1,
|
||||
MUTTER_TYPE_COMP_WINDOW);
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
shell_wm_signals[SWITCH_WORKSPACE] =
|
||||
g_signal_new ("switch-workspace",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -125,7 +125,7 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1,
|
||||
MUTTER_TYPE_COMP_WINDOW);
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
|
||||
/**
|
||||
* ShellWM::keybinding:
|
||||
@ -174,77 +174,77 @@ _shell_wm_switch_workspace (ShellWM *wm,
|
||||
void
|
||||
shell_wm_completed_switch_workspace (ShellWM *wm)
|
||||
{
|
||||
mutter_plugin_switch_workspace_completed (wm->plugin);
|
||||
meta_plugin_switch_workspace_completed (wm->plugin);
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_wm_completed_minimize
|
||||
* @wm: the ShellWM
|
||||
* @actor: the MutterWindow actor
|
||||
* @actor: the MetaWindowActor actor
|
||||
*
|
||||
* The plugin must call this when it has completed a window minimize effect.
|
||||
**/
|
||||
void
|
||||
shell_wm_completed_minimize (ShellWM *wm,
|
||||
MutterWindow *actor)
|
||||
shell_wm_completed_minimize (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
mutter_plugin_minimize_completed (wm->plugin, actor);
|
||||
meta_plugin_minimize_completed (wm->plugin, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_wm_completed_maximize
|
||||
* @wm: the ShellWM
|
||||
* @actor: the MutterWindow actor
|
||||
* @actor: the MetaWindowActor actor
|
||||
*
|
||||
* The plugin must call this when it has completed a window maximize effect.
|
||||
**/
|
||||
void
|
||||
shell_wm_completed_maximize (ShellWM *wm,
|
||||
MutterWindow *actor)
|
||||
shell_wm_completed_maximize (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
mutter_plugin_maximize_completed (wm->plugin, actor);
|
||||
meta_plugin_maximize_completed (wm->plugin, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_wm_completed_unmaximize
|
||||
* @wm: the ShellWM
|
||||
* @actor: the MutterWindow actor
|
||||
* @actor: the MetaWindowActor actor
|
||||
*
|
||||
* The plugin must call this when it has completed a window unmaximize effect.
|
||||
**/
|
||||
void
|
||||
shell_wm_completed_unmaximize (ShellWM *wm,
|
||||
MutterWindow *actor)
|
||||
shell_wm_completed_unmaximize (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
mutter_plugin_unmaximize_completed (wm->plugin, actor);
|
||||
meta_plugin_unmaximize_completed (wm->plugin, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_wm_completed_map
|
||||
* @wm: the ShellWM
|
||||
* @actor: the MutterWindow actor
|
||||
* @actor: the MetaWindowActor actor
|
||||
*
|
||||
* The plugin must call this when it has completed a window map effect.
|
||||
**/
|
||||
void
|
||||
shell_wm_completed_map (ShellWM *wm,
|
||||
MutterWindow *actor)
|
||||
shell_wm_completed_map (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
mutter_plugin_map_completed (wm->plugin, actor);
|
||||
meta_plugin_map_completed (wm->plugin, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_wm_completed_destroy
|
||||
* @wm: the ShellWM
|
||||
* @actor: the MutterWindow actor
|
||||
* @actor: the MetaWindowActor actor
|
||||
*
|
||||
* The plugin must call this when it has completed a window destroy effect.
|
||||
**/
|
||||
void
|
||||
shell_wm_completed_destroy (ShellWM *wm,
|
||||
MutterWindow *actor)
|
||||
shell_wm_completed_destroy (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
mutter_plugin_destroy_completed (wm->plugin, actor);
|
||||
meta_plugin_destroy_completed (wm->plugin, actor);
|
||||
}
|
||||
|
||||
void
|
||||
@ -254,66 +254,66 @@ _shell_wm_kill_switch_workspace (ShellWM *wm)
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_kill_window_effects (ShellWM *wm,
|
||||
MutterWindow *actor)
|
||||
_shell_wm_kill_window_effects (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[KILL_WINDOW_EFFECTS], 0, actor);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
_shell_wm_minimize (ShellWM *wm,
|
||||
MutterWindow *actor)
|
||||
_shell_wm_minimize (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[MINIMIZE], 0, actor);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_maximize (ShellWM *wm,
|
||||
MutterWindow *actor,
|
||||
int target_x,
|
||||
int target_y,
|
||||
int target_width,
|
||||
int target_height)
|
||||
_shell_wm_maximize (ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
int target_x,
|
||||
int target_y,
|
||||
int target_width,
|
||||
int target_height)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[MAXIMIZE], 0, actor, target_x, target_y, target_width, target_height);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_unmaximize (ShellWM *wm,
|
||||
MutterWindow *actor,
|
||||
int target_x,
|
||||
int target_y,
|
||||
int target_width,
|
||||
int target_height)
|
||||
_shell_wm_unmaximize (ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
int target_x,
|
||||
int target_y,
|
||||
int target_width,
|
||||
int target_height)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[UNMAXIMIZE], 0, actor, target_x, target_y, target_width, target_height);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_map (ShellWM *wm,
|
||||
MutterWindow *actor)
|
||||
_shell_wm_map (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[MAP], 0, actor);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_destroy (ShellWM *wm,
|
||||
MutterWindow *actor)
|
||||
_shell_wm_destroy (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[DESTROY], 0, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_wm_new:
|
||||
* @plugin: the #MutterPlugin
|
||||
* @plugin: the #MetaPlugin
|
||||
*
|
||||
* Creates a new window management interface by hooking into @plugin.
|
||||
*
|
||||
* Return value: the new window-management interface
|
||||
**/
|
||||
ShellWM *
|
||||
shell_wm_new (MutterPlugin *plugin)
|
||||
shell_wm_new (MetaPlugin *plugin)
|
||||
{
|
||||
ShellWM *wm;
|
||||
|
||||
@ -342,7 +342,7 @@ shell_wm_key_handler (MetaDisplay *display,
|
||||
/**
|
||||
* shell_wm_takeover_keybinding:
|
||||
* @wm: the #ShellWM
|
||||
* @binding_name: a mutter keybinding name
|
||||
* @binding_name: a meta keybinding name
|
||||
*
|
||||
* Tells mutter to forward keypresses for @binding_name to the shell
|
||||
* rather than processing them internally. This will cause a
|
||||
|
@ -3,7 +3,7 @@
|
||||
#define __SHELL_WM_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <mutter-plugin.h>
|
||||
#include <meta-plugin.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -25,19 +25,19 @@ struct _ShellWMClass
|
||||
|
||||
GType shell_wm_get_type (void) G_GNUC_CONST;
|
||||
|
||||
ShellWM *shell_wm_new (MutterPlugin *plugin);
|
||||
ShellWM *shell_wm_new (MetaPlugin *plugin);
|
||||
|
||||
void shell_wm_completed_minimize (ShellWM *wm,
|
||||
MutterWindow *actor);
|
||||
void shell_wm_completed_maximize (ShellWM *wm,
|
||||
MutterWindow *actor);
|
||||
void shell_wm_completed_unmaximize (ShellWM *wm,
|
||||
MutterWindow *actor);
|
||||
void shell_wm_completed_map (ShellWM *wm,
|
||||
MutterWindow *actor);
|
||||
void shell_wm_completed_destroy (ShellWM *wm,
|
||||
MutterWindow *actor);
|
||||
void shell_wm_completed_switch_workspace (ShellWM *wm);
|
||||
void shell_wm_completed_minimize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void shell_wm_completed_maximize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void shell_wm_completed_unmaximize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void shell_wm_completed_map (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void shell_wm_completed_destroy (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void shell_wm_completed_switch_workspace (ShellWM *wm);
|
||||
|
||||
/* Keybinding stuff */
|
||||
void shell_wm_takeover_keybinding (ShellWM *wm,
|
||||
|
Loading…
Reference in New Issue
Block a user