mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
compositor: add support for unminimize compositor effects
https://bugzilla.gnome.org/show_bug.cgi?id=733789
This commit is contained in:
parent
4f55e16fe9
commit
cd84317346
@ -300,6 +300,7 @@ MetaPluginVersion
|
||||
META_PLUGIN_DECLARE
|
||||
meta_plugin_switch_workspace_completed
|
||||
meta_plugin_minimize_completed
|
||||
meta_plugin_unminimize_completed
|
||||
meta_plugin_maximize_completed
|
||||
meta_plugin_unmaximize_completed
|
||||
meta_plugin_map_completed
|
||||
|
@ -170,6 +170,15 @@ meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
|
||||
klass->minimize (plugin, actor);
|
||||
}
|
||||
break;
|
||||
case META_PLUGIN_UNMINIMIZE:
|
||||
if (klass->unminimize)
|
||||
{
|
||||
retval = TRUE;
|
||||
meta_plugin_manager_kill_window_effects (plugin_mgr,
|
||||
actor);
|
||||
klass->unminimize (plugin, actor);
|
||||
}
|
||||
break;
|
||||
case META_PLUGIN_MAP:
|
||||
if (klass->map)
|
||||
{
|
||||
|
@ -35,6 +35,7 @@
|
||||
#define META_PLUGIN_MAP (1<<3)
|
||||
#define META_PLUGIN_DESTROY (1<<4)
|
||||
#define META_PLUGIN_SWITCH_WORKSPACE (1<<5)
|
||||
#define META_PLUGIN_UNMINIMIZE (1<<6)
|
||||
|
||||
#define META_PLUGIN_ALL_EFFECTS (~0)
|
||||
|
||||
|
@ -110,6 +110,13 @@ meta_plugin_minimize_completed (MetaPlugin *plugin,
|
||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_MINIMIZE);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_unminimize_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_UNMINIMIZE);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_maximize_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
|
@ -84,6 +84,7 @@ struct _MetaWindowActorPrivate
|
||||
* might be dubious, but we have to at least handle it correctly.
|
||||
*/
|
||||
gint minimize_in_progress;
|
||||
gint unminimize_in_progress;
|
||||
gint maximize_in_progress;
|
||||
gint unmaximize_in_progress;
|
||||
gint map_in_progress;
|
||||
@ -1008,6 +1009,9 @@ start_simple_effect (MetaWindowActor *self,
|
||||
case META_PLUGIN_MINIMIZE:
|
||||
counter = &priv->minimize_in_progress;
|
||||
break;
|
||||
case META_PLUGIN_UNMINIMIZE:
|
||||
counter = &priv->unminimize_in_progress;
|
||||
break;
|
||||
case META_PLUGIN_MAP:
|
||||
counter = &priv->map_in_progress;
|
||||
break;
|
||||
@ -1078,6 +1082,16 @@ meta_window_actor_effect_completed (MetaWindowActor *self,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case META_PLUGIN_UNMINIMIZE:
|
||||
{
|
||||
priv->unminimize_in_progress--;
|
||||
if (priv->unminimize_in_progress < 0)
|
||||
{
|
||||
g_warning ("Error in unminimize accounting.");
|
||||
priv->unminimize_in_progress = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case META_PLUGIN_MAP:
|
||||
/*
|
||||
* Make sure that the actor is at the correct place in case
|
||||
@ -1243,8 +1257,7 @@ meta_window_actor_show (MetaWindowActor *self,
|
||||
event = META_PLUGIN_MAP;
|
||||
break;
|
||||
case META_COMP_EFFECT_UNMINIMIZE:
|
||||
/* FIXME: should have META_PLUGIN_UNMINIMIZE */
|
||||
event = META_PLUGIN_MAP;
|
||||
event = META_PLUGIN_UNMINIMIZE;
|
||||
break;
|
||||
case META_COMP_EFFECT_NONE:
|
||||
break;
|
||||
|
@ -94,6 +94,15 @@ struct _MetaPluginClass
|
||||
void (*minimize) (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
|
||||
/**
|
||||
* MetaPluginClass::unminimize:
|
||||
* @actor: a #MetaWindowActor
|
||||
*
|
||||
* Virtual function called when the window represented by @actor is unminimized.
|
||||
*/
|
||||
void (*unminimize) (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
|
||||
/**
|
||||
* MetaPluginClass::maximize:
|
||||
* @actor: a #MetaWindowActor
|
||||
@ -372,6 +381,10 @@ void
|
||||
meta_plugin_minimize_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
|
||||
void
|
||||
meta_plugin_unminimize_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
|
||||
void
|
||||
meta_plugin_maximize_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
|
Loading…
Reference in New Issue
Block a user