2008-11-21 14:02:09 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
2009-11-24 14:07:40 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2009-09-15 15:11:32 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2015-07-06 04:16:33 +00:00
|
|
|
#include <meta/meta-enum-types.h>
|
2011-03-05 15:49:24 +00:00
|
|
|
#include <meta/keybindings.h>
|
|
|
|
|
2010-09-02 00:48:11 +00:00
|
|
|
#include "shell-wm-private.h"
|
2008-11-21 14:02:09 +00:00
|
|
|
#include "shell-global.h"
|
|
|
|
|
|
|
|
struct _ShellWM {
|
|
|
|
GObject parent;
|
|
|
|
|
2010-10-19 18:55:43 +00:00
|
|
|
MetaPlugin *plugin;
|
2008-11-21 14:02:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Signals */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
MINIMIZE,
|
2015-02-27 11:13:26 +00:00
|
|
|
UNMINIMIZE,
|
2016-09-26 15:33:35 +00:00
|
|
|
SIZE_CHANGED,
|
2015-07-06 04:16:33 +00:00
|
|
|
SIZE_CHANGE,
|
2008-11-21 14:02:09 +00:00
|
|
|
MAP,
|
|
|
|
DESTROY,
|
|
|
|
SWITCH_WORKSPACE,
|
|
|
|
KILL_SWITCH_WORKSPACE,
|
2010-06-16 21:28:57 +00:00
|
|
|
KILL_WINDOW_EFFECTS,
|
2013-09-01 22:26:12 +00:00
|
|
|
SHOW_TILE_PREVIEW,
|
|
|
|
HIDE_TILE_PREVIEW,
|
2014-03-13 22:51:10 +00:00
|
|
|
SHOW_WINDOW_MENU,
|
2012-08-20 08:38:13 +00:00
|
|
|
FILTER_KEYBINDING,
|
2013-08-17 15:42:39 +00:00
|
|
|
CONFIRM_DISPLAY_CHANGE,
|
2017-01-19 18:52:18 +00:00
|
|
|
CREATE_CLOSE_DIALOG,
|
2017-07-14 01:15:17 +00:00
|
|
|
CREATE_INHIBIT_SHORTCUTS_DIALOG,
|
2008-11-21 14:02:09 +00:00
|
|
|
|
|
|
|
LAST_SIGNAL
|
|
|
|
};
|
|
|
|
|
|
|
|
G_DEFINE_TYPE(ShellWM, shell_wm, G_TYPE_OBJECT);
|
|
|
|
|
|
|
|
static guint shell_wm_signals [LAST_SIGNAL] = { 0 };
|
|
|
|
|
|
|
|
static void
|
|
|
|
shell_wm_init (ShellWM *wm)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
shell_wm_finalize (GObject *object)
|
|
|
|
{
|
|
|
|
G_OBJECT_CLASS (shell_wm_parent_class)->finalize (object);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
shell_wm_class_init (ShellWMClass *klass)
|
|
|
|
{
|
|
|
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
|
|
|
|
|
|
|
gobject_class->finalize = shell_wm_finalize;
|
|
|
|
|
2008-12-29 04:44:03 +00:00
|
|
|
shell_wm_signals[MINIMIZE] =
|
|
|
|
g_signal_new ("minimize",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
2011-10-18 22:19:32 +00:00
|
|
|
NULL, NULL, NULL,
|
2008-12-29 04:44:03 +00:00
|
|
|
G_TYPE_NONE, 1,
|
2010-10-19 18:55:43 +00:00
|
|
|
META_TYPE_WINDOW_ACTOR);
|
2015-02-27 11:13:26 +00:00
|
|
|
shell_wm_signals[UNMINIMIZE] =
|
|
|
|
g_signal_new ("unminimize",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
G_TYPE_NONE, 1,
|
|
|
|
META_TYPE_WINDOW_ACTOR);
|
2016-09-26 15:33:35 +00:00
|
|
|
shell_wm_signals[SIZE_CHANGED] =
|
|
|
|
g_signal_new ("size-changed",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
G_TYPE_NONE, 1,
|
|
|
|
META_TYPE_WINDOW_ACTOR);
|
2015-07-06 04:16:33 +00:00
|
|
|
shell_wm_signals[SIZE_CHANGE] =
|
|
|
|
g_signal_new ("size-change",
|
2008-12-29 04:44:03 +00:00
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
2011-10-18 22:19:32 +00:00
|
|
|
NULL, NULL, NULL,
|
2015-07-06 04:16:33 +00:00
|
|
|
G_TYPE_NONE, 4,
|
|
|
|
META_TYPE_WINDOW_ACTOR, META_TYPE_SIZE_CHANGE, META_TYPE_RECTANGLE, META_TYPE_RECTANGLE);
|
2008-12-29 04:44:03 +00:00
|
|
|
shell_wm_signals[MAP] =
|
|
|
|
g_signal_new ("map",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
2011-10-18 22:19:32 +00:00
|
|
|
NULL, NULL, NULL,
|
2008-12-29 04:44:03 +00:00
|
|
|
G_TYPE_NONE, 1,
|
2010-10-19 18:55:43 +00:00
|
|
|
META_TYPE_WINDOW_ACTOR);
|
2008-12-29 04:44:03 +00:00
|
|
|
shell_wm_signals[DESTROY] =
|
|
|
|
g_signal_new ("destroy",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
2011-10-18 22:19:32 +00:00
|
|
|
NULL, NULL, NULL,
|
2008-12-29 04:44:03 +00:00
|
|
|
G_TYPE_NONE, 1,
|
2010-10-19 18:55:43 +00:00
|
|
|
META_TYPE_WINDOW_ACTOR);
|
2008-11-21 14:02:09 +00:00
|
|
|
shell_wm_signals[SWITCH_WORKSPACE] =
|
|
|
|
g_signal_new ("switch-workspace",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
2011-10-18 22:19:32 +00:00
|
|
|
NULL, NULL, NULL,
|
2008-11-21 14:02:09 +00:00
|
|
|
G_TYPE_NONE, 3,
|
|
|
|
G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
|
|
|
|
shell_wm_signals[KILL_SWITCH_WORKSPACE] =
|
|
|
|
g_signal_new ("kill-switch-workspace",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
2011-10-18 22:19:32 +00:00
|
|
|
NULL, NULL, NULL,
|
2008-11-21 14:02:09 +00:00
|
|
|
G_TYPE_NONE, 0);
|
2010-06-16 21:28:57 +00:00
|
|
|
shell_wm_signals[KILL_WINDOW_EFFECTS] =
|
|
|
|
g_signal_new ("kill-window-effects",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
2011-10-18 22:19:32 +00:00
|
|
|
NULL, NULL, NULL,
|
2010-06-16 21:28:57 +00:00
|
|
|
G_TYPE_NONE, 1,
|
2010-10-19 18:55:43 +00:00
|
|
|
META_TYPE_WINDOW_ACTOR);
|
2013-09-01 22:26:12 +00:00
|
|
|
shell_wm_signals[SHOW_TILE_PREVIEW] =
|
|
|
|
g_signal_new ("show-tile-preview",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0, NULL, NULL, NULL,
|
|
|
|
G_TYPE_NONE, 3,
|
|
|
|
META_TYPE_WINDOW,
|
|
|
|
META_TYPE_RECTANGLE,
|
|
|
|
G_TYPE_INT);
|
|
|
|
shell_wm_signals[HIDE_TILE_PREVIEW] =
|
|
|
|
g_signal_new ("hide-tile-preview",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
G_TYPE_NONE, 0);
|
2014-03-13 22:51:10 +00:00
|
|
|
shell_wm_signals[SHOW_WINDOW_MENU] =
|
|
|
|
g_signal_new ("show-window-menu",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0, NULL, NULL, NULL,
|
2014-06-02 19:47:24 +00:00
|
|
|
G_TYPE_NONE, 3,
|
|
|
|
META_TYPE_WINDOW, G_TYPE_INT, META_TYPE_RECTANGLE);
|
2012-08-20 08:38:13 +00:00
|
|
|
shell_wm_signals[FILTER_KEYBINDING] =
|
|
|
|
g_signal_new ("filter-keybinding",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
|
|
|
g_signal_accumulator_true_handled, NULL, NULL,
|
|
|
|
G_TYPE_BOOLEAN, 1,
|
|
|
|
META_TYPE_KEY_BINDING);
|
2013-08-17 15:42:39 +00:00
|
|
|
shell_wm_signals[CONFIRM_DISPLAY_CHANGE] =
|
|
|
|
g_signal_new ("confirm-display-change",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
G_TYPE_NONE, 0);
|
2017-01-19 18:52:18 +00:00
|
|
|
/**
|
|
|
|
* ShellWM::create-close-dialog:
|
|
|
|
* @wm: The WM
|
|
|
|
* @window: The window to create the dialog for
|
|
|
|
*
|
|
|
|
* Creates a close dialog for the given window.
|
|
|
|
*
|
|
|
|
* Returns: (transfer full): The close dialog instance.
|
|
|
|
*/
|
|
|
|
shell_wm_signals[CREATE_CLOSE_DIALOG] =
|
|
|
|
g_signal_new ("create-close-dialog",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
META_TYPE_CLOSE_DIALOG, 1, META_TYPE_WINDOW);
|
2017-07-14 01:15:17 +00:00
|
|
|
/**
|
|
|
|
* ShellWM::create-inhibit-shortcuts-dialog:
|
|
|
|
* @wm: The WM
|
|
|
|
* @window: The window to create the dialog for
|
|
|
|
*
|
|
|
|
* Creates an inhibit shortcuts dialog for the given window.
|
|
|
|
*
|
|
|
|
* Returns: (transfer full): The inhibit shortcuts dialog instance.
|
|
|
|
*/
|
|
|
|
shell_wm_signals[CREATE_INHIBIT_SHORTCUTS_DIALOG] =
|
|
|
|
g_signal_new ("create-inhibit-shortcuts-dialog",
|
|
|
|
G_TYPE_FROM_CLASS (klass),
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
0,
|
|
|
|
NULL, NULL, NULL,
|
|
|
|
META_TYPE_INHIBIT_SHORTCUTS_DIALOG, 1, META_TYPE_WINDOW);
|
2008-11-21 14:02:09 +00:00
|
|
|
}
|
|
|
|
|
2008-12-22 21:05:08 +00:00
|
|
|
void
|
|
|
|
_shell_wm_switch_workspace (ShellWM *wm,
|
|
|
|
gint from,
|
|
|
|
gint to,
|
|
|
|
MetaMotionDirection direction)
|
2008-11-21 14:02:09 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[SWITCH_WORKSPACE], 0,
|
|
|
|
from, to, direction);
|
2008-11-21 21:34:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* shell_wm_completed_switch_workspace:
|
|
|
|
* @wm: the ShellWM
|
|
|
|
*
|
|
|
|
* The plugin must call this when it has finished switching the
|
|
|
|
* workspace.
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
shell_wm_completed_switch_workspace (ShellWM *wm)
|
|
|
|
{
|
2010-10-19 18:55:43 +00:00
|
|
|
meta_plugin_switch_workspace_completed (wm->plugin);
|
2008-11-21 14:02:09 +00:00
|
|
|
}
|
|
|
|
|
2008-12-29 04:44:03 +00:00
|
|
|
/**
|
2012-04-06 14:34:52 +00:00
|
|
|
* shell_wm_completed_minimize:
|
2008-12-29 04:44:03 +00:00
|
|
|
* @wm: the ShellWM
|
2010-10-19 18:55:43 +00:00
|
|
|
* @actor: the MetaWindowActor actor
|
2008-12-29 04:44:03 +00:00
|
|
|
*
|
|
|
|
* The plugin must call this when it has completed a window minimize effect.
|
|
|
|
**/
|
|
|
|
void
|
2010-10-19 18:55:43 +00:00
|
|
|
shell_wm_completed_minimize (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
2008-12-29 04:44:03 +00:00
|
|
|
{
|
2010-10-19 18:55:43 +00:00
|
|
|
meta_plugin_minimize_completed (wm->plugin, actor);
|
2008-12-29 04:44:03 +00:00
|
|
|
}
|
|
|
|
|
2015-02-27 11:13:26 +00:00
|
|
|
/**
|
|
|
|
* shell_wm_completed_unminimize:
|
|
|
|
* @wm: the ShellWM
|
|
|
|
* @actor: the MetaWindowActor actor
|
|
|
|
*
|
|
|
|
* The plugin must call this when it has completed a window unminimize effect.
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
shell_wm_completed_unminimize (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
|
|
|
{
|
|
|
|
meta_plugin_unminimize_completed (wm->plugin, actor);
|
|
|
|
}
|
|
|
|
|
2008-12-29 04:44:03 +00:00
|
|
|
void
|
2015-07-06 04:16:33 +00:00
|
|
|
shell_wm_completed_size_change (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
2008-12-29 04:44:03 +00:00
|
|
|
{
|
2015-07-06 04:16:33 +00:00
|
|
|
meta_plugin_size_change_completed (wm->plugin, actor);
|
2008-12-29 04:44:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-04-06 14:34:52 +00:00
|
|
|
* shell_wm_completed_map:
|
2008-12-29 04:44:03 +00:00
|
|
|
* @wm: the ShellWM
|
2010-10-19 18:55:43 +00:00
|
|
|
* @actor: the MetaWindowActor actor
|
2008-12-29 04:44:03 +00:00
|
|
|
*
|
|
|
|
* The plugin must call this when it has completed a window map effect.
|
|
|
|
**/
|
|
|
|
void
|
2010-10-19 18:55:43 +00:00
|
|
|
shell_wm_completed_map (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
2008-12-29 04:44:03 +00:00
|
|
|
{
|
2010-10-19 18:55:43 +00:00
|
|
|
meta_plugin_map_completed (wm->plugin, actor);
|
2008-12-29 04:44:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-04-06 14:34:52 +00:00
|
|
|
* shell_wm_completed_destroy:
|
2008-12-29 04:44:03 +00:00
|
|
|
* @wm: the ShellWM
|
2010-10-19 18:55:43 +00:00
|
|
|
* @actor: the MetaWindowActor actor
|
2008-12-29 04:44:03 +00:00
|
|
|
*
|
|
|
|
* The plugin must call this when it has completed a window destroy effect.
|
|
|
|
**/
|
|
|
|
void
|
2010-10-19 18:55:43 +00:00
|
|
|
shell_wm_completed_destroy (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
2008-12-29 04:44:03 +00:00
|
|
|
{
|
2010-10-19 18:55:43 +00:00
|
|
|
meta_plugin_destroy_completed (wm->plugin, actor);
|
2010-06-16 21:28:57 +00:00
|
|
|
}
|
|
|
|
|
2013-08-17 15:42:39 +00:00
|
|
|
/**
|
|
|
|
* shell_wm_complete_display_change:
|
|
|
|
* @wm: the ShellWM
|
|
|
|
* @ok: if the new configuration was OK
|
|
|
|
*
|
|
|
|
* The plugin must call this after the user responded to the confirmation dialog.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
shell_wm_complete_display_change (ShellWM *wm,
|
|
|
|
gboolean ok)
|
|
|
|
{
|
|
|
|
meta_plugin_complete_display_change (wm->plugin, ok);
|
|
|
|
}
|
|
|
|
|
2010-06-16 21:28:57 +00:00
|
|
|
void
|
|
|
|
_shell_wm_kill_switch_workspace (ShellWM *wm)
|
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[KILL_SWITCH_WORKSPACE], 0);
|
2008-12-29 04:44:03 +00:00
|
|
|
}
|
2008-11-21 21:34:10 +00:00
|
|
|
|
2008-12-22 21:05:08 +00:00
|
|
|
void
|
2010-10-19 18:55:43 +00:00
|
|
|
_shell_wm_kill_window_effects (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
2008-11-21 14:02:09 +00:00
|
|
|
{
|
2010-06-16 21:28:57 +00:00
|
|
|
g_signal_emit (wm, shell_wm_signals[KILL_WINDOW_EFFECTS], 0, actor);
|
2008-11-21 14:02:09 +00:00
|
|
|
}
|
|
|
|
|
2013-09-01 22:26:12 +00:00
|
|
|
void
|
|
|
|
_shell_wm_show_tile_preview (ShellWM *wm,
|
|
|
|
MetaWindow *window,
|
|
|
|
MetaRectangle *tile_rect,
|
|
|
|
int tile_monitor)
|
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[SHOW_TILE_PREVIEW], 0,
|
|
|
|
window, tile_rect, tile_monitor);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_shell_wm_hide_tile_preview (ShellWM *wm)
|
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[HIDE_TILE_PREVIEW], 0);
|
|
|
|
}
|
|
|
|
|
2014-03-13 22:51:10 +00:00
|
|
|
void
|
2014-05-24 01:32:44 +00:00
|
|
|
_shell_wm_show_window_menu (ShellWM *wm,
|
|
|
|
MetaWindow *window,
|
|
|
|
MetaWindowMenuType menu,
|
|
|
|
int x,
|
|
|
|
int y)
|
2014-03-13 22:51:10 +00:00
|
|
|
{
|
2014-06-02 19:47:24 +00:00
|
|
|
MetaRectangle rect;
|
|
|
|
|
|
|
|
rect.x = x;
|
|
|
|
rect.y = y;
|
|
|
|
rect.width = rect.height = 0;
|
|
|
|
|
|
|
|
_shell_wm_show_window_menu_for_rect (wm, window, menu, &rect);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_shell_wm_show_window_menu_for_rect (ShellWM *wm,
|
|
|
|
MetaWindow *window,
|
|
|
|
MetaWindowMenuType menu,
|
|
|
|
MetaRectangle *rect)
|
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[SHOW_WINDOW_MENU], 0, window, menu, rect);
|
2014-03-13 22:51:10 +00:00
|
|
|
}
|
2008-11-21 14:02:09 +00:00
|
|
|
|
2008-12-29 04:44:03 +00:00
|
|
|
void
|
2010-10-19 18:55:43 +00:00
|
|
|
_shell_wm_minimize (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
2008-12-29 04:44:03 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[MINIMIZE], 0, actor);
|
|
|
|
}
|
|
|
|
|
2015-02-27 11:13:26 +00:00
|
|
|
void
|
|
|
|
_shell_wm_unminimize (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[UNMINIMIZE], 0, actor);
|
|
|
|
}
|
|
|
|
|
2016-09-26 15:33:35 +00:00
|
|
|
void
|
|
|
|
_shell_wm_size_changed (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[SIZE_CHANGED], 0, actor);
|
|
|
|
}
|
|
|
|
|
2008-12-29 04:44:03 +00:00
|
|
|
void
|
2015-07-06 04:16:33 +00:00
|
|
|
_shell_wm_size_change (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor,
|
|
|
|
MetaSizeChange which_change,
|
|
|
|
MetaRectangle *old_frame_rect,
|
|
|
|
MetaRectangle *old_buffer_rect)
|
2008-12-29 04:44:03 +00:00
|
|
|
{
|
2015-07-06 04:16:33 +00:00
|
|
|
g_signal_emit (wm, shell_wm_signals[SIZE_CHANGE], 0, actor, which_change, old_frame_rect, old_buffer_rect);
|
2008-12-29 04:44:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2010-10-19 18:55:43 +00:00
|
|
|
_shell_wm_map (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
2008-12-29 04:44:03 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[MAP], 0, actor);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2010-10-19 18:55:43 +00:00
|
|
|
_shell_wm_destroy (ShellWM *wm,
|
|
|
|
MetaWindowActor *actor)
|
2008-12-29 04:44:03 +00:00
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[DESTROY], 0, actor);
|
|
|
|
}
|
|
|
|
|
2012-08-20 08:38:13 +00:00
|
|
|
gboolean
|
|
|
|
_shell_wm_filter_keybinding (ShellWM *wm,
|
|
|
|
MetaKeyBinding *binding)
|
|
|
|
{
|
|
|
|
gboolean rv;
|
|
|
|
|
|
|
|
g_signal_emit (wm, shell_wm_signals[FILTER_KEYBINDING], 0, binding, &rv);
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2013-08-17 15:42:39 +00:00
|
|
|
void
|
|
|
|
_shell_wm_confirm_display_change (ShellWM *wm)
|
|
|
|
{
|
|
|
|
g_signal_emit (wm, shell_wm_signals[CONFIRM_DISPLAY_CHANGE], 0);
|
|
|
|
}
|
|
|
|
|
2017-01-19 18:52:18 +00:00
|
|
|
MetaCloseDialog *
|
|
|
|
_shell_wm_create_close_dialog (ShellWM *wm,
|
|
|
|
MetaWindow *window)
|
|
|
|
{
|
|
|
|
MetaCloseDialog *dialog;
|
|
|
|
|
|
|
|
g_signal_emit (wm, shell_wm_signals[CREATE_CLOSE_DIALOG], 0, window, &dialog);
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
}
|
|
|
|
|
2017-07-14 01:15:17 +00:00
|
|
|
MetaInhibitShortcutsDialog *
|
|
|
|
_shell_wm_create_inhibit_shortcuts_dialog (ShellWM *wm,
|
|
|
|
MetaWindow *window)
|
|
|
|
{
|
|
|
|
MetaInhibitShortcutsDialog *dialog;
|
|
|
|
|
|
|
|
g_signal_emit (wm, shell_wm_signals[CREATE_INHIBIT_SHORTCUTS_DIALOG], 0, window, &dialog);
|
|
|
|
|
|
|
|
return dialog;
|
|
|
|
}
|
|
|
|
|
2008-11-21 14:02:09 +00:00
|
|
|
/**
|
|
|
|
* shell_wm_new:
|
2010-10-19 18:55:43 +00:00
|
|
|
* @plugin: the #MetaPlugin
|
2008-11-21 14:02:09 +00:00
|
|
|
*
|
|
|
|
* Creates a new window management interface by hooking into @plugin.
|
|
|
|
*
|
|
|
|
* Return value: the new window-management interface
|
|
|
|
**/
|
|
|
|
ShellWM *
|
2010-10-19 18:55:43 +00:00
|
|
|
shell_wm_new (MetaPlugin *plugin)
|
2008-11-21 14:02:09 +00:00
|
|
|
{
|
2008-11-21 21:34:10 +00:00
|
|
|
ShellWM *wm;
|
|
|
|
|
|
|
|
wm = g_object_new (SHELL_TYPE_WM, NULL);
|
|
|
|
wm->plugin = plugin;
|
|
|
|
|
|
|
|
return wm;
|
2008-11-21 14:02:09 +00:00
|
|
|
}
|