windowManager: Add unminimize effect
The effect was added to mutter a while ago, but never implemented in the shell. Just do the reverse of the minimize animation ... https://bugzilla.gnome.org/show_bug.cgi?id=702662
This commit is contained in:
@ -40,6 +40,8 @@
|
||||
static void gnome_shell_plugin_start (MetaPlugin *plugin);
|
||||
static void gnome_shell_plugin_minimize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
static void gnome_shell_plugin_unminimize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
static void gnome_shell_plugin_maximize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
gint x,
|
||||
@ -131,6 +133,7 @@ gnome_shell_plugin_class_init (GnomeShellPluginClass *klass)
|
||||
plugin_class->start = gnome_shell_plugin_start;
|
||||
plugin_class->map = gnome_shell_plugin_map;
|
||||
plugin_class->minimize = gnome_shell_plugin_minimize;
|
||||
plugin_class->unminimize = gnome_shell_plugin_unminimize;
|
||||
plugin_class->maximize = gnome_shell_plugin_maximize;
|
||||
plugin_class->unmaximize = gnome_shell_plugin_unmaximize;
|
||||
plugin_class->destroy = gnome_shell_plugin_destroy;
|
||||
@ -268,6 +271,15 @@ gnome_shell_plugin_minimize (MetaPlugin *plugin,
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_unminimize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
_shell_wm_unminimize (get_shell_wm (),
|
||||
actor);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
gnome_shell_plugin_maximize (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
|
@ -10,6 +10,8 @@ G_BEGIN_DECLS
|
||||
|
||||
void _shell_wm_minimize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void _shell_wm_unminimize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void _shell_wm_maximize (ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
gint x,
|
||||
|
@ -19,6 +19,7 @@ struct _ShellWM {
|
||||
enum
|
||||
{
|
||||
MINIMIZE,
|
||||
UNMINIMIZE,
|
||||
MAXIMIZE,
|
||||
UNMAXIMIZE,
|
||||
MAP,
|
||||
@ -65,6 +66,14 @@ shell_wm_class_init (ShellWMClass *klass)
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW_ACTOR);
|
||||
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);
|
||||
shell_wm_signals[MAXIMIZE] =
|
||||
g_signal_new ("maximize",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
@ -197,6 +206,20 @@ shell_wm_completed_minimize (ShellWM *wm,
|
||||
meta_plugin_minimize_completed (wm->plugin, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_wm_completed_maximize:
|
||||
* @wm: the ShellWM
|
||||
@ -328,6 +351,13 @@ _shell_wm_minimize (ShellWM *wm,
|
||||
g_signal_emit (wm, shell_wm_signals[MINIMIZE], 0, actor);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_unminimize (ShellWM *wm,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
g_signal_emit (wm, shell_wm_signals[UNMINIMIZE], 0, actor);
|
||||
}
|
||||
|
||||
void
|
||||
_shell_wm_maximize (ShellWM *wm,
|
||||
MetaWindowActor *actor,
|
||||
|
@ -29,6 +29,8 @@ ShellWM *shell_wm_new (MetaPlugin *plugin);
|
||||
|
||||
void shell_wm_completed_minimize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void shell_wm_completed_unminimize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void shell_wm_completed_maximize (ShellWM *wm,
|
||||
MetaWindowActor *actor);
|
||||
void shell_wm_completed_unmaximize (ShellWM *wm,
|
||||
|
Reference in New Issue
Block a user